]> git.pld-linux.org Git - packages/rpm.git/blobdiff - x32.patch
- fix build with semanage and no other embedded interpreters
[packages/rpm.git] / x32.patch
index ff53476ddf30663ca807cc6fdf22cd27c96314ab..900aa64ff2772dd4338e95d52126d3fbe7996d13 100644 (file)
--- a/x32.patch
+++ b/x32.patch
@@ -214,25 +214,34 @@ diff -ur rpm-5.4.15/lib/rpmds.c rpm-5.4.15.x32/lib/rpmds.c
        xx = add(context, ds);
        (void)rpmdsFree(ds);
        ds = NULL;
---- rpm-5.4.15/build/parseSpec.c~      2015-04-02 19:31:50.000000000 +0200
-+++ rpm-5.4.15/build/parseSpec.c       2015-04-02 20:19:46.549637451 +0200
-@@ -732,9 +732,19 @@
-        * to use a separate platform tag for these (mdvbz#61746).
-        */
-       if(pkg->noarch && !platformNoarch && strcmp(arch, "noarch")) {
+diff -ur rpm-5.4.15/build/parseSpec.c rpm-5.4.15-fixed/build/parseSpec.c
+--- rpm-5.4.15/build/parseSpec.c       2015-04-02 20:52:18.192956656 +0200
++++ rpm-5.4.15-fixed/build/parseSpec.c 2015-04-02 20:49:57.416291008 +0200
+@@ -707,10 +708,25 @@
+     /* Check for description in each package and add arch and os */
+   {
+-    const char *platform = rpmExpand("%{_target_platform}", NULL);
+-    const char *platformNoarch = NULL;
++    const char *platform = NULL;
+     const char *arch = rpmExpand("%{_target_cpu}", NULL);
+     const char *os = rpmExpand("%{_target_os}", NULL);
 +#ifdef RPM_VENDOR_PLD
-+      /*
-+       * This is a hack for x32 compatibility, on x32 _target_platform
-+       * does not use _target_cpu, it must use hardcoded x86-64.
-+       * This results in noarch packages using platform x86_64-pld-linux-gnux32
-+       * and being unusable on ix86.
-+       */
-+          platformNoarch = xstrdup("noarch-pld-linux");
++/*
++ * This is a hack for x32 compatibility, on x32 _target_platform
++ * does not use _target_cpu, it must use hardcoded x86-64.
++ * This results in noarch packages using platform x86_64-pld-linux-gnux32
++ * and being unusable on ix86.
++ */
++    const char *platformNoarch = xstrdup("noarch-pld-linux");
++    if (strcmp(arch,"noarch"))
++        platform = rpmExpand("%{_target_platform}", NULL);
++    else
++        platform = xstrdup("noarch-pld-linux");
 +#else
-           addMacro(NULL, "_target_cpu", NULL, "noarch", RMIL_RPMRC);
-           platformNoarch = rpmExpand("%{_target_platform}", NULL);
-           addMacro(NULL, "_target_cpu", NULL, arch, RMIL_RPMRC);
++    const char *platformNoarch = NULL;
++    platform = rpmExpand("%{_target_platform}", NULL);
 +#endif
-       }
-       he->tag = RPMTAG_PLATFORM;
-       he->t = RPM_STRING_TYPE;
+     for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
+       he->tag = RPMTAG_OS;
This page took 0.09571 seconds and 4 git commands to generate.