]> TLD Linux GIT Repositories - packages/rpm.git/blobdiff - x32.patch
- release down to 2
[packages/rpm.git] / x32.patch
index 38aa1407190493dfb8f5a38824f1718168ef6022..9eab78d44a1c49e7460041e9cf456067426db8b0 100644 (file)
--- a/x32.patch
+++ b/x32.patch
@@ -51,60 +51,31 @@ diff -ur rpm-4.16.1.2/build/rpmfc.h rpm-4.16.1.2.x32/build/rpmfc.h
 diff -ur rpm-4.16.1.2/configure.ac rpm-4.16.1.2.x32/configure.ac
 --- rpm-4.16.1.2/configure.ac  2021-03-21 21:51:28.221530479 +0100
 +++ rpm-4.16.1.2.x32/configure.ac      2021-03-21 21:50:04.127398387 +0100
-@@ -930,6 +930,9 @@
-       host_os=`echo "${host_os}" | sed 's/-gnueabi$//'`
-       host_os_gnu=-gnueabi
+@@ -930,6 +930,10 @@
+ if echo "$host_os" | grep '.*-gnu' > /dev/null ; then
+       host_os=`echo "${host_os}" | sed 's/-gnu$//'`
  fi
 +if echo "$host_os" | grep '.*-gnux32' > /dev/null ; then
 +      host_os=`echo "${host_os}" | sed 's/-gnux32$//'`
++      host_os_gnu=-gnux32
 +fi
- if echo "$host_os" | grep '.*-gnu' > /dev/null ; then
-       host_os=`echo "${host_os}" | sed 's/-gnu$//'`
- fi
-diff -ur rpm-4.16.1.2/fileattrs/python.attr rpm-4.16.1.2.x32/fileattrs/python.attr
---- rpm-4.16.1.2/fileattrs/python.attr 2020-08-31 11:14:07.991087349 +0200
-+++ rpm-4.16.1.2.x32/fileattrs/python.attr     2021-03-21 21:50:04.127398387 +0100
-@@ -14,14 +14,15 @@
- %__python_requires() %{lua:
-     -- Match buildroot paths of the form
-     --    /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/  and
--    --    /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/
-+    --    /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/ and
-+    --    /PATH/OF/BUILDROOT/usr/libx32/pythonMAJOR.MINOR/
-     -- generating a line of the form:
-     --    python(abi) = MAJOR.MINOR
-     local path = rpm.expand('%1')
--    if path:match('/usr/lib%d*/python%d+%.%d+/.*') then
--        local requires = path:gsub('.*/usr/lib%d*/python(%d+%.%d+)/.*', 'python(abi) = %1')
-+    if path:match('/usr/lib%w*/python%d+%.%d+/.*') then
-+        local requires = path:gsub('.*/usr/lib%w*/python(%d+%.%d+)/.*', 'python(abi) = %1')
-         print(requires)
-     end
- }
  
--%__python_path ^((%{_prefix}/lib(64)?/python[[:digit:]]+\\.[[:digit:]]+/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]+\\.[[:digit:]]+))$
-+%__python_path ^((%{_prefix}/lib(64|x32)?/python[[:digit:]]+\\.[[:digit:]]+/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]+\\.[[:digit:]]+))$
-diff -ur rpm-4.16.1.2/fileattrs/pythondist.attr rpm-4.16.1.2.x32/fileattrs/pythondist.attr
---- rpm-4.16.1.2/fileattrs/pythondist.attr     2020-05-28 12:04:25.026136626 +0200
-+++ rpm-4.16.1.2.x32/fileattrs/pythondist.attr 2021-03-21 21:50:04.127398387 +0100
-@@ -1,3 +1,3 @@
- %__pythondist_provides        %{_rpmconfigdir}/pythondistdeps.py --provides --majorver-provides
- %__pythondist_requires        %{_rpmconfigdir}/pythondistdeps.py --requires
--%__pythondist_path            /lib(64)?/python[[:digit:]]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$
-+%__pythondist_path            /lib(64|x32)?/python[[:digit:]]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$
+ changequote(<, >)
+ host_os_exact="${host_os}"
 diff -ur rpm-4.16.1.2/installplatform rpm-4.16.1.2.x32/installplatform
 --- rpm-4.16.1.2/installplatform       2020-05-28 12:04:25.027136631 +0200
 +++ rpm-4.16.1.2.x32/installplatform   2021-03-21 21:51:47.671145954 +0100
