Merged
Conversation
This should be far more universal. Instea of running gpg-agent in the host, it is run in a docker and will be plumbed to each of the other dockers
Changed DOCKER_LFS_BUILD_VERSION to default 0.5.3 for now instead of auto updating by version. Added complexity and delays with no real utility Removed BUILD_LOCAL option so that it always built local. Added complexity with no real utility Fixed default key behavior
Started README update Simplified gpg to a single file per docker Auto dump public key in ./repo/os/version Cleaned up test dockerfiles Simplified gpg daemon scripts Fixed bug not cleaning up old containers Removed hack for git-lfs#548
docker/docker+.bsh
Outdated
Contributor
There was a problem hiding this comment.
Should this be dirname instead? Otherwise this is just docker+.bsh when run on my mac.
Fixes small bug involving determining relative path
Contributor
|
This is working great for me now. I definitely want to confirm that gpg signing works before I merge it though. |
docker/README.md
Outdated
Contributor
There was a problem hiding this comment.
Of course, this export command doesn't work on the mac :)
This works for me:
$ gpg -a --export-secret-keys <key ID>
Fixing a confusing typo
docker/gpg-agent_start.bsh
Outdated
Contributor
Author
There was a problem hiding this comment.
This should have ${CUR_DIR} in the dockerfile path
Contributor
|
Thanks for this! I'm excited to try this out for v0.6.0 :) |
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Dec 28, 2022
Our rpm/build_rpms.bsh script currently attempts to parse the /etc/os-release file to retrieve the major OS version number, and if that file does not exist, reads /etc/redhat-release instead; the latter logic has been in place since the introduction of the script in commit 4a71627 of PR git-lfs#332, and has been the fallback logic since commit 56ffe42 of PR git-lfs#555. However, /etc/os-release should exist on all the current versions of CentOS and Rocky Linux we support, so we do not need to retain the fallback parsing of /etc/redhat-release at this point.
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
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Sep 13, 2023
When the scripts to build Docker images of Git LFS were first introduced in PRs git-lfs#511 and git-lfs#555, an optional capabililty was included to sign the RPM or Debian packages after building them in the containers. This option was triggered by the presence of a git-lfs_*.key file alongside the Dockerfile for a given OS and version. However, we have not published Docker containers to the Docker Hub or any other registry for at least five years, and we do not use or maintain this signing capability, so we can remove the associated script code. If we ever decide to begin publishing containers again, we can restore this functionality from our Git history. The docker/test_dockers.bsh script is also out of date and unused, so we remove it as well.
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.
Vastly cleaned up docker directory and files
Removed need to rebuild entire environment just to get dependencies
Normalized all rpm names so they follow the same pattern between OSes
Added 32 bit cross compile support
Move GPG agent from host to docker, to support any boot2docker host now.
Fixed file ownership issue
Enabled integration test on rpm build
Cleaned up README