sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (f6d652a2d55e2cd9f67bd8f619b078e4239cd71a)
- From: Ismael Luceno <scm AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
- Subject: [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (f6d652a2d55e2cd9f67bd8f619b078e4239cd71a)
- Date: Thu, 5 Sep 2024 17:39:55 +0000
GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:
utils/schroot/BUILD
| 8
utils/schroot/CONFIGURE
| 1
utils/schroot/DEPENDS
| 45 ++--
utils/schroot/DETAILS
| 16 -
utils/schroot/HISTORY
| 10
utils/schroot/patches/0001-Fix-build-with-Boost-1.85.0.patch
| 58 +++++
utils/schroot/patches/0001-Fix-libcxx-build-without-tr1-use-memory-if.patch
| 55 +++++
utils/schroot/patches/0001-sbuild-util-use-resize-instead-of-reserve.patch
| 105 ++++++++++
utils/schroot/patches/0002-Fix-localename-type.patch
| 41 +++
9 files changed, 311 insertions(+), 28 deletions(-)
New commits:
commit f6d652a2d55e2cd9f67bd8f619b078e4239cd71a
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>
schroot 1.6.13
diff --git a/utils/schroot/BUILD b/utils/schroot/BUILD
index cf00fff..3303dcb 100755
--- a/utils/schroot/BUILD
+++ b/utils/schroot/BUILD
@@ -1,5 +1,5 @@
-OPTS+=' --enable-shared --disable--static' &&
-case "$HOST" in
- (*-gnu) LDFLAGS+=" -lintl" ;;
-esac &&
+#OPTS+=' --enable-shared --disable--static' &&
+#case "$HOST" in
+# (*-gnu) LDFLAGS+=" -lintl" ;;
+#esac &&
default_build
diff --git a/utils/schroot/CONFIGURE b/utils/schroot/CONFIGURE
new file mode 100755
index 0000000..5bb7db9
--- /dev/null
+++ b/utils/schroot/CONFIGURE
@@ -0,0 +1 @@
+. "$GRIMOIRE"/CMAKE_CONFIGURE
\ No newline at end of file
diff --git a/utils/schroot/DEPENDS b/utils/schroot/DEPENDS
index f198d75..cb4c637 100755
--- a/utils/schroot/DEPENDS
+++ b/utils/schroot/DEPENDS
@@ -1,18 +1,31 @@
-depends -sub "PROGRAM_OPTIONS REGEX IOSTREAMS" boost &&
-depends -sub CXX gcc &&
-depends lockdev &&
+. "$GRIMOIRE"/CMAKE_DEPENDS &&
+depends -sub "PROGRAM_OPTIONS REGEX IOSTREAMS" boost &&
+depends -sub CXX gcc &&
+depends lockdev &&
+depends perl &&
-optional_depends doxygen '--enable-doxygen' \
- '--disable-doxygen' \
- 'build documentation' &&
-optional_depends e2fsprogs \
- '--enable-uuid' \
- '--disable-uuid' \
- 'support for UUIDs' &&
-optional_depends linux-pam \
- '--enable-pam' \
- '--disable-pam' \
- 'PAM support' &&
+optional_depends doxygen \
+ -Ddoxygen=ON \
+ -Ddoxygen=OFF \
+ 'build documentation' &&
+optional_depends e2fsprogs \
+ -Duuid=ON \
+ -Duuid=OFF \
+ 'support for UUIDs' &&
+optional_depends linux-pam \
+ -Dpam=ON \
+ -Dpam=OFF \
+ 'PAM support' &&
+optional_depends GETTEXT \
+ -Dnls=ON \
+ -Dnls=OFF \
+ 'for Native Language Support'
-# XXX fails to build without gettext
-depends GETTEXT --enable-nls
+#option(dchroot "Enable dchroot compatibility" OFF)
+#option(dchroot-dsa "Enable dchroot-dsa compatibility" OFF)
+#option(lvm-snapshot "Enable support for LVM snapshots (requires LVM)"
${LVMSNAP_DEFAULT})
+#option(zfs-snapshot "Enable support for ZFS snapshots (requires ZFS)"
${ZFSSNAP_DEFAULT})
+#option(btrfs-snapshot "Enable support for btrfs snapshots (requires Btrfs)"
${BTRFSSNAP_DEFAULT})
+#option(block-device "Enable support for block devices" ${BLOCKDEV_DEFAULT})
+#option(loopback "Enable support for loopback mounts" ${LOOPBACK_DEFAULT})
+#option(union "Enable support for union mounts" ${UNION_DEFAULT})
diff --git a/utils/schroot/DETAILS b/utils/schroot/DETAILS
index faa12b6..6e19716 100755
--- a/utils/schroot/DETAILS
+++ b/utils/schroot/DETAILS
@@ -1,14 +1,14 @@
+# Watch: https://codeberg.org/shelter/reschroot/releases
+. "$GRIMOIRE"/CMAKE_FUNCTIONS
SPELL=schroot
- VERSION=1.6.10
-
SOURCE_HASH=sha512:25155989c7811ab4c7bf3cdceaa8d0ffb12f08388143891def96fcd205f1cc401dad9a74f0e9a9ef8610d50174ff8319a8368401431dc87e1a11c0241e61fcbe
- PATCHLEVEL=1
-# SOURCE_GPG=gurus.gpg:$SOURCE.sign:WORKS_FOR_ME
- SOURCE=${SPELL}_$VERSION.orig.tar.xz
- SOURCE_URL[0]=http://ftp.de.debian.org/debian/pool/main/s/schroot/$SOURCE
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
+ VERSION=1.6.13
+
SOURCE_HASH=sha512:a250a02eb2384f1c27a9ff6479b77647a7a19b96b3b4e9d63e32a5dabe6ef3a3b1e2efaf98ddd9db93ded50fc93595ce545b0f0247c4a9e481349adafe806c2d
+ SOURCE="reschroot-$VERSION.tar.gz"
+
SOURCE_URL[0]="https://codeberg.org/shelter/reschroot/archive/release/$SOURCE"
+SOURCE_DIRECTORY="$BUILD_DIRECTORY/reschroot"
LICENSE[0]=GPL
DOCS="NEWS README"
- WEB_SITE=http://alioth.debian.org/projects/buildd-tools/
+ WEB_SITE='https://codeberg.org/shelter/reschroot'
ENTERED=20080412
SHORT='User-runable chroots'
cat << EOF
diff --git a/utils/schroot/HISTORY b/utils/schroot/HISTORY
index e11bf1b..533fab7 100644
--- a/utils/schroot/HISTORY
+++ b/utils/schroot/HISTORY
@@ -1,3 +1,13 @@
+2024-09-05 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD, CONFIGURE, DEPENDS, DETAILS: updated spell to 1.6.13
+ updated WEB_SITE
+ * patches/0001-Fix-build-with-Boost-1.85.0.patch,
+ patches/0001-Fix-libcxx-build-without-tr1-use-memory-if.patch,
+ patches/0002-Fix-localename-type.patch:
+ build fixes
+ * patches/0001-sbuild-util-use-resize-instead-of-reserve.patch:
+ memory allocation bug fixes
+
2022-03-16 Ismael Luceno <ismael AT iodev.co.uk>
* BUILD: removed -lintl from LDFLAGS for musl
* patches/0001-musl.patch: removed, replaced
diff --git a/utils/schroot/patches/0001-Fix-build-with-Boost-1.85.0.patch
b/utils/schroot/patches/0001-Fix-build-with-Boost-1.85.0.patch
new file mode 100644
index 0000000..2e57cd7
--- /dev/null
+++ b/utils/schroot/patches/0001-Fix-build-with-Boost-1.85.0.patch
@@ -0,0 +1,58 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Sam James <sam AT gentoo.org>
+Date: Tue, 23 Apr 2024 13:16:39 +0200
+Subject: [PATCH] Fix build with Boost 1.85.0
+
+Ref: https://bugs.gentoo.org/930499
+Ref: https://bugs.gentoo.org/933188
+Origin: Gentoo
+Upstream-Status: Unknown
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ sbuild/sbuild-chroot-config.cc | 1 +
+ sbuild/sbuild-run-parts.cc | 1 +
+ sbuild/sbuild-util.cc | 2 --
+ test/sbuild-run-parts.cc | 1 +
+ 4 files changed, 3 insertions(+), 2 deletions(-)
+
+--- a/sbuild/sbuild-chroot-config.cc
++++ b/sbuild/sbuild-chroot-config.cc
+@@ -31,6 +31,7 @@
+ #include <cstdlib>
+ #include <cstring>
+
++#include <boost/filesystem/directory.hpp>
+ #include <boost/filesystem/operations.hpp>
+
+ #include <sys/types.h>
+--- a/sbuild/sbuild-run-parts.cc
++++ b/sbuild/sbuild-run-parts.cc
+@@ -29,6 +29,7 @@
+ #include <syslog.h>
+
+ #include <boost/format.hpp>
++#include <boost/filesystem/directory.hpp>
+ #include <boost/filesystem/operations.hpp>
+
+ using boost::format;
+--- a/sbuild/sbuild-util.cc
++++ b/sbuild/sbuild-util.cc
+@@ -35,8 +35,6 @@
+ #include <time.h>
+ #endif
+
+-#include <boost/filesystem/convenience.hpp>
+-
+ using namespace sbuild;
+
+ namespace
+--- a/test/sbuild-run-parts.cc
++++ b/test/sbuild-run-parts.cc
+@@ -23,6 +23,7 @@
+ #include <iostream>
+ #include <sstream>
+
++#include <boost/filesystem/exception.hpp>
+ #include <boost/filesystem/operations.hpp>
+
+ #include <cppunit/extensions/HelperMacros.h>
diff --git
a/utils/schroot/patches/0001-Fix-libcxx-build-without-tr1-use-memory-if.patch
b/utils/schroot/patches/0001-Fix-libcxx-build-without-tr1-use-memory-if.patch
new file mode 100644
index 0000000..9662a6c
--- /dev/null
+++
b/utils/schroot/patches/0001-Fix-libcxx-build-without-tr1-use-memory-if.patch
@@ -0,0 +1,55 @@
+From 56b0c8ac846c18002e32e93629ae04a0a6281706 Mon Sep 17 00:00:00 2001
+From: Sam James <sam AT gentoo.org>
+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 <sam AT gentoo.org>
+Ref: https://bugs.gentoo.org/739034
+Ref: https://bugs.gentoo.org/715514
+Origin: Gentoo
+Upstream-Status: Merged [https://codeberg.org/shelter/reschroot/pulls/5]
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ bin/schroot-base/schroot-base-options.h | 4 +++-
+ bin/schroot/schroot-options-base.h | 4 +++-
+ sbuild/sbuild-basic-keyfile.tcc | 2 +-
+ sbuild/sbuild-feature.cc | 1 +
+ 4 files changed, 8 insertions(+), 3 deletions(-)
+
+--- 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>
+--
+Fixed up by sm-checkpatch 0.1
+
diff --git
a/utils/schroot/patches/0001-sbuild-util-use-resize-instead-of-reserve.patch
b/utils/schroot/patches/0001-sbuild-util-use-resize-instead-of-reserve.patch
new file mode 100644
index 0000000..7e7108b
--- /dev/null
+++
b/utils/schroot/patches/0001-sbuild-util-use-resize-instead-of-reserve.patch
@@ -0,0 +1,105 @@
+From 6d7a762d6d630548ed558e0de8ddf04f3b0a69fc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen AT aarsen.me>
+Date: Sat, 14 Jan 2023 22:53:20 +0100
+Subject: [PATCH] sbuild-util: use resize instead of reserve
+
+Using reserved but uninitialized space is invalid, and, additionally,
+reserve is not required to allocate memory or change the buffer size at
+all.
+
+Origin: Gentoo
+Upstream-Status: Submitted [https://codeberg.org/shelter/reschroot/pulls/6]
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ sbuild/sbuild-util.cc | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+--- a/sbuild/sbuild-util.cc
++++ b/sbuild/sbuild-util.cc
+@@ -624,17 +624,17 @@ void
+ sbuild::passwd::query_uid (uid_t uid)
+ {
+ buffer_type::size_type size = 1 << 7;
+- buffer.reserve(size);
++ buffer.resize(size);
+ int error;
+
+ ::passwd *pwd_result;
+
+ while ((error = getpwuid_r(uid, this,
+- &buffer[0], buffer.capacity(),
++ &buffer[0], buffer.size(),
+ &pwd_result)) == ERANGE)
+ {
+ size <<= 1;
+- buffer.reserve(size);
++ buffer.resize(size);
+ }
+
+ if (pwd_result)
+@@ -647,17 +647,17 @@ void
+ sbuild::passwd::query_name (const char *name)
+ {
+ buffer_type::size_type size = 1 << 8;
+- buffer.reserve(size);
++ buffer.resize(size);
+ int error;
+
+ ::passwd *pwd_result;
+
+ while ((error = getpwnam_r(name, this,
+- &buffer[0], buffer.capacity(),
++ &buffer[0], buffer.size(),
+ &pwd_result)) == ERANGE)
+ {
+ size <<= 1;
+- buffer.reserve(size);
++ buffer.resize(size);
+ }
+
+ if (pwd_result)
+@@ -733,17 +733,17 @@ void
+ sbuild::group::query_gid (gid_t gid)
+ {
+ buffer_type::size_type size = 1 << 7;
+- buffer.reserve(size);
++ buffer.resize(size);
+ int error;
+
+ ::group *grp_result;
+
+ while ((error = getgrgid_r(gid, this,
+- &buffer[0], buffer.capacity(),
++ &buffer[0], buffer.size(),
+ &grp_result)) == ERANGE)
+ {
+ size <<= 1;
+- buffer.reserve(size);
++ buffer.resize(size);
+ }
+
+ if (grp_result)
+@@ -756,17 +756,17 @@ void
+ sbuild::group::query_name (const char *name)
+ {
+ buffer_type::size_type size = 1 << 8;
+- buffer.reserve(size);
++ buffer.resize(size);
+ int error;
+
+ ::group *grp_result;
+
+ while ((error = getgrnam_r(name, this,
+- &buffer[0], buffer.capacity(),
++ &buffer[0], buffer.size(),
+ &grp_result)) == ERANGE)
+ {
+ size <<= 1;
+- buffer.reserve(size);
++ buffer.resize(size);
+ }
+
+ if (grp_result)
+--
+2.30.2
+
diff --git a/utils/schroot/patches/0002-Fix-localename-type.patch
b/utils/schroot/patches/0002-Fix-localename-type.patch
new file mode 100644
index 0000000..dad6f0b
--- /dev/null
+++ b/utils/schroot/patches/0002-Fix-localename-type.patch
@@ -0,0 +1,41 @@
+From 04a35b2c57b84e098c9cad75d36675a958e9075e Mon Sep 17 00:00:00 2001
+From: Sam James <sam AT gentoo.org>
+Date: Mon, 26 Sep 2022 20:54:16 +0100
+Subject: [PATCH 2/3] Fix localename type
+
+Needs to be a string.
+
+Fixes error:
+```
+/var/tmp/portage/dev-util/schroot-1.6.10_p7/work/schroot-1.6.10/sbuild/sbuild-basic-keyfile.tcc:217:18:
error: no viable overloaded '='
+ localename = std::locale::classic();
+ ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~
+/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/bits/basic_string.h:665:7:
note: candidate function not viable: no known conversion from 'const
std::locale' to 'const std::__cxx11::basic_string<char>' for 1st argument
+ operator=(const basic_string& __str)
+ ^
+[...]
+```
+
+Bug: https://bugs.gentoo.org/739034
+Signed-off-by: Sam James <sam AT gentoo.org>
+Origin: Gentoo
+Upstream-Status: Unknown
+Signed-off-by: Ismael Luceno <ismael AT sourcemage.org>
+---
+ sbuild/sbuild-basic-keyfile.tcc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sbuild/sbuild-basic-keyfile.tcc
++++ b/sbuild/sbuild-basic-keyfile.tcc
+@@ -214,7 +214,7 @@ sbuild::basic_keyfile<K, P>::get_locale_string
(group_name_type const& group,
+ }
+ catch (std::runtime_error const& e) // Invalid locale
+ {
+- localename = std::locale::classic();
++ localename = std::locale::classic().name();
+ }
+ std::string::size_type pos;
+ bool status = false;
+--
+Fixed up by sm-checkpatch 0.1
+
- [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (f6d652a2d55e2cd9f67bd8f619b078e4239cd71a), Ismael Luceno, 09/05/2024
Archive powered by MHonArc 2.6.24.