-@@ -21,6 +21,8 @@
+@@ -21,6 +21,9 @@
  
    ARCH_INSTALL_POST='%{nil}'
    LIB=lib
 +  TARGETCPU="%{_target_cpu}"
-+  FORCE_RPMRC_GNU=
++  APPEND_TARGET_ABI=
++  PREFERCOLOR=
  
    # XXX FIXME: incomplete and quite likely wrong too in places,
    # consult various arch folks for correct names etc.
-@@ -75,7 +77,16 @@
+@@ -82,7 +84,16 @@
        ISANAME=x86
        ISABITS=64
        CANONARCH=x86_64
@@ -116,18 +87,18 @@ diff -ur rpm-4.16.1.2/installplatform rpm-4.16.1.2.x32/installplatform
 +      ISABITS=x32
 +      CANONARCH=x32
 +      CANONCOLOR=7
-+      RPMRC_GNU="gnux32"
-+      FORCE_RPMRC_GNU="%{?_gnu}"
++      APPEND_TARGET_ABI=1
 +      TARGETCPU="x86_64"
++      PREFERCOLOR=4
        ;;
      ia64)
        ISANAME=ia
-@@ -190,10 +201,14 @@
+@@ -190,10 +200,14 @@
    # skip architectures for which we dont have full config parameters
    [ -z "$CANONARCH" ] && continue
  
 -  if [ "$OS" = "linux" ] && [ "$CANONCOLOR" = 3 ]; then
-+  if [ "$OS" = "linux" ] && [ "$CANONARCH" = "x86_64" ]; then
++  if [ "$OS" = "linux" ] && ( [ "$CANONCOLOR" = 3 ] || [ "$CANONARCH" = "x86_64" ] ); then
        LIB=${LIB}64
    fi
  
@@ -138,11 +109,13 @@ diff -ur rpm-4.16.1.2/installplatform rpm-4.16.1.2.x32/installplatform
    PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}"
    [ -d $PPD ] || mkdir -p $PPD
  
-@@ -202,6 +221,8 @@
+@@ -202,7 +216,10 @@
+   | sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \
        -e "s,@RPMCANONARCH@,$CANONARCH,g" \
        -e "s,@RPMCANONCOLOR@,$CANONCOLOR," \
++      -e "s,@RPMPREFERCOLOR@,${PREFERCOLOR:+%_prefer_color\\t$PREFERCOLOR}," \
        -e "s,@RPMRC_GNU@,$RPMRC_GNU," \
-+      -e "s,@FORCE_RPMRC_GNU@,$FORCE_RPMRC_GNU," \
++      -e "s,@TARGET_ABI@,${APPEND_TARGET_ABI:+%{?_gnu\}}," \
 +      -e "s,@TARGETCPU@,$TARGETCPU," \
        -e "s,@LIB@,$LIB," \
        -e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \
@@ -155,10 +128,18 @@ diff -ur rpm-4.16.1.2/platform.in rpm-4.16.1.2.x32/platform.in
  %_os                  @RPMCANONOS@
  %_gnu                 @RPMRC_GNU@
 -%_target_platform     %{_target_cpu}-%{_vendor}-%{_target_os}
-+%_target_platform     @TARGETCPU@-%{_vendor}-%{_target_os}@FORCE_RPMRC_GNU@
++%_target_platform     @TARGETCPU@-%{_vendor}-%{_target_os}@TARGET_ABI@
  %optflags             @RPMRC_OPTFLAGS@
  
  %__isa_name           @ISANAME@
+@@ -21,6 +21,7 @@
+ #     1       Elf32 permitted
+ #     2       Elf64 permitted
+ %_transaction_color   @RPMCANONCOLOR@
++@RPMPREFERCOLOR@
+ #==============================================================================
+ # ---- configure macros.
 diff -ur rpm-4.16.1.2/rpmrc.in rpm-4.16.1.2.x32/rpmrc.in
 --- rpm-4.16.1.2/rpmrc.in      2020-05-28 12:04:25.075136894 +0200
 +++ rpm-4.16.1.2.x32/rpmrc.in  2021-03-21 21:50:04.127398387 +0100