]> git.pld-linux.org Git - packages/rpm.git/blobdiff - x32.patch
- fix line count in patch
[packages/rpm.git] / x32.patch
index ca28535a56ddd771a970c94fb822eaa681f10713..43b2f2b6df2904c8200ad07d06653bddf9ee523c 100644 (file)
--- a/x32.patch
+++ b/x32.patch
@@ -22,6 +22,18 @@ diff -ur rpm-4.15.1.orig/build/rpmfc.c rpm-4.15.1/build/rpmfc.c
        if (fcolor & RPMFC_INCLUDE)
            break;
      }
+@@ -1152,7 +1152,10 @@
+               color = RPMFC_ELF64;
+               break;
+           case ELFCLASS32:
+-              color = RPMFC_ELF32;
++              if (ehdr.e_machine == EM_X86_64)
++                  color = RPMFC_ELFX32;
++              else
++                  color = RPMFC_ELF32;
+               break;
+           }
+           elf_end(elf);
 diff -ur rpm-4.15.1.orig/build/rpmfc.h rpm-4.15.1/build/rpmfc.h
 --- rpm-4.15.1.orig/build/rpmfc.h      2019-06-26 16:17:31.397985717 +0200
 +++ rpm-4.15.1/build/rpmfc.h   2019-12-29 13:45:05.936980833 +0100
@@ -49,20 +61,6 @@ diff -ur rpm-4.15.1.orig/configure.ac rpm-4.15.1/configure.ac
  if echo "$host_os" | grep '.*-gnu' > /dev/null ; then
        host_os=`echo "${host_os}" | sed 's/-gnu$//'`
  fi
-diff -ur rpm-4.15.1.orig/include/rpm/rpmfc.h rpm-4.15.1/include/rpm/rpmfc.h
---- rpm-4.15.1.orig/include/rpm/rpmfc.h        2019-12-29 14:10:54.518828249 +0100
-+++ rpm-4.15.1/include/rpm/rpmfc.h     2019-12-29 13:50:08.747881304 +0100
-@@ -26,8 +26,9 @@
-     RPMFC_BLACK                       = 0,
-     RPMFC_ELF32                       = (1 <<  0),
-     RPMFC_ELF64                       = (1 <<  1),
-+    RPMFC_ELFX32              = (1 <<  2),
-     RPMFC_ELFMIPSN32          = (1 <<  2),
--#define       RPMFC_ELF       (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFMIPSN32)
-+#define       RPMFC_ELF       (RPMFC_ELF32|RPMFC_ELF64|RPMFC_ELFX32|RPMFC_ELFMIPSN32)
-       /* (1 << 3) leaks into package headers, reserved */
-     RPMFC_WHITE                       = (1 << 29),
 diff -ur rpm-4.15.1.orig/installplatform rpm-4.15.1/installplatform
 --- rpm-4.15.1.orig/installplatform    2019-06-26 16:17:31.404985707 +0200
 +++ rpm-4.15.1/installplatform 2019-12-29 14:52:09.331085139 +0100
@@ -78,14 +76,15 @@ diff -ur rpm-4.15.1.orig/installplatform rpm-4.15.1/installplatform
        ISANAME=x86
        ISABITS=64
        CANONARCH=x86_64
+-      CANONCOLOR=3
 +      CANONCOLOR=7
 +      ;;
 +    x32)
 +      ISANAME=x86
-+      ISABITS=32
++      ISABITS=x32
 +      CANONARCH=x32
-       CANONCOLOR=3
-+      RPMRC_GNU="${RPMRC_GNU}x32"
++      CANONCOLOR=7
++      FORCE_RPMRC_GNU="${RPMRC_GNU}x32"
 +      TARGETCPU="x86_64"
        ;;
      ia64)
@@ -106,14 +105,25 @@ diff -ur rpm-4.15.1.orig/installplatform rpm-4.15.1/installplatform
    PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}"
    [ -d $PPD ] || mkdir -p $PPD
  
-@@ -202,6 +215,7 @@
+@@ -201,7 +214,8 @@
+   | sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \
        -e "s,@RPMCANONARCH@,$CANONARCH,g" \
        -e "s,@RPMCANONCOLOR@,$CANONCOLOR," \
-       -e "s,@RPMRC_GNU@,$RPMRC_GNU," \
+-      -e "s,@RPMRC_GNU@,$RPMRC_GNU," \
++      -e "s,@RPMRC_GNU@,${FORCE_RPMRC_GNU:-$RPMRC_GNU}," \
 +      -e "s,@TARGETCPU@,$TARGETCPU," \
        -e "s,@LIB@,$LIB," \
        -e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \
        -e '/\${\w*:-/!s,\${,%{_,' \
+@@ -212,6 +226,8 @@
+   | ${FILTER} \
+   > ${PPD}/macros
++  FORCE_RPMRC_GNU=
++
+ done
+ # gently adjust undefined autoconf variables to rpm macros...
 diff -ur rpm-4.15.1.orig/platform.in rpm-4.15.1/platform.in
 --- rpm-4.15.1.orig/platform.in        2019-11-13 10:19:29.371710954 +0100
 +++ rpm-4.15.1/platform.in     2019-12-29 14:47:30.886959421 +0100
@@ -163,11 +173,16 @@ diff -ur rpm-4.15.1.orig/rpmrc.in rpm-4.15.1/rpmrc.in
  buildarchtranslate: sh3: sh3
  buildarchtranslate: sh4: sh4
  buildarchtranslate: sh4a: sh4
-@@ -490,6 +496,8 @@
+@@ -486,10 +492,12 @@
+ arch_compat: ia64: noarch
+-arch_compat: x86_64: amd64 em64t athlon noarch
++arch_compat: x86_64: amd64 em64t athlon x32 noarch
  arch_compat: amd64: x86_64 em64t athlon noarch
  arch_compat: ia32e: x86_64 em64t athlon noarch
  
-+arch_compat: x32: x32 noarch
++arch_compat: x32: x32 x86_64 noarch
 +
  arch_compat: sh3: noarch
  arch_compat: sh4: noarch
@@ -194,3 +209,32 @@ diff -ur rpm-4.15.1.orig/tools/elfdeps.c rpm-4.15.1/tools/elfdeps.c
      return marker;
  }
  
+--- rpm-4.15.1/fileattrs/pythondist.attr~      2019-06-26 23:17:31.000000000 +0900
++++ rpm-4.15.1/fileattrs/pythondist.attr       2020-01-04 23:34:05.680366882 +0900
+@@ -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)$
+--- rpm-4.16.0/fileattrs/python.attr.orig      2020-08-31 11:14:07.991087349 +0200
++++ rpm-4.16.0/fileattrs/python.attr   2020-10-03 10:47:16.560360859 +0200
+@@ -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:]]+))$
This page took 0.029513 seconds and 4 git commands to generate.