diff options
Diffstat (limited to '.copr')
-rw-r--r-- | .copr/Makefile | 4 | ||||
-rw-r--r-- | .copr/prepare.sh | 17 |
2 files changed, 14 insertions, 7 deletions
diff --git a/.copr/Makefile b/.copr/Makefile index 71142920b..465a52b15 100644 --- a/.copr/Makefile +++ b/.copr/Makefile @@ -8,11 +8,11 @@ SHORT_COMMIT ?= $(shell git rev-parse --short=8 HEAD) srpm: mkdir -p $(topdir) sh $(current_dir)/prepare.sh - rpmbuild -bs -D "dist %{nil}" -D "_sourcedir build/" -D "_srcrpmdir $(outdir)" -D "_topdir $(topdir)" --nodeps contrib/spec/podman.spec + rpmbuild -bs -D "dist %{nil}" -D "_sourcedir build/" -D "_srcrpmdir $(outdir)" -D "_topdir $(topdir)" --nodeps ${extra_arg:-""} contrib/spec/podman.spec build_binary: mkdir -p $(topdir) - rpmbuild --rebuild -D "_rpmdir $(outdir)" -D "_topdir $(topdir)" $(outdir)/podman-*.git$(SHORT_COMMIT).src.rpm + rpmbuild --rebuild -D "_rpmdir $(outdir)" -D "_topdir $(topdir)" ${extra_arg:-""} $(outdir)/podman-*.git$(SHORT_COMMIT).src.rpm clean: rm -fr rpms diff --git a/.copr/prepare.sh b/.copr/prepare.sh index d8ad34d08..713cdc2ee 100644 --- a/.copr/prepare.sh +++ b/.copr/prepare.sh @@ -1,12 +1,14 @@ #!/bin/sh -euf -set -x +set -euxo pipefail OS_TEST=${OS_TEST:=0} if [ ! -e /usr/bin/git ]; then dnf -y install git-core fi -git fetch --unshallow || : +if [ -f $(git rev-parse --git-dir)/shallow ]; then + git fetch --unshallow +fi COMMIT=$(git rev-parse HEAD) COMMIT_SHORT=$(git rev-parse --short=8 HEAD) @@ -26,7 +28,12 @@ if [ ${OS_TEST} -eq 0 ]; then sed -i "s/${BR}/${NEWBR}/g" contrib/spec/podman.spec fi -mkdir build/ +mkdir -p build/ git archive --prefix "libpod-${COMMIT_SHORT}/" --format "tar.gz" HEAD -o "build/libpod-${COMMIT_SHORT}.tar.gz" -git clone https://github.com/containers/conmon -cd conmon && git checkout 6f3572558b97bc60dd8f8c7f0807748e6ce2c440 && git archive --prefix "conmon/" --format "tar.gz" HEAD -o "../build/conmon.tar.gz" +if [ ! -d conmon ]; then + git clone -n --quiet https://github.com/containers/conmon +fi +pushd conmon +git checkout 6f3572558b97bc60dd8f8c7f0807748e6ce2c440 +git archive --prefix "conmon/" --format "tar.gz" HEAD -o "../build/conmon.tar.gz" +popd |