Repository navigation
Conversation
- Use explicit RPM boolean rich dependencies in Requires: (libcurl($FARCH) or libcurl4($FARCH)) and (libgcc($FARCH) or libgcc_s1($FARCH)) so the Fedora and openSUSE RPMs are cross-compatible across Fedora, openSUSE Leap 15/16/Tumbleweed, and RHEL/Rocky Linux. - Use cross-distro Recommends: for 32-bit multilib packages: (glibc-devel(x86-32) or glibc-devel-32bit), (libgcc(x86-32) or libgcc_s1-32bit), and (libcurl(x86-32) or libcurl4-32bit) so 64-bit-only systems are not blocked and fixed the invalid gcc-32bit($FARCH) typo. - Exclude bundled 32-bit /usr/lib/libphobos2.so* from automatic requirement generation via __requires_exclude_from on x86_64 packages. - Add Provides and Obsoletes for phobos-devel, phobos-devel-static, and dub to avoid file collisions when upgrading over split openSUSE packages. - Allow dmd_rpm.sh to run on build environments with /etc/os-release and make fakeroot optional if rpmbuild is available.
|
Tested this in incus containers on Fedora 44, openSUSE Leap 16.0, Tumbleweed, AlmaLinux 8 & 9 (dmd 2.110.0). Works, one bug to fix. Verified working
Bug
Nits
Fix the Bug and it should be good to merge! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
This PR modernizes the RPM packaging in
linux/dmd_rpm.shto fix compatibility on openSUSE Leap 16, openSUSE Tumbleweed, Rocky Linux / RHEL, and Fedora:RPM Boolean Rich Dependencies (
Requires:):(libcurl($FARCH) or libcurl4($FARCH))and(libgcc($FARCH) or libgcc_s1($FARCH)).libcurl4is used (there is nolibcurlorlibcurl4-32bit). On Fedora/RHEL,libcurlis used. This allows the RPM packages to be cross-compatible across all RPM-based distros.32-bit Multilib Isolation & Weak Dependencies (
Recommends:):/usr/lib/libphobos2.so*) previously caused RPM'sfind-requiresto inject an automatic 32-bitRequires: libgcc_s.so.1into the 64-bit package, which fails on standard 64-bit systems where 32-bitlibgcc_s.so.1is not installed by default. Added%global __requires_exclude_from ^/usr/lib/libphobos2\\.so.*$onx86_64to prevent this leak.glibc-devel(x86-32) or glibc-devel-32bit,libgcc(x86-32) or libgcc_s1-32bit,libcurl(x86-32) or libcurl4-32bit) from hardRequires:toRecommends:. This prevents installation failures on 64-bit-only installations while still pulling in multilib packages when requested/available.gcc-32bit($FARCH)evaluated to non-existentgcc-32bit(x86-64).Smooth openSUSE Upgrades (
Provides:&Obsoletes:):ProvidesandObsoletesforphobos-devel,phobos-devel-static, anddubto prevent file conflicts when upgrading over openSUSE's distribution-split packages.Build System Compatibility:
/etc/os-releasesodmd_rpm.shcan be executed on any modern Linux distribution.fakerootoptional ifrpmbuildis already installed._topdirand_tmppathto ensure clean builds in unprivileged or containerized build environments.