From fcadd452b680ac1005ce5b006479aef6f9da6de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 20 Aug 2022 15:51:41 +0700 Subject: [PATCH] schroot: update to 1.6.12. --- srcpkgs/schroot/patches/musl.patch | 25 ------- srcpkgs/schroot/patches/sbuild-i18n.patch | 31 ++++++++ srcpkgs/schroot/patches/schroot-cppunit.patch | 11 --- srcpkgs/schroot/patches/test-chown.patch | 8 +++ srcpkgs/schroot/template | 72 +++++++++++-------- 5 files changed, 81 insertions(+), 66 deletions(-) delete mode 100644 srcpkgs/schroot/patches/musl.patch create mode 100644 srcpkgs/schroot/patches/sbuild-i18n.patch delete mode 100644 srcpkgs/schroot/patches/schroot-cppunit.patch create mode 100644 srcpkgs/schroot/patches/test-chown.patch diff --git a/srcpkgs/schroot/patches/musl.patch b/srcpkgs/schroot/patches/musl.patch deleted file mode 100644 index a8b3d56fd2d4..000000000000 --- a/srcpkgs/schroot/patches/musl.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 73936a423227aa78b7682bdd3edc20643763807b Mon Sep 17 00:00:00 2001 -From: Andrea Brancaleoni -Date: Wed, 19 Sep 2018 11:22:47 +0200 -Subject: [PATCH] musl - ---- - sbuild/sbuild-feature.cc | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git sbuild/sbuild-feature.cc sbuild/sbuild-feature.cc -index 5ac4725..9902db3 100644 ---- a/sbuild/sbuild-feature.cc -+++ b/sbuild/sbuild-feature.cc -@@ -20,6 +20,8 @@ - - #include - -+#include -+ - #include "sbuild-feature.h" - - using namespace sbuild; --- -2.19.0 - diff --git a/srcpkgs/schroot/patches/sbuild-i18n.patch b/srcpkgs/schroot/patches/sbuild-i18n.patch new file mode 100644 index 000000000000..ff69d554cd9a --- /dev/null +++ b/srcpkgs/schroot/patches/sbuild-i18n.patch @@ -0,0 +1,31 @@ +--- a/sbuild/sbuild-auth-pam.cc ++++ b/sbuild/sbuild-auth-pam.cc +@@ -21,6 +21,7 @@ + #include "sbuild-auth-pam.h" + #include "sbuild-auth-pam-conv.h" + #include "sbuild-feature.h" ++#include "sbuild-i18n.h" + + #include + #include +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -176,7 +176,7 @@ if(GETTEXT_FOUND) + endif(GETTEXT_FOUND) + option(nls "Enable national language support (requires gettext)" ${NLS_DEFAULT}) + set(BUILD_NLS ${nls}) +-set(SBUILD_FEATURE_NLS ${pam}) ++set(SBUILD_FEATURE_NLS ${nls}) + + # UUID generation + check_include_file_cxx(uuid/uuid.h UUID_HEADER) +--- a/sbuild/sbuild-feature.cc ++++ b/sbuild/sbuild-feature.cc +@@ -21,6 +21,7 @@ + #include + + #include "sbuild-feature.h" ++#include "sbuild-i18n.h" + + using namespace sbuild; + diff --git a/srcpkgs/schroot/patches/schroot-cppunit.patch b/srcpkgs/schroot/patches/schroot-cppunit.patch deleted file mode 100644 index 3e11c73fd40b..000000000000 --- a/srcpkgs/schroot/patches/schroot-cppunit.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/configure.ac 2017-05-20 09:50:30.146864516 +0000 -+++ b/configure.ac 2017-05-20 09:51:26.216792794 +0000 -@@ -336,7 +336,7 @@ - [HAVE_UUID=yes], - [HAVE_UUID=no]) - --AM_PATH_CPPUNIT([1.10.0], [HAVE_CPPUNIT=yes]) -+PKG_CHECK_MODULES([CPPUNIT], [cppunit], [HAVE_CPPUNIT=yes], [HAVE_CPPUNIT=no]) - AM_CONDITIONAL([USE_UNIT_TESTS], [test -n "$HAVE_CPPUNIT"]) - - SCHROOT_CFLAGS="$UUID_CFLAGS" diff --git a/srcpkgs/schroot/patches/test-chown.patch b/srcpkgs/schroot/patches/test-chown.patch new file mode 100644 index 000000000000..c9d4e3919428 --- /dev/null +++ b/srcpkgs/schroot/patches/test-chown.patch @@ -0,0 +1,8 @@ +--- a/test/setup-test-data.cmake ++++ b/test/setup-test-data.cmake +@@ -5,4 +5,4 @@ rm -rf test/testdata + mkdir test/testdata + cp -r ${PROJECT_SOURCE_DIR}/test/*.ex* test/testdata + mkdir test/testdata/run-parts.ex2 +-chown -R root:root test/testdata ++# chown -R root:root test/testdata diff --git a/srcpkgs/schroot/template b/srcpkgs/schroot/template index 85416dee5e9c..3c64bad20d69 100644 --- a/srcpkgs/schroot/template +++ b/srcpkgs/schroot/template @@ -1,22 +1,27 @@ # Template file for 'schroot' pkgname=schroot reverts="1.7.2_9" -version=1.6.10 -revision=11 -_debian_version=3+deb9u1 -build_pie=yes -build_style=gnu-configure +version=1.6.12 +revision=1 +_debian_version=2 +build_style=cmake +# Upstream has dchroot OFF configure_args=" - --enable-dchroot - --enable-lvm-snapshot - --enable-btrfs-snapshot - --enable-block-device - --enable-loopback - --enable-uuid - BTRFS=/usr/bin/btrfs - BTRFSCTL=/usr/bin/btrfsctl - LVCREATE=/usr/sbin/lvcreate - LVREMOVE=/usr/sbin/lvremove" + -DSCHROOT_LIBEXEC_DIR=/usr/libexec/schroot + -Ddebug=OFF + -Ddchroot=ON + -Dbash_completion_dir=/usr/share/bash-completion/completions + -Dlvm-snapshot=ON + -Dbtrfs-snapshot=ON + -Dzfs-snapshot=ON + -Dblock-device=ON + -Dloopback=ON + -DLOSETUP_EXECUTABLE=/usr/sbin/losetup + -Duuid=ON + -DBTRFS_EXECUTABLE=/usr/sbin/btrfs + -DLVCREATE_EXECUTABLE=/usr/sbin/lvcreate + -DLVREMOVE_EXECUTABLE=/usr/sbin/lvremove + -DZFS_EXECUTABLE=/usr/sbin/zfs" conf_files=" /etc/schroot/minimal/nssdatabases /etc/schroot/minimal/fstab @@ -41,26 +46,33 @@ make_dirs=" /var/lib/schroot/session 0755 root root /var/lib/schroot/mount 0755 root root /etc/schroot/chroot.d 0755 root root" -hostmakedepends="cmake pkg-config automake libtool gettext xz" -makedepends="boost-devel pam-devel lockdev-devel libuuid-devel e2fsprogs-devel gettext-devel - libcppunit-devel" +hostmakedepends="pkg-config gettext xz po4a groff" +makedepends="boost-devel pam-devel lockdev-devel libuuid-devel + e2fsprogs-devel gettext-devel libcppunit-devel" short_desc="Allows users to execute commands in different chroots" -maintainer="Andrea Brancaleoni " -license="GPL-3" +maintainer="Orphaned " +license="GPL-3.0-only" homepage="https://wiki.debian.org/Schroot" -distfiles=" -${DEBIAN_SITE}/main/s/${pkgname}/${pkgname}_${version}.orig.tar.xz -${DEBIAN_SITE}/main/s/${pkgname}/${pkgname}_${version}-${_debian_version}.debian.tar.xz" -checksum=" -3ce8dfd9cb97b099e4b6d4ccec421d6cc8c9ef84574681e928a12badb5643d0b -56bc82fc8ae7f6ca7eef506ccc1dca1211b2c84d83efc50d24670b8bdb9ea8bb" +distfiles="${DEBIAN_SITE}/main/s/${pkgname}/${pkgname}_${version}.orig.tar.xz + ${DEBIAN_SITE}/main/s/${pkgname}/${pkgname}_${version}-${_debian_version}.debian.tar.xz" +skip_extraction="${pkgname}_${version}-${_debian_version}.debian.tar.xz" +checksum="0bed8a069856a82261046b2e549af60ee32b79ebcdbf642424f378ec7aea6b77 + 8ff03534007c6d55eb4032b637232954eaddba5cf18c91b42ff3016697ba0f93" nocross=yes -pre_configure() { - cat ../debian/patches/series | while read p; do - patch -p1 -i ../debian/patches/$p +pre_patch() { + rm -rf debian + bsdtar -xf "$XBPS_SRCDISTDIR/$pkgname-$version/$skip_extraction" + grep '^[^#]' debian/patches/series | while read p; do + msg_normal "Patching (Debian): $p\n" + patch -Np1 -s -F0 -i debian/patches/$p done - autoreconf -fi +} + +do_check() { + # expect to be run with root + cd build + ctest -E "(sbuild-chroot-config)" } post_install() {