From 2f91e2fe44e358c6324a3f31f914c9bdb99e436d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Thu, 8 Dec 2016 15:59:53 +0000 Subject: [PATCH] updates for rpm distros --- scripts/ax_init_standard_project.m4 | 7 +++++-- scripts/build-in-docker.sh | 17 ++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/scripts/ax_init_standard_project.m4 b/scripts/ax_init_standard_project.m4 index e356162..640b5e1 100644 --- a/scripts/ax_init_standard_project.m4 +++ b/scripts/ax_init_standard_project.m4 @@ -196,7 +196,7 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ CHANGELOG=$(.*,\1,') - PACKAGER=$(gpg -K 2>/dev/null | sed -n 's,uid *\(\[[ultimate\]] *\)\?,,p' | head -1) + PACKAGER=$(gpg -K --lock-never 2>/dev/null | sed -n 's,uid *\(\[[ultimate\]] *\)\?,,p' | head -1) if -z "${PACKAGER}"; then PACKAGER="$AUTHOR" fi @@ -220,6 +220,8 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ SOURCE_DOWNLOAD="${SOURCE_DOWNLOAD:-${AUTHOR_URL}/downloads/${PACKAGE_NAME}}" AX_SUBST(PROJECT_URL) AX_SUBST(SOURCE_DOWNLOAD) + VENDOR=$((lsb_release -is 2>/dev/null || echo unknown) | tr ' ' '_') + AX_SUBST(VENDOR) DISTRO=$(lsb_release -sc 2>/dev/null || uname -s 2>/dev/null) AX_SUBST(DISTRO) ARCH=$((@<:@@<:@ $(uname -sm) =~ 64 @:>@@:>@ && echo amd64) || (@<:@@<:@ $(uname -sm) =~ 'i?86' @:>@@:>@ && echo i386 || uname -sm)) @@ -560,6 +562,7 @@ AC_DEFUN([AX_USE_RPM_PACKAGING], [ EXTRA_DIST += \${PACKAGE_NAME}.spec.in rpm: dist rpmbuild -ba --define "_topdir \$\$(pwd)" --define "_sourcedir \$\$(pwd)" \${PACKAGE_NAME}.spec + rpmsign --define "_gpg_name \${PACKAGER}" --addsign RPMS/*/*.rpm SRPMS/*.rpm clean-rpm-targets: -rm -rf BUILD BUILDROOT RPMS SPECS SRPMS distclean-rpm-targets: diff --git a/scripts/build-in-docker.sh b/scripts/build-in-docker.sh index bdb5196..367d125 100755 --- a/scripts/build-in-docker.sh +++ b/scripts/build-in-docker.sh @@ -158,7 +158,8 @@ function traperror() { read fi echo -n " ... cleanup docker: " - docker rm -f "${DOCKER_ID}" + docker stop "${DOCKER_ID}" || true + docker rm "${DOCKER_ID}" echo "returning status: $e" echo "--->" exit $e @@ -242,7 +243,7 @@ case $mode in done docker exec ${DOCKER_ID} ./resolve-debbuilddeps.sh ;; - (rpm|yum|dnf|zypper) + (rpm|yum|dnf|zypper|urpmi) if [[ "$img" =~ "centos" ]]; then docker exec ${DOCKER_ID} yum install -y redhat-lsb docker exec -i ${DOCKER_ID} bash -c 'cat > /etc/yum.repos.d/wandisco-svn.repo' <