-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add support for Rocky Linux 9 #5144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
For CentOS, we've traditionally included the el7 component, so let's include the same component for Rocky 8. While we're at it, let's be honest about what we're shipping and say Rocky Linux and not CentOS, since CentOS 8 is dead.
The version of RPM in Rocky Linux 9 no longer allows string comparisons with barewords. Quote the arguments properly to make sure that the comparison works on Rocky Linux 9.
If we're building for a RHEL 9 equivalent, use the same patterns as for RHEL 8 equivalents, since those seem to work and build properly.
Since CentOS is now no longer a plain rebuild of RHEL, use Rocky Linux as the RHEL 9 equivalent. Add entries in all the required files for this to build properly.
chrisd8088
approved these changes
Oct 19, 2022
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Dec 28, 2022
In commit c2d25ee of PR git-lfs#511 we added support for building RPM packages for 32-bit platforms by updating the docker/centos_script.bsh script which was present at that time to call rpmbuild with a --target=i686 argument. Since commit 56ffe42 of PR git-lfs#555 both that script and the rpm/build_rpms.bsh script contained the same logic to parse the OS name and version in order to set a short suffix for the RPM filenames. However, the docker/centos_script.bsh script was subsequently moved into the git-lfs/build-dockers repository, where it has not been updated to match the rpm/build_rpms.bsh script, such as when parsing of the OS major version was added in commit e939409 of PR git-lfs#5054, which allows us to properly parse the version number on CentOS/Rocky Linux 8 and above, or when parsing of the Rocky Linux OS name was added in commit 723be34 of PR git-lfs#5144. The result is that at present we build 32-bit RPMs for CentOS 8 and Rocky Linux 9 (el8 and el9, respectively) without the platform short name suffix in their filenames, e.g., git-lfs-3.3.0-1.i686.rpm and git-lfs-3.3.0-1.i686.rpm, and then upload them to Packagecloud with those names. To resolve this problem and avoid later regressions between the two sets of parsing logic, we move the rpmbuild command for 32-bit packages into our rpm/build_rpms.bsh script, which ensures they will be built with the same context as our 64-bit packages. To do this we introduce an rpmbuild command with the --target=i686 argument into rpm/build_rpms.bsh, which allows us to also remove the rpmbuild command from the centos_script.bsh script in the git-lfs/build-dockers repository in PR git-lfs/build-dockers#54.
chrisd8088
added a commit
to chrisd8088/build-dockers
that referenced
this pull request
Dec 28, 2022
In commit git-lfs/git-lfs@c2d25ee of PR git-lfs/git-lfs#511 we added support for building RPM packages for 32-bit platforms by updating the docker/centos_script.bsh script which was present at that time to call rpmbuild with a --target=i686 argument. Since commit git-lfs/git-lfs@56ffe42 of PR git-lfs/git-lfs#555 both that script and the rpm/build_rpms.bsh script in the primary Git LFS project's repository contained the same logic to parse the OS name and version in order to set a short suffix for the RPM filenames. However, the docker/centos_script.bsh script was subsequently moved into this repository, where it has not been updated to match the rpm/build_rpms.bsh script in the primary project repository, such as when parsing of the OS major version was added in commit git-lfs/git-lfs@e939409 of PR git-lfs/git-lfs#5054, which allows us to properly parse the version number on CentOS/Rocky Linux 8 and above, or when parsing of the Rocky Linux OS name was added in commit git-lfs/git-lfs@723be34 of PR git-lfs/git-lfs#5144. The result is that at present we build 32-bit RPMs for CentOS 8 and Rocky Linux 9 (el8 and el9, respectively) without the platform short name suffix in their filenames, e.g., git-lfs-3.3.0-1.i686.rpm and git-lfs-3.3.0-1.i686.rpm, and then upload them to Packagecloud with those names. To resolve this problem and avoid later regressions between the two sets of parsing logic, we add an rpmbuild command with the --target=i686 argument for 32-bit packages to the rpm/build_rpms.bsh script in the primary Git LFS project repository in commit git-lfs/git-lfs@7830f04 of PR git-lfs/git-lfs#5241, which ensures they will be built with the same context as our 64-bit packages. We can therefore also remove the rpmbuild command with the --target=i686 argument from the centos_script.bsh script in this repository, along with the setup code which attempted to parse the OS version and name from either /etc/os-release or /etc/redhat-release, as these values are only used to set the RPM_DIST variable passed to rpmbuild, and the initialization code for that variable can be removed as well.
This was referenced Dec 28, 2022
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.
RHEL 9 recently came out. Let's use Rocky Linux 9 to build packages for RHEL and RHEL-equivalent versions so that users have packages to work with.
Each step has its own commit and description.
Fixes #5107