Skip to content
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

Provide a way to apply upstream patches to the image #209

Merged
merged 1 commit into from
Dec 11, 2020

Conversation

elfosardo
Copy link
Member

This change allows users to apply patches to the images during build
time directly from gerrit using the new arg PATCH.
At the moment, it's limited to a single project per image; future
patches will allow applying patches from multiple projects, and
also from local directories.

@metal3-io-bot metal3-io-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 26, 2020
@elfosardo
Copy link
Member Author

/assign @hardys

@elfosardo
Copy link
Member Author

/assign @dtantsur

patch-image.sh Outdated Show resolved Hide resolved
@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dtantsur, elfosardo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 27, 2020
@dtantsur
Copy link
Member

/test-integration

patch-image.sh Outdated Show resolved Hide resolved
patch-image.sh Outdated Show resolved Hide resolved
patch-image.sh Outdated Show resolved Hide resolved
@elfosardo elfosardo force-pushed the patch-image branch 2 times, most recently from afa4bfa to 8c0fa2b Compare November 2, 2020 15:23
@elfosardo
Copy link
Member Author

/test-integration

patch-image.sh Outdated Show resolved Hide resolved
@elfosardo elfosardo force-pushed the patch-image branch 3 times, most recently from db3f157 to 7890a45 Compare November 5, 2020 09:24
@elfosardo elfosardo requested a review from zaneb November 9, 2020 18:12
@elfosardo
Copy link
Member Author

/retest

@elfosardo
Copy link
Member Author

/test-integration

prepare-image.sh Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@elfosardo elfosardo force-pushed the patch-image branch 2 times, most recently from f4f06da to b958aa2 Compare December 7, 2020 09:55
Dockerfile Outdated
@@ -35,7 +35,7 @@ ENV PKGS_LIST=main-packages-list.txt
ARG EXTRA_PKGS_LIST

COPY ${PKGS_LIST} ${EXTRA_PKGS_LIST} /tmp/
Copy link
Member

Choose a reason for hiding this comment

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

A previous version of this PR included "${PATCH_LIST}" in this line, but its now gone, the weird thing is that it still works, this brought me down a bit of a rabbit hole. As far as I can see leaving "EXTRA_PKGS_LIST" blank results in the copy command treating it as a "*", so the entire contents of the local directory get copied into /tmp (including my PATCH_LIST file). So it works but isn't what we would want as the /tmp directory is getting cluttered in the image.

Copy link
Member Author

@elfosardo elfosardo Dec 7, 2020

Choose a reason for hiding this comment

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

@derekhiggins we saw this behavior in other situations and this is actually a bug in podman, although I can't find the exact reference now
the ${PATCH_LIST} is actually needed here, thanks for catching this
the alternative would be providing placeholders for empy files, but that seems to bring to other issues also related to podman behavior
this was actually working fine until version 1.6.4

This change allows users to apply patches to the images during build
time directly from gerrit using the new arg PATCH.
At the moment, it's limited to upstream projects with patches on
gerrit; future changes will allow different sources, including
local directories.
@derekhiggins
Copy link
Member

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 8, 2020
@elfosardo
Copy link
Member Author

/test-integration

@metal3-io-bot metal3-io-bot merged commit a4b2254 into metal3-io:master Dec 11, 2020
dtantsur pushed a commit to dtantsur/ironic-image that referenced this pull request Sep 6, 2021
Bug 1998528: Sync latest bugfix code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants