[X2Go-Commits] [buildscripts] 01/01: bin/build-rpm-package: convert rpmsign-unattended calls to shell-based loop, add verbose parameter. Part of #1154.
git-admin at x2go.org
git-admin at x2go.org
Wed Apr 19 16:48:19 CEST 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository buildscripts.
commit b18d4069bdf320cf880962934d5db1d35e5f2e50
Author: Mihai Moldovan <ionic at ionic.de>
Date: Wed Apr 19 16:47:59 2017 +0200
bin/build-rpm-package: convert rpmsign-unattended calls to shell-based loop, add verbose parameter. Part of #1154.
---
bin/build-rpm-package | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index 8bc42f8..e71a6b5 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -825,15 +825,16 @@ build_packages() {
typeset gpg_sign_with="${GPG_KEY}"
[ "${tmp_suse_major_version}" -lt "12" ] && gpg_sign_with="${GPG_KEY_EPEL5}"
- rpmsign-unattended -D "%_gpg_name ${gpg_sign_with}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/x86_64/"*.rpm
+ typeset rpmfile=''
+ find "${PKGDIST}/${l_DIST}/${l_CODENAME}/x86_64/" -type 'f' -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do rpmsign-unattended -v -D "%_gpg_name ${gpg_sign_with}" --addsign "${rpmfile}"; done
# also copy and sign source RPM's
# For information on why this weird -print0 | read -r -d '' construction works,
# refer to the first instance of this in this script.
- find "/var/cache/obs-build/${l_DIST}/${l_CODENAME}/x86_64/${BUILD_RESULT}/SRPMS/" -type f -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do
+ find "/var/cache/obs-build/${l_DIST}/${l_CODENAME}/x86_64/${BUILD_RESULT}/SRPMS/" -type 'f' -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do
cp "${rpmfile}" "$PKGDIST/${l_DIST}/${l_CODENAME}/SRPM/"
done
- rpmsign-unattended -D "%_gpg_name ${gpg_sign_with}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/"*.rpm
+ find "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/" -type 'f' -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do rpmsign-unattended -v -D "%_gpg_name ${gpg_sign_with}" --addsign "${rpmfile}"; done
else
exit 1
fi
@@ -862,11 +863,13 @@ build_packages() {
# /usr/lib/rpm/macros
# http://adminotes.blogspot.fr/2011/12/centos-6-rpm-sign-problem-v4-signatures.html
RPMMACRO_V3SIGN="%__gpg_sign_cmd %{__gpg} /usr/bin/gpg --force-v3-sigs --digest-algo=sha1 --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning -u \"%{_gpg_name}\" -sbo %{__signature_filename} %{__plaintext_filename}"
- rpmsign-unattended -D "%_gpg_name ${GPG_KEY_EPEL5}" -D "${RPMMACRO_V3SIGN}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/x86_64/"*.rpm
- rpmsign-unattended -D "%_gpg_name ${GPG_KEY_EPEL5}" -D "${RPMMACRO_V3SIGN}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/"*.rpm
+ typeset rpmfile=''
+ find "${PKGDIST}/${l_DIST}/${l_CODENAME}/x86_64/" -type 'f' -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do rpmsign-unattended -v -D "%_gpg_name ${GPG_KEY_EPEL5}" -D "${RPMMACRO_V3SIGN}" --addsign "${rpmfile}"; done
+ find "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/" -type 'f' -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do rpmsign-unattended -v -D "%_gpg_name ${GPG_KEY_EPEL5}" -D "${RPMMACRO_V3SIGN}" --addsign "${rpmfile}"; done
else
- rpmsign-unattended -D "%_gpg_name ${GPG_KEY}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/x86_64/"*.rpm
- rpmsign-unattended -D "%_gpg_name ${GPG_KEY}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/"*.rpm
+ typeset rpmfile=''
+ find "${PKGDIST}/${l_DIST}/${l_CODENAME}/x86_64/" -type 'f' -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do rpmsign-unattended -v -D "%_gpg_name ${GPG_KEY}" --addsign "${rpmfile}"; done
+ find "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/" -type 'f' -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do rpmsign-unattended -v -D "%_gpg_name ${GPG_KEY}" --addsign "${rpmfile}"; done
fi
cat "${PKGDIST}/${l_DIST}/${l_CODENAME}/x86_64/build.log"
else
@@ -904,7 +907,8 @@ build_packages() {
typeset gpg_sign_with="${GPG_KEY}"
[ "${tmp_suse_major_version}" -lt "12" ] && gpg_sign_with="${GPG_KEY_EPEL5}"
- rpmsign-unattended -D "%_gpg_name ${gpg_sign_with}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/i586/"*.rpm
+ typeset rpmfile=''
+ find "${PKGDIST}/${l_DIST}/${l_CODENAME}/i586/" -type 'f' -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do rpmsign-unattended -v -D "%_gpg_name ${gpg_sign_with}" --addsign "${rpmfile}"; done
# copy and later sign source RPM's, if needed (that is, not already generated by x86_64/noarch code above)
SEARCH_SRPM="$(find "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM" -type 'f' -iname "*.src.rpm" -print)"
@@ -914,7 +918,7 @@ build_packages() {
find "/var/cache/obs-build/${l_DIST}/${l_CODENAME}/i586/${BUILD_RESULT}/SRPMS/" -type 'f' -iname '*.src.rpm' -print0 | while read -r -d '' rpmfile; do
cp "${rpmfile}" "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/"
done
- rpmsign-unattended -D "%_gpg_name ${gpg_sign_with}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/"*.rpm
+ find "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/" -type 'f' -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do rpmsign-unattended -v -D "%_gpg_name ${gpg_sign_with}" --addsign "${rpmfile}"; done
fi
else
exit 1
@@ -945,11 +949,13 @@ build_packages() {
if [ "${l_DIST}" = "epel" ] && [ "${l_CODENAME}" = "5" ]; then
RPMMACRO_V3SIGN="%__gpg_sign_cmd %{__gpg} /usr/bin/gpg --force-v3-sigs --digest-algo=sha1 --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning -u \"%_gpg_name\" -sbo %{__signature_filename} %{__plaintext_filename}"
- rpmsign-unattended -D "%_gpg_name ${GPG_KEY_EPEL5}" -D "${RPMMACRO_V3SIGN}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/i386/"*.rpm
- [ "x${SIGN_SRPM}" = "x1" ] && rpmsign-unattended -D "%_gpg_name ${GPG_KEY_EPEL5}" -D "${RPMMACRO_V3SIGN}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/"*.rpm
+ typeset rpmfile=''
+ find "${PKGDIST}/${l_DIST}/${l_CODENAME}/i386/" -type 'f' -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do rpmsign-unattended -v -D "%_gpg_name ${GPG_KEY_EPEL5}" -D "${RPMMACRO_V3SIGN}" --addsign "${rpmfile}"; done
+ [ "x${SIGN_SRPM}" = "x1" ] && find "${PKGDIST}/${l_DIST}/${l_CODENAME}/SRPM/" -type 'f' -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do rpmsign-unattended -v -D "%_gpg_name ${GPG_KEY_EPEL5}" -D "${RPMMACRO_V3SIGN}" --addsign "${rpmfile}"; done
else
- rpmsign-unattended -D "%_gpg_name ${GPG_KEY}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/i386/"*.rpm
- [ "x$SIGN_SRPM" = "x1" ] && rpmsign-unattended -D "%_gpg_name ${GPG_KEY}" --addsign "${PKGDIST}/${l_DIST}/${l_CODENAME}/i386/"*.rpm
+ typeset rpmfile=''
+ find "${PKGDIST}/${l_DIST}/${l_CODENAME}/i386/" -type 'f' -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do rpmsign-unattended -v -D "%_gpg_name ${GPG_KEY}" --addsign "${rpmfile}"; done
+ [ "x$SIGN_SRPM" = "x1" ] && find "${PKGDIST}/${l_DIST}/${l_CODENAME}/i386/" -type 'f' -iname '*.rpm' -print0 | while read -r -d '' rpmfile; do rpmsign-unattended -v -D "%_gpg_name ${GPG_KEY}" --addsign "${rpmfile}"; done
fi
cat "${PKGDIST}/${l_DIST}/${l_CODENAME}/i386/build.log"
else
--
Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
More information about the x2go-commits
mailing list