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.
DESCRIPTION:
Yj should be installable on any Debian system via the standard apt-get mechanism. The first step to doing that is to package yj into a DEB.
SOLUTION:
Ideally, this should be using dh-make-golang to create the debian folder structure. However, that does not support passing the version number as a link argument during building. As a result, a manual structure is created, which requires a few steps to be performed. This is automated within a Makefile via the
deb
target.The
all
target in Makefile calls the existing build.sh script. This script was updated to callmake deb
for all desired OS's and ARCH's inside clean docker containers.TESTING:
After running
make
, I checked the contents of the build output directory and tested installing the DEBs in clean docker containers.LIMITATIONS:
Lintian shows a few warnings about the resulting ded (e.g. missing man page) and one error (statictly linked executable). All of those are perfectly file to ignore.
Since building DEBs in clean docker containers takes a while, the time that build.sh takes to execute is now substantially longer. Moreover, since docker containers are using more than one ARCH, the computer on which the script runs must have
qemu-user-static
installed.