Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Add patches to builds #8086
Conversation
nskaggs
added some commits
Nov 15, 2017
| @@ -49,6 +49,7 @@ godeps: | ||
| endif | ||
| build: godeps | ||
| + cat $(PWD)/patches/*.diff | patch -f -u -p1 -r- -d $(PWD)/../../../ |
wallyworld
Nov 15, 2017
Owner
We can't modify what is supposed to be a clean source tree - this will mess with people's repos.
nskaggs
Nov 15, 2017
Owner
Yea, everyone seems against overloading 'build'. I moved it to release-build, and added an 'undo' patches.
| + | ||
| +release-build: godeps | ||
| + cat $(PWD)/patches/*.diff | patch -f -u -p1 -r- -d $(PWD)/../../../ | ||
| + go build $(PROJECT)/... |
howbazaar
Nov 15, 2017
Owner
How about another target that does the relese build then remove patches.
|
Updated to add even more targets, and recursively cleanup after release-install |
|
@howbazaar can you review again please? |
| +build: godeps go-build | ||
| + | ||
| +add-patches: | ||
| + cat $(PWD)/patches/*.diff | patch -f -u -p1 -r- -d $(PWD)/../../../ |
wupeka
Nov 28, 2017
Member
Maybe create a .PATCHED file marking that the source tree is patched, added (and checked) in add-patches and removed in remove-patches? This way calling add-patches twice won't break anything
nskaggs
Nov 29, 2017
Owner
Calling add-patches twice will fail to re-apply the patch, but doesn't break anything. It can still be safely removed with remove-patches.
nskaggs
added some commits
Nov 29, 2017
|
$$merge$$ |
|
Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju |
|
Build failed: Tests failed |
|
Build failed: Tests failed |
nskaggs commentedNov 15, 2017
•
Edited 1 time
-
nskaggs
Nov 15, 2017
Description of change
This adds support for applying the patches during snap creation, or via a local build using the makefile. This effectively deprecates the old python script. The script has been left in for now until the CI build process has transitioned away from using it.
QA steps
Build juju with make build and snapcraft. Ensure the patches are applied as part of the process.