diff --git a/.github/workflows/rebuild-rpms.yml b/.github/workflows/rebuild-rpms.yml index 170bb686a..9011c59ab 100644 --- a/.github/workflows/rebuild-rpms.yml +++ b/.github/workflows/rebuild-rpms.yml @@ -318,10 +318,10 @@ jobs: # built, Fedora must not answer for. Names come from rpm rather # than from parsing filenames, which stops working the moment a # disttag changes. - EXCLUDE=$(find /work/prior -name "*.rpm" -type f -print0 \ + STAGE_EXCLUDE=$(find /work/prior -name "*.rpm" -type f -print0 \ | xargs -0 -r rpm -qp --qf "%{NAME}\n" 2>/dev/null \ | sort -u | paste -sd, -) - echo "excluding from Fedora: $EXCLUDE" + echo "excluding from Fedora: $STAGE_EXCLUDE" fi # Hummingbird ships newer versions of some names than Fedora 44 # does, and the two must never mix in one transaction. The @@ -333,7 +333,7 @@ jobs: # Unconditional: stage 0 has no prior RPMs, so the block above # never ran and EXCLUDE would otherwise be empty here. HB_EXCLUDE="ruby-default-gems,ruby3.3-default-gems,ruby3.4-default-gems,libicu,icu,gpgme,qt6-qtbase" - EXCLUDE="${HB_EXCLUDE}${EXCLUDE:+,}${EXCLUDE}" + EXCLUDE="${HB_EXCLUDE}${STAGE_EXCLUDE:+,}${STAGE_EXCLUDE}" echo "hummingbird exclusions: $HB_EXCLUDE" if [ -n "${FACTORY_REPO:-}" ]; then printf "[factory]\nname=factory\nbaseurl=%s\nenabled=1\ngpgcheck=0\npriority=5\n" \ @@ -395,7 +395,8 @@ jobs: spec=$(find "/packages/$PACKAGE" -maxdepth 1 -name "*.spec" -print -quit) test -n "$spec" dnf -y $disable ${EXCLUDE:+--setopt=fedora.excludepkgs="$EXCLUDE"} \ - ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$spec" + ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} \ + ${STAGE_EXCLUDE:+--setopt=public-hummingbird-x86_64-rpms.excludepkgs="$STAGE_EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$spec" # An imported spec keeps its dist-git PatchN and auxiliary SourceN # files next to itself, while the verified upstream archive lands in # /work/sources. rpmbuild takes a single _sourcedir, so stage both: @@ -418,7 +419,8 @@ jobs: generated=$(ls /root/rpmbuild/SRPMS/*.buildreqs.nosrc.rpm 2>/dev/null | head -1) test -n "$generated" dnf -y $disable ${EXCLUDE:+--setopt=fedora.excludepkgs="$EXCLUDE"} \ - ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$generated" + ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} \ + ${STAGE_EXCLUDE:+--setopt=public-hummingbird-x86_64-rpms.excludepkgs="$STAGE_EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$generated" done rpmbuild -ba "$spec" \ --define "_sourcedir $staged" \ @@ -527,10 +529,10 @@ jobs: # built, Fedora must not answer for. Names come from rpm rather # than from parsing filenames, which stops working the moment a # disttag changes. - EXCLUDE=$(find /work/prior -name "*.rpm" -type f -print0 \ + STAGE_EXCLUDE=$(find /work/prior -name "*.rpm" -type f -print0 \ | xargs -0 -r rpm -qp --qf "%{NAME}\n" 2>/dev/null \ | sort -u | paste -sd, -) - echo "excluding from Fedora: $EXCLUDE" + echo "excluding from Fedora: $STAGE_EXCLUDE" fi # Hummingbird ships newer versions of some names than Fedora 44 # does, and the two must never mix in one transaction. The @@ -542,7 +544,7 @@ jobs: # Unconditional: stage 0 has no prior RPMs, so the block above # never ran and EXCLUDE would otherwise be empty here. HB_EXCLUDE="ruby-default-gems,ruby3.3-default-gems,ruby3.4-default-gems,libicu,icu,gpgme,qt6-qtbase" - EXCLUDE="${HB_EXCLUDE}${EXCLUDE:+,}${EXCLUDE}" + EXCLUDE="${HB_EXCLUDE}${STAGE_EXCLUDE:+,}${STAGE_EXCLUDE}" echo "hummingbird exclusions: $HB_EXCLUDE" if [ -n "${FACTORY_REPO:-}" ]; then printf "[factory]\nname=factory\nbaseurl=%s\nenabled=1\ngpgcheck=0\npriority=5\n" \ @@ -604,7 +606,8 @@ jobs: spec=$(find "/packages/$PACKAGE" -maxdepth 1 -name "*.spec" -print -quit) test -n "$spec" dnf -y $disable ${EXCLUDE:+--setopt=fedora.excludepkgs="$EXCLUDE"} \ - ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$spec" + ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} \ + ${STAGE_EXCLUDE:+--setopt=public-hummingbird-x86_64-rpms.excludepkgs="$STAGE_EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$spec" # An imported spec keeps its dist-git PatchN and auxiliary SourceN # files next to itself, while the verified upstream archive lands in # /work/sources. rpmbuild takes a single _sourcedir, so stage both: @@ -627,7 +630,8 @@ jobs: generated=$(ls /root/rpmbuild/SRPMS/*.buildreqs.nosrc.rpm 2>/dev/null | head -1) test -n "$generated" dnf -y $disable ${EXCLUDE:+--setopt=fedora.excludepkgs="$EXCLUDE"} \ - ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$generated" + ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} \ + ${STAGE_EXCLUDE:+--setopt=public-hummingbird-x86_64-rpms.excludepkgs="$STAGE_EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$generated" done rpmbuild -ba "$spec" \ --define "_sourcedir $staged" \ @@ -736,10 +740,10 @@ jobs: # built, Fedora must not answer for. Names come from rpm rather # than from parsing filenames, which stops working the moment a # disttag changes. - EXCLUDE=$(find /work/prior -name "*.rpm" -type f -print0 \ + STAGE_EXCLUDE=$(find /work/prior -name "*.rpm" -type f -print0 \ | xargs -0 -r rpm -qp --qf "%{NAME}\n" 2>/dev/null \ | sort -u | paste -sd, -) - echo "excluding from Fedora: $EXCLUDE" + echo "excluding from Fedora: $STAGE_EXCLUDE" fi # Hummingbird ships newer versions of some names than Fedora 44 # does, and the two must never mix in one transaction. The @@ -751,7 +755,7 @@ jobs: # Unconditional: stage 0 has no prior RPMs, so the block above # never ran and EXCLUDE would otherwise be empty here. HB_EXCLUDE="ruby-default-gems,ruby3.3-default-gems,ruby3.4-default-gems,libicu,icu,gpgme,qt6-qtbase" - EXCLUDE="${HB_EXCLUDE}${EXCLUDE:+,}${EXCLUDE}" + EXCLUDE="${HB_EXCLUDE}${STAGE_EXCLUDE:+,}${STAGE_EXCLUDE}" echo "hummingbird exclusions: $HB_EXCLUDE" if [ -n "${FACTORY_REPO:-}" ]; then printf "[factory]\nname=factory\nbaseurl=%s\nenabled=1\ngpgcheck=0\npriority=5\n" \ @@ -813,7 +817,8 @@ jobs: spec=$(find "/packages/$PACKAGE" -maxdepth 1 -name "*.spec" -print -quit) test -n "$spec" dnf -y $disable ${EXCLUDE:+--setopt=fedora.excludepkgs="$EXCLUDE"} \ - ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$spec" + ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} \ + ${STAGE_EXCLUDE:+--setopt=public-hummingbird-x86_64-rpms.excludepkgs="$STAGE_EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$spec" # An imported spec keeps its dist-git PatchN and auxiliary SourceN # files next to itself, while the verified upstream archive lands in # /work/sources. rpmbuild takes a single _sourcedir, so stage both: @@ -836,7 +841,8 @@ jobs: generated=$(ls /root/rpmbuild/SRPMS/*.buildreqs.nosrc.rpm 2>/dev/null | head -1) test -n "$generated" dnf -y $disable ${EXCLUDE:+--setopt=fedora.excludepkgs="$EXCLUDE"} \ - ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$generated" + ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} \ + ${STAGE_EXCLUDE:+--setopt=public-hummingbird-x86_64-rpms.excludepkgs="$STAGE_EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$generated" done rpmbuild -ba "$spec" \ --define "_sourcedir $staged" \ @@ -945,10 +951,10 @@ jobs: # built, Fedora must not answer for. Names come from rpm rather # than from parsing filenames, which stops working the moment a # disttag changes. - EXCLUDE=$(find /work/prior -name "*.rpm" -type f -print0 \ + STAGE_EXCLUDE=$(find /work/prior -name "*.rpm" -type f -print0 \ | xargs -0 -r rpm -qp --qf "%{NAME}\n" 2>/dev/null \ | sort -u | paste -sd, -) - echo "excluding from Fedora: $EXCLUDE" + echo "excluding from Fedora: $STAGE_EXCLUDE" fi # Hummingbird ships newer versions of some names than Fedora 44 # does, and the two must never mix in one transaction. The @@ -960,7 +966,7 @@ jobs: # Unconditional: stage 0 has no prior RPMs, so the block above # never ran and EXCLUDE would otherwise be empty here. HB_EXCLUDE="ruby-default-gems,ruby3.3-default-gems,ruby3.4-default-gems,libicu,icu,gpgme,qt6-qtbase" - EXCLUDE="${HB_EXCLUDE}${EXCLUDE:+,}${EXCLUDE}" + EXCLUDE="${HB_EXCLUDE}${STAGE_EXCLUDE:+,}${STAGE_EXCLUDE}" echo "hummingbird exclusions: $HB_EXCLUDE" if [ -n "${FACTORY_REPO:-}" ]; then printf "[factory]\nname=factory\nbaseurl=%s\nenabled=1\ngpgcheck=0\npriority=5\n" \ @@ -1022,7 +1028,8 @@ jobs: spec=$(find "/packages/$PACKAGE" -maxdepth 1 -name "*.spec" -print -quit) test -n "$spec" dnf -y $disable ${EXCLUDE:+--setopt=fedora.excludepkgs="$EXCLUDE"} \ - ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$spec" + ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} \ + ${STAGE_EXCLUDE:+--setopt=public-hummingbird-x86_64-rpms.excludepkgs="$STAGE_EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$spec" # An imported spec keeps its dist-git PatchN and auxiliary SourceN # files next to itself, while the verified upstream archive lands in # /work/sources. rpmbuild takes a single _sourcedir, so stage both: @@ -1045,7 +1052,8 @@ jobs: generated=$(ls /root/rpmbuild/SRPMS/*.buildreqs.nosrc.rpm 2>/dev/null | head -1) test -n "$generated" dnf -y $disable ${EXCLUDE:+--setopt=fedora.excludepkgs="$EXCLUDE"} \ - ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$generated" + ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} \ + ${STAGE_EXCLUDE:+--setopt=public-hummingbird-x86_64-rpms.excludepkgs="$STAGE_EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$generated" done rpmbuild -ba "$spec" \ --define "_sourcedir $staged" \ @@ -1154,10 +1162,10 @@ jobs: # built, Fedora must not answer for. Names come from rpm rather # than from parsing filenames, which stops working the moment a # disttag changes. - EXCLUDE=$(find /work/prior -name "*.rpm" -type f -print0 \ + STAGE_EXCLUDE=$(find /work/prior -name "*.rpm" -type f -print0 \ | xargs -0 -r rpm -qp --qf "%{NAME}\n" 2>/dev/null \ | sort -u | paste -sd, -) - echo "excluding from Fedora: $EXCLUDE" + echo "excluding from Fedora: $STAGE_EXCLUDE" fi # Hummingbird ships newer versions of some names than Fedora 44 # does, and the two must never mix in one transaction. The @@ -1169,7 +1177,7 @@ jobs: # Unconditional: stage 0 has no prior RPMs, so the block above # never ran and EXCLUDE would otherwise be empty here. HB_EXCLUDE="ruby-default-gems,ruby3.3-default-gems,ruby3.4-default-gems,libicu,icu,gpgme,qt6-qtbase" - EXCLUDE="${HB_EXCLUDE}${EXCLUDE:+,}${EXCLUDE}" + EXCLUDE="${HB_EXCLUDE}${STAGE_EXCLUDE:+,}${STAGE_EXCLUDE}" echo "hummingbird exclusions: $HB_EXCLUDE" if [ -n "${FACTORY_REPO:-}" ]; then printf "[factory]\nname=factory\nbaseurl=%s\nenabled=1\ngpgcheck=0\npriority=5\n" \ @@ -1231,7 +1239,8 @@ jobs: spec=$(find "/packages/$PACKAGE" -maxdepth 1 -name "*.spec" -print -quit) test -n "$spec" dnf -y $disable ${EXCLUDE:+--setopt=fedora.excludepkgs="$EXCLUDE"} \ - ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$spec" + ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} \ + ${STAGE_EXCLUDE:+--setopt=public-hummingbird-x86_64-rpms.excludepkgs="$STAGE_EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$spec" # An imported spec keeps its dist-git PatchN and auxiliary SourceN # files next to itself, while the verified upstream archive lands in # /work/sources. rpmbuild takes a single _sourcedir, so stage both: @@ -1254,7 +1263,8 @@ jobs: generated=$(ls /root/rpmbuild/SRPMS/*.buildreqs.nosrc.rpm 2>/dev/null | head -1) test -n "$generated" dnf -y $disable ${EXCLUDE:+--setopt=fedora.excludepkgs="$EXCLUDE"} \ - ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$generated" + ${EXCLUDE:+--setopt=updates.excludepkgs="$EXCLUDE"} \ + ${STAGE_EXCLUDE:+--setopt=public-hummingbird-x86_64-rpms.excludepkgs="$STAGE_EXCLUDE"} builddep -D "_sourcedir /packages/$PACKAGE" "$generated" done rpmbuild -ba "$spec" \ --define "_sourcedir $staged" \ diff --git a/packages/mozjs140/mozjs140.spec b/packages/mozjs140/mozjs140.spec index be18ce27b..3f0e6aa7b 100644 --- a/packages/mozjs140/mozjs140.spec +++ b/packages/mozjs140/mozjs140.spec @@ -57,6 +57,11 @@ Patch16: D261512.1755672843.diff # TODO: Check with mozilla for cause of these fails and re-enable spidermonkey compile time checks if needed Patch20: spidermonkey_checks_disable.patch +# rust 1.98 added the *-oe-linux-gnu targets, which leaves moz.configure unable +# to narrow x86_64-redhat-linux-gnu down to one rust target. Not in rawhide, +# which has not rebuilt this package since that rust landed. +Patch21: rust-target-vendor-narrowing.patch + BuildRequires: cargo %if "%{toolchain}" == "clang" BuildRequires: clang diff --git a/packages/mozjs140/rust-target-vendor-narrowing.patch b/packages/mozjs140/rust-target-vendor-narrowing.patch new file mode 100644 index 000000000..9e3b86be7 --- /dev/null +++ b/packages/mozjs140/rust-target-vendor-narrowing.patch @@ -0,0 +1,63 @@ +Correlate the rust target on the vendor, so rust 1.98 stops being ambiguous. + +Mozilla's configure does not take the autoconf triple straight to rustc. It +runs "rustc --print target-list", groups the results by (cpu, endianness, os), +and narrows that group down to one rust target for the triple it was given. +For x86_64-redhat-linux-gnu -- which is what %configure passes as --host and +--target -- the narrowing that decided it was the raw OS, "linux-gnu", which +matched x86_64-unknown-linux-gnu and nothing else. + +rust 1.98 added the OpenEmbedded targets, among them x86_64-oe-linux-gnu and +aarch64-oe-linux-gnu. Those share the raw OS *and* the raw CPU with the +generic target, so both narrowings now leave two candidates. The last step +tries the vendor, "redhat" names no rust target at all, and configure stops: + + ERROR: Don't know how to translate x86_64-redhat-linux-gnu for rustc + +Nothing about the build root causes this: the same failure appears with the +Fedora rust and with an upstream-built one, and disappears on rust 1.94, which +has no *-oe-* targets. + +Upstream has since taken the vendor correlation, in the same place and with +the same reasoning -- see the "*-oe-linux-gnu targets added in rust 1.98" +comment on mozilla-firefox main -- but only maps the "pc" vendor config.guess +emits onto rust's generic "unknown". A distribution triple carries a vendor +that names no rust target, so this adds the fallback that covers it: when the +vendor matches nothing, the generic target is the one meant. Every triple that +already resolved still resolves to the same target, on both rust versions. + +diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure +--- a/build/moz.configure/rust.configure ++++ b/build/moz.configure/rust.configure +@@ -302,6 +302,10 @@ + elif not candidates: + return None + ++ # config.guess uses the "pc" vendor for x86/x86_64 where rust uses its ++ # generic "unknown" vendor; normalize so we correlate on the right one. ++ vendor = "unknown" if host_or_target.vendor == "pc" else host_or_target.vendor ++ + # We have multiple candidates. There are two cases where we can try to + # narrow further down using extra information from the build system. + # - For windows targets, correlate with the C compiler type +@@ -402,6 +406,20 @@ + elif narrowed: + candidates = narrowed + ++ # Correlate on the (normalized) vendor, so vendor-specific targets do not ++ # shadow the generic ones. rust 1.98 added x86_64-oe-linux-gnu, which ++ # shares its raw OS and raw CPU with x86_64-unknown-linux-gnu, so the ++ # narrowing below stopped resolving. A vendor that names no rust target ++ # at all -- redhat, as %configure passes it -- wants the generic target ++ # rather than whichever vendor-specific one happens to come first. ++ narrowed = [c for c in candidates if c.target.vendor == vendor] ++ if not narrowed: ++ narrowed = [c for c in candidates if c.target.vendor == "unknown"] ++ if len(narrowed) == 1: ++ return narrowed[0].rust_target ++ elif narrowed: ++ candidates = narrowed ++ + # See if we can narrow down with the raw OS and raw CPU + narrowed = [ + c