From 3ebcddba833f4b44a757a6f7ab421aa220b355e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Fri, 9 Dec 2016 15:51:51 +0000 Subject: [PATCH] fix build issues - utf-8 gpg uid still not supported for most rpm based distros --- scripts/ax_init_standard_project.m4 | 4 ++-- scripts/bootstrap.sh | 4 ++-- scripts/build-in-docker.sh | 8 +++----- scripts/resolve-debbuilddeps.sh | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/ax_init_standard_project.m4 b/scripts/ax_init_standard_project.m4 index b98b25e..0f7e41e 100644 --- a/scripts/ax_init_standard_project.m4 +++ b/scripts/ax_init_standard_project.m4 @@ -206,8 +206,8 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ AUTHOR_NAME=$(echo $AUTHOR | sed 's, *[[<(]].*$,,') AUTHOR_URL=$(echo $AUTHOR | sed 's,.*(\(http[[^)]]*\)).*,\1,') AUTHOR_MAIL=$(echo $AUTHOR | sed 's,.*<\(.*@.*\)>.*,\1,') - PACKAGER=$(gpg -K --lock-never 2>/dev/null | sed -n 's,uid *\(\[[ultimate\]] *\)\?,,p' | head -1) - if -z "${PACKAGER}"; then + PACKAGER=$(gpg -K --display-charset utf-8 --lock-never 2>/dev/null | sed -n 's,uid *\(\[[ultimate\]] *\)\?,,p' | head -1) + if test -z "${PACKAGER}"; then PACKAGER="$AUTHOR" fi AX_SUBST(AUTHOR) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 0a2b095..6ee652a 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -1534,7 +1534,7 @@ else fi) Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: gnupg, ${VCSDEPENDS} make, automake, autoconf, rpm-sign, rpm-build$( +BuildRequires: gnupg, ${VCSDEPENDS} make, automake, autoconf, rpm-build$( if testtag AX_USE_CXX; then echo -n ", binutils-devel, gcc-c++" fi @@ -1552,7 +1552,7 @@ BuildRequires: gnupg, ${VCSDEPENDS} make, automake, autoconf, rpm-sign, rpm-buil $(if testtag AX_USE_DOXYGEN; then echo -n "BuildRequires: graphviz"; fi) %endif %if 0%{?fedora} || 0%{?rhel} || 0%{?rhl} || 0%{?centos} || 0%{?centos_ver} || 0%{?centos_version} || 0%{?mageia} -BuildRequires: which, pkgconfig$( +BuildRequires: which, rpm-sign, pkgconfig$( if testtag AX_USE_LIBTOOL; then echo -n ", cppunit-devel" fi diff --git a/scripts/build-in-docker.sh b/scripts/build-in-docker.sh index d05e135..db5d561 100755 --- a/scripts/build-in-docker.sh +++ b/scripts/build-in-docker.sh @@ -10,7 +10,7 @@ mode="deb" img="ubuntu:latest" repos=() keys=() -envs=("-e HOME=/home/$(id -un)" "-e TERM=xterm" "-e DEBIAN_FRONTEND=noninteractive" "-e DEBCONF_NONINTERACTIVE_SEEN=true") +envs=("-e LANG=${LANG}" "-e HOME=/home/$(id -un)" "-e TERM=xterm" "-e DEBIAN_FRONTEND=noninteractive" "-e DEBCONF_NONINTERACTIVE_SEEN=true") dirs=("-v $(pwd):/workdir" "-v ${HOME}/.gnupg:/home/$(id -un)/.gnupg") packages=() targets="all check distcheck" @@ -216,6 +216,8 @@ if ! docker exec ${DOCKER_ID} getent passwd $(id -u) > /dev/null 2>&1; then fi case $mode in (deb|apt) + docker exec ${DOCKER_ID} locale-gen ${LANG} + docker exec ${DOCKER_ID} update-locale LANG=${LANG} OPTIONS='-o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew -y --force-yes --no-install-suggests --no-install-recommends' for f in 'libpam-systemd:amd64' 'policykit*' 'colord'; do docker exec ${DOCKER_ID} bash -c "echo 'Package: $f' >> /etc/apt/preferences" @@ -256,10 +258,6 @@ enabled=1 gpgcheck=0 EOF fi - UPDATE_TOOL=$((docker exec ${DOCKER_ID} test -x /usr/sbin/urpmi && echo urpmi.update -a) || true) - if test -n "${UPDATE_TOOL}"; then - docker exec ${DOCKER_ID} ${UPDATE_TOOL} - fi INSTALL_TOOL=$((docker exec ${DOCKER_ID} test -x /usr/bin/zypper && echo zypper install -y) || (docker exec ${DOCKER_ID} test -x /usr/bin/dnf && echo dnf install -y) || (docker exec ${DOCKER_ID} test -x /usr/bin/yum && echo yum install -y) || (docker exec ${DOCKER_ID} test -x /usr/sbin/urpmi && echo urpmi --auto)) docker exec ${DOCKER_ID} ${INSTALL_TOOL} rpm-build automake libtool subversion gcc-c++ pkgconfig wget #i=0 diff --git a/scripts/resolve-debbuilddeps.sh b/scripts/resolve-debbuilddeps.sh index 5ce3dd5..94c1ba1 100755 --- a/scripts/resolve-debbuilddeps.sh +++ b/scripts/resolve-debbuilddeps.sh @@ -35,7 +35,7 @@ TO_INSTALL= if test -e debian/control.in -a ! -e debian/control; then for f in $(sed -n 's, *AX_DEB_DEPEND_IFEXISTS(\([^)]*\)).*,\1,p' configure.ac); do - if test -n "$(${DO} apt-cache policy -q ${f})" && ! "$(${DO} apt-cache policy ${f} 2>&1 | grep -q 'N: Unable to locate package')" && ! ${DO} dpkg -l "${f}"; then + if test -n "$(${DO} apt-cache policy -q ${f})" && ((! $(${DO} apt-cache policy ${f} 2>&1 | grep -q 'N: Unable to locate package')) && (! ${DO} dpkg -l "${f}")); then TO_INSTALL+=" ${f}" fi done