commit: 9234861af8572d3b2f2c6ab97e778f24ee70da20 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> AuthorDate: Tue Jun 24 05:58:24 2025 +0000 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> CommitDate: Tue Jun 24 05:59:17 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9234861a
dev-util/schroot: add 1.6.13_p7 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> dev-util/schroot/Manifest | 1 + .../files/schroot-1.6.13_p7-build-fixes.patch | 72 ++++++++++ .../schroot/files/schroot-1.6.13_p7-cmake4.patch | 12 ++ dev-util/schroot/schroot-1.6.13_p7.ebuild | 160 +++++++++++++++++++++ 4 files changed, 245 insertions(+) diff --git a/dev-util/schroot/Manifest b/dev-util/schroot/Manifest index 581a1f01e52a..be46effe1082 100644 --- a/dev-util/schroot/Manifest +++ b/dev-util/schroot/Manifest @@ -1,2 +1,3 @@ DIST schroot-1.6.13.tar.gz 687581 BLAKE2B 5054407e545f39258df7598dbc233a836f6a86a02b4d0f3368109fd3edaea543fde6f81cfc6fedcdd6124490a3d5bc4d3a7e113ebe5ba2cfe7ec2c204f9cd0f4 SHA512 a250a02eb2384f1c27a9ff6479b77647a7a19b96b3b4e9d63e32a5dabe6ef3a3b1e2efaf98ddd9db93ded50fc93595ce545b0f0247c4a9e481349adafe806c2d DIST schroot_1.6.13-2.debian.tar.xz 110752 BLAKE2B 77c877e13541968ffd4edaa04c1a846e9deb19a3670088c19cdf3a217acfc2521d2b8d8dec7b8e6188b107f793af6152d5724fd596a9c62f6c9b57f2c30d57b0 SHA512 8fd7e7f95131285ec49bda3d9ccc6ba025976009c382998ef183142d2e3e288b7936e2c8ec6532870b601f62b460d577920d9a801b789f0d1bf7ee31b45356c3 +DIST schroot_1.6.13-7.debian.tar.xz 120000 BLAKE2B 2b83cf53afbb5a2191f158cc9fdd7d0c46c0c4e6a1c0be96bb9c81574088471abfa4cda295108391b480c15d32d61f410f1ab9160f0d9d8a5b8ef6c300fcb60f SHA512 720519bb63642d675c3f301f2e9c31365712dea870806aa2e8b4aa437523413a4a2a5f06bccce1030d96cbf4d7b2fd0fb19f304d129d41b03e97e4e81165d9fe diff --git a/dev-util/schroot/files/schroot-1.6.13_p7-build-fixes.patch b/dev-util/schroot/files/schroot-1.6.13_p7-build-fixes.patch new file mode 100644 index 000000000000..aff18c084731 --- /dev/null +++ b/dev-util/schroot/files/schroot-1.6.13_p7-build-fixes.patch @@ -0,0 +1,72 @@ +https://codeberg.org/shelter/reschroot/pulls/5 +https://bugs.gentoo.org/739034 +https://bugs.gentoo.org/715514 + +From 56b0c8ac846c18002e32e93629ae04a0a6281706 Mon Sep 17 00:00:00 2001 +From: Sam James <[email protected]> +Date: Mon, 26 Sep 2022 20:52:54 +0100 +Subject: [PATCH 1/3] Fix libcxx build without <tr1/*> (use <memory> if + available) + +With Clang & libcxx 15, tr1/* doesn't seem to be available, +which is fine, as we can use the proper <memory> header +instead. + +We already do this in several other locations. Fall back +to tr1 and Boost as before. + +Signed-off-by: Sam James <[email protected]> +--- a/bin/schroot-base/schroot-base-options.h ++++ b/bin/schroot-base/schroot-base-options.h +@@ -27,7 +27,9 @@ + #include <string> + #include <stdexcept> + +-#ifdef HAVE_TR1_MEMORY ++#ifdef HAVE_MEMORY_SHARED_PTR ++#include <memory> ++#elif HAVE_TR1_MEMORY + #include <tr1/memory> + #elif HAVE_BOOST_SHARED_PTR_HPP + #include <boost/shared_ptr.hpp> +--- a/bin/schroot/schroot-options-base.h ++++ b/bin/schroot/schroot-options-base.h +@@ -27,7 +27,9 @@ + #include <string> + #include <vector> + +-#ifdef HAVE_TR1_MEMORY ++#ifdef HAVE_MEMORY_SHARED_PTR ++#include <memory> ++#elif HAVE_TR1_MEMORY + #include <tr1/memory> + #elif HAVE_BOOST_SHARED_PTR_HPP + #include <boost/shared_ptr.hpp> +From 5b00d06a567fe71328124ea53b92ddbd1bd8c6fd Mon Sep 17 00:00:00 2001 +From: Sam James <[email protected]> +Date: Mon, 26 Sep 2022 20:54:45 +0100 +Subject: [PATCH 3/3] Add <libintl.h> include for musl +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes error: +``` +/var/tmp/portage/dev-util/schroot-1.6.10_p7/work/schroot-1.6.10/sbuild/sbuild-feature.cc: In static member function ‘static std::ostream& sbuild::feature::print_features(std::ostream&)’: +/var/tmp/portage/dev-util/schroot-1.6.10_p7/work/schroot-1.6.10/sbuild/sbuild-feature.cc:48:40: error: ‘gettext’ was not declared in this scope + 48 | stream << feature % pos->first % gettext(pos->second.c_str()); + | ^~~~~~~ +``` + +Bug: https://bugs.gentoo.org/715514 +Signed-off-by: Sam James <[email protected]> +--- a/sbuild/sbuild-feature.cc ++++ b/sbuild/sbuild-feature.cc +@@ -19,6 +19,7 @@ + #include <config.h> + + #include <iostream> ++#include <libintl.h> + + #include "sbuild-feature.h" + diff --git a/dev-util/schroot/files/schroot-1.6.13_p7-cmake4.patch b/dev-util/schroot/files/schroot-1.6.13_p7-cmake4.patch new file mode 100644 index 000000000000..4f18357ebb7f --- /dev/null +++ b/dev-util/schroot/files/schroot-1.6.13_p7-cmake4.patch @@ -0,0 +1,12 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,8 +13,7 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see <http://www.gnu.org/licenses/>. + +-cmake_minimum_required(VERSION 2.8.12) +-cmake_policy(VERSION 2.8.12) ++cmake_minimum_required(VERSION 3.17) + + project(schroot) + diff --git a/dev-util/schroot/schroot-1.6.13_p7.ebuild b/dev-util/schroot/schroot-1.6.13_p7.ebuild new file mode 100644 index 000000000000..d369d52facbe --- /dev/null +++ b/dev-util/schroot/schroot-1.6.13_p7.ebuild @@ -0,0 +1,160 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit bash-completion-r1 cmake pam tmpfiles + +MY_P=${PN}_${PV/_p/-} + +DESCRIPTION="Utility to execute commands in a chroot environment" +HOMEPAGE="https://codeberg.org/shelter/reschroot" +SRC_URI="https://codeberg.org/shelter/reschroot/archive/release/re${P/%_p*}.tar.gz -> ${P/%_p*}.tar.gz + mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}.debian.tar.xz" +S="${WORKDIR}/re${PN}" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +IUSE="btrfs +dchroot debug doc lvm nls pam test zfs" +RESTRICT="!test? ( test )" + +COMMON_DEPEND=" + dev-libs/boost:= + >=sys-apps/util-linux-2.16 + btrfs? ( >=sys-fs/btrfs-progs-0.19-r2 ) + lvm? ( sys-fs/lvm2 ) + pam? ( sys-libs/pam ) + zfs? ( sys-fs/zfs ) +" + +DEPEND="${COMMON_DEPEND} + app-arch/xz-utils + sys-apps/groff + doc? ( + app-text/doxygen + media-gfx/graphviz + ) + nls? ( + >=app-text/po4a-0.40 + sys-devel/gettext + ) + test? ( >=dev-util/cppunit-1.10.0 ) +" +#sys-apps/debianutils +RDEPEND="${COMMON_DEPEND} + dchroot? ( !sys-apps/dchroot ) + nls? ( virtual/libintl ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.6.13_p7-build-fixes.patch + + # https://codeberg.org/shelter/reschroot/pulls/6 + "${FILESDIR}"/${PN}-1.6.13-resize-reserve.patch + + "${FILESDIR}"/${PN}-1.16.13_p2-boost-1.85.0.patch + + "${FILESDIR}"/${PN}-1.6.13_p7-cmake4.patch # bug #953913 +) + +src_unpack() { + unpack "${P/%_p*}".tar.gz + cd "${S}" + unpack ${MY_P}.debian.tar.xz +} + +src_prepare() { + sed -i -e 's/warn(/message(WARNING /' man/CMakeLists.txt || die + eapply "${S}"/debian/patches/*.patch + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -Dbtrfs-snapshot=$(usex btrfs) + -Ddchroot=$(usex dchroot) + -Ddchroot-dsa=$(usex dchroot) + -Ddebug=$(usex debug) + -Ddoxygen=$(usex doc) + -Dlvm-snapshot=$(usex lvm) + -Dnls=$(usex nls) + -Dpam=$(usex pam) + -Dtest=$(usex test) + -Dzfs-snapshot=$(usex zfs) + -Dbash_completion_dir="$(get_bashcompdir)" + -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc" + -DCMAKE_INSTALL_LOCALSTATEDIR="${EPREFIX}/var" + -DSCHROOT_MOUNT_DIR="${EPREFIX}/run/${PN}/mount" + + -DCMAKE_POLICY_DEFAULT_CMP0167="OLD" # FindBoost + -DBoost_NO_BOOST_CMAKE=ON # https://bugs.gentoo.org/791712 and https://bugs.gentoo.org/752120 + ) + if ! use nls; then + mycmakeargs+=(-DPO4A_EXECUTABLE=NOTFOUND) + fi + + cmake_src_configure +} + +src_compile() { + cmake_src_compile all $(usev doc) +} + +src_test() { + if [[ ${EUID} -ne 0 ]]; then + ewarn "Disabling tests because you are not root" + return 0 + fi + # -j1 to prevent race between test/setup-test-data and test/cleanup-test-data + cmake_src_test -j1 +} + +src_install() { + cmake_src_install + + # debian-stype PS1 for chroot + # checks for /etc/debian_chroot file, which is created by schroot + insinto /etc/bash/bashrc.d + doins "${FILESDIR}/schroot_prompt.sh" + + # gentoo /var/tmp/portage handler + # e.g. portage.base.tmpdir=/var/tmp/portage in config file + # will use a subdirectory of hosts $PORTAGE_TMPDIR + exeinto /etc/schroot/setup.d + doexe "${FILESDIR}/11gentoo" + + # support for zfs clone options. + # zfs.clone.options=com.sun:auto-snapshot=false + if use zfs; then + exeinto /etc/schroot/setup.d + doexe "${FILESDIR}/06zfscloneopts" + fi + + keepdir /var/lib/schroot/{session,unpack,union/{overlay,underlay}} + + docinto contrib/setup.d + dodoc contrib/setup.d/05customdir contrib/setup.d/09fsck contrib/setup.d/10mount-ssh + + newdoc debian/schroot.NEWS NEWS.debian + + newinitd "${FILESDIR}"/schroot.initd schroot + newconfd "${FILESDIR}"/schroot.confd schroot + newtmpfiles "${FILESDIR}"/schroot.tmpfilesd schroot.conf + + if use doc; then + docinto html/sbuild + dodoc "${BUILD_DIR}"/doc/sbuild/html/* + docinto html/schroot + dodoc "${BUILD_DIR}"/doc/schroot/html/* + fi + + if use pam; then + rm -f "${ED}"/etc/pam.d/schroot + pamd_mimic_system schroot auth account session + fi +} + +pkg_postinst() { + tmpfiles_process ${PN}.conf +}
