diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index a033b7d..a3b3e80 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -1463,7 +1463,7 @@ if testtag AX_USE_DEBIAN_PACKAGING; then -- @PACKAGER@ @BUILD_DATE@ EOF - BUILD_DEPENDS="debhelper, ${VCSDEPENDS} pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release, fakeroot, $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen, default-jre-headless|default-jre"; fi; if testtag AX_USE_PERLDOC; then echo -n ", libpod-tree-perl"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | libqt4-core | libqtcore4, qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)" + BUILD_DEPENDS="debhelper, fakeroot, ${VCSDEPENDS} pkg-config, automake, libtool, autotools-dev, pandoc, lsb-release, fakeroot, $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen, default-jre-headless|default-jre"; fi; if testtag AX_USE_PERLDOC; then echo -n ", libpod-tree-perl"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | libqt4-core | libqtcore4, qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)" to debian/control.in < /dev/null 2>&1; then docker exec ${DOCKER_ID} groupadd -g $(id -g) $(id -gn) fi if ! docker exec ${DOCKER_ID} getent passwd $(id -u) > /dev/null 2>&1; then - docker exec ${DOCKER_ID} useradd -m -u $(id -u) -g $(id -u) -d"${HOME}" $(id -un) + docker exec ${DOCKER_ID} useradd -m -u $(id -u) -g $(id -g) -d"${HOME}" $(id -un) fi case $mode in (deb|apt) @@ -255,6 +255,11 @@ enabled=1 gpgcheck=0 EOF 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 + docker exec -u $(id -u):$(id -g) ${DOCKER_ID} ./bootstrap.sh -c + TGZFILE=$(grep PACKAGE_STRING= configure | sed "s, ,-,g;s,PACKAGE_STRING=',,g;s,',.tar.gz,g") + touch $TGZFILE docker exec ${DOCKER_ID} ./resolve-rpmbuilddeps.sh ;; esac diff --git a/scripts/resolve-rpmbuilddeps.sh b/scripts/resolve-rpmbuilddeps.sh index 4dc9845..5c1e968 100755 --- a/scripts/resolve-rpmbuilddeps.sh +++ b/scripts/resolve-rpmbuilddeps.sh @@ -10,29 +10,19 @@ ## 1 2 3 4 5 6 7 8 ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 -INSTALL_TOOL=${INSTALL_TOOL:-$((test -x /usr/bin/zypper && echo zypper) || (test -x /usr/bin/dnf && echo dnf) || (test -x /usr/bin/yum && echo yum))} +INSTALL_TOOL=${INSTALL_TOOL:-$((test -x /usr/bin/zypper && echo zypper install -y) || (test -x /usr/bin/dnf && echo dnf install -y) || (test -x /usr/bin/yum && echo yum install -y) || (test -x /usr/sbin/urpmi && echo urpmi --auto))} SCHROOTNAME="$1" PACKAGE_NAME=$(sed -n 's/^ *m4_define(x_package_name, \(.*\)).*/\1/p' configure.ac) if test -n "${SCHROOTNAME}"; then - schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL} install -y rpm-build automake libtool subversion gcc-c++ pkgconfig - schroot -c ${SCHROOTNAME} -u root -- ./bootstrap.sh -c - TGZFILE=$(grep PACKAGE_STRING= configure | sed "s, ,-,g;s,PACKAGE_STRING=',,g;s,',.tar.gz,g") - touch $TGZFILE FILES=$(LANG= schroot -c ${SCHROOTNAME} -- rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p') - rm $TGZFILE if test -n "${FILES}"; then - schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL} install -y ${FILES} + schroot -c ${SCHROOTNAME} -u root -- ${INSTALL_TOOL} ${FILES} fi else - ${INSTALL_TOOL} install -y rpm-build automake libtool subversion gcc-c++ pkgconfig - ./bootstrap.sh -c - TGZFILE=$(grep PACKAGE_STRING= configure | sed "s, ,-,g;s,PACKAGE_STRING=',,g;s,',.tar.gz,g") - touch $TGZFILE FILES=$(LANG= rpmbuild -bb --clean --nobuild --define "_topdir ." --define "_sourcedir ." ${PACKAGE_NAME}.spec 2>&1 | sed -n 's, is needed by.*,,p') - rm $TGZFILE if test -n "${FILES}"; then - ${INSTALL_TOOL} install -y ${FILES} + ${INSTALL_TOOL} ${FILES} fi fi