-
Notifications
You must be signed in to change notification settings - Fork 785
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4870 from lsm5/packit-downstream
[CI:BUILD] Packit: add jobs for downstream Fedora package builds
- Loading branch information
Showing
4 changed files
with
116 additions
and
103 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script will update the goimports in the rpm spec for downstream fedora | ||
# packaging, via the `propose-downstream` packit action. | ||
# The goimports don't need to be present upstream. | ||
|
||
set -eo pipefail | ||
|
||
PACKAGE=buildah | ||
# script is run from git root directory | ||
SPEC_FILE=rpm/$PACKAGE.spec | ||
|
||
sed -i '/Provides: bundled(golang.*/d' $SPEC_FILE | ||
|
||
GO_IMPORTS=$(golist --imported --package-path github.com/containers/$PACKAGE --skip-self | sort -u | xargs -I{} echo "Provides: bundled(golang({}))") | ||
|
||
awk -v r="$GO_IMPORTS" '/^# vendored libraries/ {print; print r; next} 1' $SPEC_FILE > temp && mv temp $SPEC_FILE |