-
Notifications
You must be signed in to change notification settings - Fork 161
Assorted improvements to Makefiles #357
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
Conversation
|
looks like this needs a rebase |
|
Guess we'll have to backport this to the release branches (once merged) |
seemethere
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're going to go this route we'll also need to make changes to the Jenkinsfile since it attempts to use the old DOCKER_BUILD_PKGS make variable:
docker-ce-packaging/Jenkinsfile
Line 32 in 637c15e
| sh('make VERSION=0.0.1-dev DOCKER_BUILD_PKGS=ubuntu-xenial ENGINE_DIR=$(pwd)/engine CLI_DIR=$(pwd)/cli deb') |
Also for the deb Makefile maybe it'd be better to leave out raspbian by default since it can only be built on arm based machines
Instead of relying on the main Makefile to pass DOCKER_BUILD_PKGS as
an argument to {rpm,deb}/Makefile, use the sub-makefile directly.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
1. A symbol % is not working as expected in PHONY targets, so e.g. ubuntu-cosmic was not being rebuild each time, because ubuntu-cosmic directory exists. The fix is to explicitly mark every ubuntu-whatever target as phony. 2. Remove code duplication for making packages for different distros. 3. Add missing ubuntu (cosmic, disco) and debian (buster) to the appropriate targets. 4. As a side effect, bash completion now lists all the distros to be build. 5. Exclude raspbian from deb target as it can only be built on ARM. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
|
|
Can't figure out the CI failure, what do I need to look for? |
|
@kolyshkin looks like this is the failure; https://jenkins.dockerproject.org/job/docker/job/docker-ce-packaging/job/PR-357/3/execution/node/160/log/ |
1. A symbol % is not working as expected in PHONY targets, so e.g. fedora-30 was not being rebuild each time, because fedora-30 directory exists. The fix is to explicitly mark every fedora-NN target as phony. 2. Remove code duplication for making packages for different distros. 3. As a side effect, bash completion now lists all the distros to be build. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Instead of dynamically getting list of distros to build for, rely on the corresponding targets in sub-Makefiles. This also ensures that deb/Makefile and rpm/Makefile will have up-to-date list of distros included. This also fixes the following bug: > $ make deb > for p in raspbian-stretch ubuntu-bionic ubuntu-disco ubuntu-xenial debbuild/ubuntu-disco ubuntu-cosmic debian-buster debian-stretch; do \ > ... As you can see, `debbuild/ubuntu-disco` should not be included but it is. Could be prevented by using `-maxdepth 1` argument to `find`. While at it, amend the sub-Makefiles to print out the distro that we build for. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
|
ah, stupid copy-paste error ... my
Fixed, pushed |
Simplify and fix rpm/Makefile and deb/Makefile
A symbol
%is not working as expected inPHONYtargets, soe.g.
fedora-30orubuntu-cosmicwere not being rebuild each time,because
fedora-30andubuntu-cosmicdirectories exists.The fix is to explicitly mark every distro target as phony.
This also has the nice side effect of bash completion
working as it should!
Remove code duplication for making packages for different distros.
Add missing ubuntu releases (cosmic and disco).
Makefile: rely on targets in deb/rpm
Instead of dynamically getting list of distros to build for,
rely on the corresponding targets in sub-Makefiles. This also
ensures that deb/Makefile and rpm/Makefile will have up-to-date
list of distros included.
This also fixes the following bug:
As you can see,
debbuild/ubuntu-discoshould not be included but itis. Could be prevented by using
-maxdepth 1argument tofind.While at it, amend the sub-Makefiles to print out the distro
that we build for.