File tree 1 file changed +15
-3
lines changed
1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 4
4
# packaging, via the `propose-downstream` packit action.
5
5
# The goimports don't need to be present upstream.
6
6
7
- set -eo pipefail
7
+ set -eox pipefail
8
8
9
9
PACKAGE=podman
10
10
# script is run from git root directory
11
11
SPEC_FILE=rpm/$PACKAGE .spec
12
12
13
- sed -i ' /Provides: bundled(golang.*/d' $SPEC_FILE
13
+ export GOPATH=~ /go
14
+ GOPATHDIR=$GOPATH /src/github.com/containers/
15
+ mkdir -p $GOPATHDIR
16
+ ln -sf $( pwd) $GOPATHDIR /.
17
+
18
+ # Packit sandbox doesn't allow root
19
+ # Install golist by downloading and extracting rpm
20
+ # We could handle this in packit `sandcastle` upstream itself
21
+ # but that depends on golist existing in epel
22
+ # https://github.com/packit/sandcastle/pull/186
23
+ dnf download golist
24
+ rpm2cpio golist-* .rpm | cpio -idmv
14
25
15
- GO_IMPORTS= $( golist --imported --package-path github.com/containers/ $PACKAGE --skip-self | sort -u | xargs -I{} echo " Provides: bundled(golang({})) " )
26
+ sed -i ' / Provides: bundled(golang.*/d ' $SPEC_FILE
16
27
28
+ GO_IMPORTS=$( ./usr/bin/golist --imported --package-path github.com/containers/$PACKAGE --skip-self | sort -u | xargs -I{} echo " Provides: bundled(golang({}))" )
17
29
awk -v r=" $GO_IMPORTS " ' /^# vendored libraries/ {print; print r; next} 1' $SPEC_FILE > temp && mv temp $SPEC_FILE
You can’t perform that action at this time.
0 commit comments