This is an archive of the discontinued Mercurial Phabricator instance.

packaging: replace dockerlib.sh with a Python script
ClosedPublic

Authored by indygreg on Jun 16 2018, 2:19 PM.

Details

Summary

I want to do some more advanced things with Docker in upcoming
commits. Trying to do that with shell scripts will be a bit too
painful for my liking. Implementing things in Python will be
vastly simpler in the long run.

This commit essentially ports dockerlib.sh to a Python script.
dockerdeb and dockerrpm have been ported to use the new hg-docker
script.

hg-docker requires Python 3. I've only tested on Python 3.5.

Unlike the local packaging scripts which may need to run on old
distros, the Docker packaging scripts don't have these constraints.
So I think it is acceptable to require Python 3.5.

As part of the transition, the Docker image tags changed slightly.
I don't think that's a big deal: the Docker image names are
effectively arbitrary and are a means to an end to achieve
running commands in Docker containers.

The code for resolving the Dockerfile content allows substituting
values passed as arguments. This will be used in a subsequent commit.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Jun 16 2018, 2:19 PM
durin42 accepted this revision.Jun 25 2018, 10:50 AM
This revision is now accepted and ready to land.Jun 25 2018, 10:50 AM
This revision was automatically updated to reflect the committed changes.
contrib/packaging/dockerdeb