Skip to content

Docker improvements#555

Merged
technoweenie merged 21 commits intogit-lfs:masterfrom
andyneff:docker-improvements
Aug 6, 2015
Merged

Docker improvements#555
technoweenie merged 21 commits intogit-lfs:masterfrom
andyneff:docker-improvements

Conversation

@andyneff
Copy link
Contributor

@andyneff andyneff commented Aug 1, 2015

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

andyneff and others added 18 commits July 31, 2015 16:40
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
Normalized rpm names
Upped build environment to 0.5.4 which included docker-scripts
Fixes ownership problem
Added unit tests to rpms now they are all passing
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be dirname instead? Otherwise this is just docker+.bsh when run on my mac.

Fixes small bug involving determining relative path
@technoweenie
Copy link
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have ${CUR_DIR} in the dockerfile path

@technoweenie
Copy link
Contributor

Thanks for this! I'm excited to try this out for v0.6.0 :)

technoweenie added a commit that referenced this pull request Aug 6, 2015
@technoweenie technoweenie merged commit 72e8dd6 into git-lfs:master Aug 6, 2015
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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants