schroot: update to version 1.6.13, reboot of the schroot tool
authorJavier Marcet <javier@marcet.info>
Sat, 27 Aug 2022 15:14:38 +0000 (17:14 +0200)
committerRosen Penev <rosenp@gmail.com>
Fri, 9 Sep 2022 18:59:53 +0000 (11:59 -0700)
conceived and developed for many years by Roger Leigh

Signed-off-by: Javier Marcet <javier@marcet.info>
admin/schroot/Makefile
admin/schroot/files/schroot.init
admin/schroot/patches/01-openwrt.patch

index 65cccd676f8b4117a62115f032f49dbe5a3c49cc..967efdc0778892b0f6b28992060d986346790f3a 100644 (file)
@@ -1,23 +1,25 @@
 include $(TOPDIR)/rules.mk
 
-PKG_NAME:=schroot
-PKG_VERSION:=1.6.10
-PKG_RELEASE:=3
+PKG_NAME:=reschroot
+PKG_VERSION:=1.6.13
+PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.xz
-PKG_SOURCE_URL:=http://deb.debian.org/debian/pool/main/s/schroot
-PKG_HASH:=3ce8dfd9cb97b099e4b6d4ccec421d6cc8c9ef84574681e928a12badb5643d0b
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeberg.org/shelter/reschroot/archive/release
+PKG_HASH:=c05d6a1bb0210d401e6522eee2c465e0b43c6c98f7101d671f9e9ef88b3accf5
 
 PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
 PKG_LICENSE:=GPL-3.0-only
 PKG_LICENSE_FILES:=COPYING
 
-PKG_INSTALL:=1
-PKG_BUILD_PARALLEL:=1
-PKG_FIXUP:=autoreconf
+CMAKE_INSTALL:=1
+
+CMAKE_BINARY_SUBDIR:=build
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/$(PKG_NAME)
 
-include $(INCLUDE_DIR)/nls.mk
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
+include $(INCLUDE_DIR)/nls.mk
 
 define Package/schroot
   SECTION:=admin
@@ -30,7 +32,7 @@ define Package/schroot
        +SCHROOT_LVM:lvm2 \
        +SCHROOT_UUID:libuuid \
        $(INTL_DEPENDS)
-  URL:=https://salsa.debian.org/debian/schroot
+  URL:=https://codeberg.org/shelter/reschroot
 endef
 
 define Package/schroot/description
@@ -51,20 +53,21 @@ PKG_CONFIG_DEPENDS := \
        CONFIG_SCHROOT_LVM \
        CONFIG_SCHROOT_UUID
 
-CONFIGURE_ARGS += \
-       $(if $(CONFIG_SCHROOT_BTRFS),--enable,--disable)-btrfs-snapshot \
-       $(if $(CONFIG_SCHROOT_LOOPBACK),--enable,--disable)-loopback \
-       $(if $(CONFIG_SCHROOT_LVM),--enable,--disable)-lvm-snapshot \
-       $(if $(CONFIG_SCHROOT_UUID),--enable,--disable)-uuid \
-       --enable-block-device \
-       --enable-union \
-       --disable-dchroot \
-       --disable-dchroot-dsa \
-       --disable-csbuild \
-       --disable-debug \
-       --disable-pam \
-       --disable-doxygen \
-       --disable-rpath
+CMAKE_OPTIONS += \
+       -Dbtrfs-snapshot=$(if $(CONFIG_SCHROOT_BTRFS),ON,OFF) \
+       -Dloopback=$(if $(CONFIG_SCHROOT_LOOPBACK),ON,OFF) \
+       -Dlvm-snapshot=$(if $(CONFIG_SCHROOT_LVM),ON,OFF) \
+       -Duuid=$(if $(CONFIG_SCHROOT_UUID),ON,OFF) \
+       -Dblock-device=ON \
+       -Dunion=ON \
+       -Ddhcroot=OFF \
+       -Ddchroot-dsa=OFF \
+       -Ddebug=OFF \
+       -Ddoxygen=OFF \
+       -Dpam=OFF \
+       -Dtest=OFF \
+       -Duuid=OFF \
+       -Dzfs-snapshot=OFF
 
 define Package/schroot/install
        $(INSTALL_DIR) $(1)/usr/bin
@@ -73,7 +76,8 @@ define Package/schroot/install
        $(CP) -R $(PKG_INSTALL_DIR)/etc/schroot/* $(1)/etc/schroot
        $(INSTALL_DIR) $(1)/usr/lib/schroot
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libsbuild.* $(1)/usr/lib/
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/schroot/* $(1)/usr/lib/schroot/
+       $(INSTALL_DIR) $(1)/usr/libexec/schroot
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/schroot/schroot-* $(1)/usr/libexec/schroot/
        $(INSTALL_DIR) $(1)/usr/share/schroot
        $(CP) -R $(PKG_INSTALL_DIR)/usr/share/schroot/* $(1)/usr/share/schroot/
        $(INSTALL_DIR) $(1)/etc/init.d
index aa37793a92226222b48871a21f3aa74737f30f7d..d02e4d7769212293eeff12a48b30ea4c7ca73ceb 100755 (executable)
@@ -4,7 +4,7 @@ START=94
 
 start() {
        [ -d /var/lib/schroot ] || {
-               mkdir -p /var/lib/schroot/mount /var/lib/schroot/session /var/lib/schroot/unpack /var/lib/schroot/union/overlay /var/lib/schroot/union/underlay
+               mkdir -p /var/lib/schroot/session /var/lib/schroot/unpack /var/lib/schroot/union/overlay /var/lib/schroot/union/underlay
                chmod 0700 /var/lib/schroot
        }
 }
index bba6376512e4d348f543afe9f34a074a77da0881..f26e290c326e5553e9d61d6f272499d91d5040c7 100644 (file)
@@ -1,96 +1,50 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -284,22 +284,8 @@ if test -z "$DOXYGEN"; then
-   HAVE_DOXYGEN="no"
- fi
- HAVE_LVM="yes"
--AC_PATH_PROG([LVCREATE], [lvcreate], [], [$PATH:/sbin:/usr/sbin])
--AC_PATH_PROG([LVREMOVE], [lvremove], [], [$PATH:/sbin:/usr/sbin])
--if test -z "$LVCREATE" || test -z "$LVREMOVE"; then
--  HAVE_LVM="no"
--fi
- HAVE_BTRFS="yes"
--AC_PATH_PROG([BTRFS], [btrfs], [], [$PATH:/sbin:/usr/sbin])
--AC_PATH_PROG([BTRFSCTL], [btrfsctl], [], [$PATH:/sbin:/usr/sbin])
--if test -z "$BTRFS" || test -z "$BTRFSCTL"; then
--  HAVE_BTRFS="no"
--fi
- HAVE_LOOPBACK="yes"
--AC_PATH_PROG([LOSETUP], [losetup], [], [$PATH:/sbin:/usr/sbin])
--if test -z "$LOSETUP"; then
--  HAVE_LOOPBACK="no"
--fi
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -210,8 +210,8 @@ endif(BUILD_PAM)
+ set(BLOCKDEV_DEFAULT ON)
  
+ # LVM snapshot mount feature
+-find_program(LVCREATE_EXECUTABLE lvcreate PATHS /sbin /usr/sbin /usr/local/sbin)
+-find_program(LVREMOVE_EXECUTABLE lvremove PATHS /sbin /usr/sbin /usr/local/sbin)
++#find_program(LVCREATE_EXECUTABLE lvcreate PATHS /sbin /usr/sbin /usr/local/sbin)
++#find_program(LVREMOVE_EXECUTABLE lvremove PATHS /sbin /usr/sbin /usr/local/sbin)
+ set(LVMSNAP_DEFAULT OFF)
+ if (LVCREATE_EXECUTABLE AND LVREMOVE_EXECUTABLE)
+   set (LVMSNAP_DEFAULT ON)
+@@ -224,7 +224,7 @@ if (lvm-snapshot)
+ endif(lvm-snapshot)
  
- # Check for host platform
-@@ -336,7 +322,6 @@ PKG_CHECK_MODULES([UUID], [uuid],
-                   [HAVE_UUID=yes],
-                   [HAVE_UUID=no])
+ # ZFS snapshot mount feature
+-find_program(ZFS_EXECUTABLE zfs PATHS /sbin /usr/sbin /usr/local/sbin)
++#find_program(ZFS_EXECUTABLE zfs PATHS /sbin /usr/sbin /usr/local/sbin)
+ set(ZFSSNAP_DEFAULT OFF)
+ if (ZFS_EXECUTABLE)
+   set (ZFSSNAP_DEFAULT ON)
+@@ -237,7 +237,7 @@ if (zfs-snapshot)
+ endif(zfs-snapshot)
  
--AM_PATH_CPPUNIT([1.10.0], [HAVE_CPPUNIT=yes])
- AM_CONDITIONAL([USE_UNIT_TESTS], [test -n "$HAVE_CPPUNIT"])
+ # Btrfs snapshot mount feature
+-find_program(BTRFS_EXECUTABLE btrfs PATHS /sbin /usr/sbin /usr/local/sbin)
++#find_program(BTRFS_EXECUTABLE btrfs PATHS /sbin /usr/sbin /usr/local/sbin)
+ set(BTRFSSNAP_DEFAULT OFF)
+ if (BTRFS_EXECUTABLE)
+   set (BTRFSSNAP_DEFAULT ON)
+@@ -310,15 +310,9 @@ include_directories(${PROJECT_BINARY_DIR
+                     ${PROJECT_BINARY_DIR}
+                     ${PROJECT_SOURCE_DIR})
  
- SCHROOT_CFLAGS="$UUID_CFLAGS"
-@@ -688,42 +673,25 @@ if test "$BOOST_PROGRAM_OPTIONS_VALIDATI
- fi
+-enable_testing()
+-
+ add_subdirectory(sbuild)
+ add_subdirectory(bin)
+-add_subdirectory(test)
+-add_subdirectory(doc)
+ add_subdirectory(etc)
+-add_subdirectory(po)
+-add_subdirectory(man)
  
- dnl Note the use of quadrigraphs to quote [ and ] in regexes.
--AH_TEMPLATE(HAVE_REGEX_REGEX, [Set if the <regex> header file includes std::regex])
- AH_TEMPLATE(HAVE_BOOST_REGEX, [Set if the <boost/regex.hpp> header file includes boost::regex])
--AC_MSG_CHECKING([for std::regex])
--define([testprog], [AC_LANG_PROGRAM([#include <regex>],
--                                   [std::regex foo("^foo@<:@bar@:>@$");
--                                    std::regex bar("^foo@<:@bar@:>@$", std::regex::extended);
--                                    std::regex check("^@<:@^:/,.@:>@@<:@^:/,@:>@*$", std::regex::extended);])])
--AC_RUN_IFELSE(testprog,
--  [AC_MSG_RESULT([yes])
--   AC_DEFINE(HAVE_REGEX_REGEX, 1)],
--  [dnl Check if std::regex is present but broken.
--define([testprog], [AC_LANG_PROGRAM([#include <regex>],
--                                   [std::regex foo("^foo@<:@bar@:>@$");
--                                    std::regex bar("^foo@<:@bar@:>@$", std::regex::extended);])])
-+AC_MSG_CHECKING([for boost::regex in -lboost_regex])
-+saved_LIBS="${LIBS}"
-+LIBS="${saved_LIBS} -lboost_regex"
-+define([testprog], [AC_LANG_PROGRAM([#include <boost/regex.hpp>],
-+                                [boost::regex("^foo@<:@bar@:>@$");
-+                                 boost::regex bar("^foo@<:@bar@:>@$", boost::regex::extended);])])
- AC_LINK_IFELSE(testprog,
--  [AC_MSG_RESULT([broken])],
--  [AC_MSG_RESULT([no])])
--   AC_MSG_CHECKING([for boost::regex in -lboost_regex])
--   saved_LIBS="${LIBS}"
--   LIBS="${saved_LIBS} -lboost_regex"
--   define([testprog], [AC_LANG_PROGRAM([#include <boost/regex.hpp>],
--                                   [boost::regex("^foo@<:@bar@:>@$");
--                                    boost::regex bar("^foo@<:@bar@:>@$", boost::regex::extended);])])
--   AC_LINK_IFELSE(testprog,
--                  [AC_MSG_RESULT([yes])
--                   AC_DEFINE(HAVE_BOOST_REGEX, 1)
--                   BOOST_LIBS="${BOOST_LIBS} -lboost_regex"],
--                  [LIBS="${saved_LIBS} -lboost_regex-mt"
--                   AC_LINK_IFELSE(testprog,
--                          [AC_MSG_RESULT([yes])
--                           AC_DEFINE(HAVE_BOOST_REGEX, 1)
--                           BOOST_LIBS="${BOOST_LIBS} -lboost_regex-mt"],
--                          [AC_MSG_RESULT([no])
--                    AC_MSG_FAILURE([libboost_regex (Boost C++ Libraries) is not installed, but is required by schroot])])])
--   LIBS="${saved_LIBS}"
--])
-+               [AC_MSG_RESULT([yes])
-+                AC_DEFINE(HAVE_BOOST_REGEX, 1)
-+                BOOST_LIBS="${BOOST_LIBS} -lboost_regex"],
-+               [LIBS="${saved_LIBS} -lboost_regex-mt"
-+                AC_LINK_IFELSE(testprog,
-+                       [AC_MSG_RESULT([yes])
-+                        AC_DEFINE(HAVE_BOOST_REGEX, 1)
-+                        BOOST_LIBS="${BOOST_LIBS} -lboost_regex-mt"],
-+                       [AC_MSG_RESULT([no])
-+                 AC_MSG_FAILURE([libboost_regex (Boost C++ Libraries) is not installed, but is required by schroot])])])
-+LIBS="${saved_LIBS}"
- AC_MSG_CHECKING([for boost::iostreams in -lboost_iostreams])
- saved_LIBS="${LIBS}"
+ add_custom_target(check-news
+   COMMAND if grep -q "Welcome to ${CMAKE_PROJECT_NAME} ${GIT_RELEASE_VERSION}" "${PROJECT_SOURCE_DIR}/NEWS" \; then echo "NEWS current version ${GIT_RELEASE_VERSION}" \; else echo "NEWS current version does not match release version ${GIT_RELEASE_VERSION}" \; exit 1 \; fi
 --- a/bin/schroot-base/schroot-base-run.h
 +++ b/bin/schroot-base/schroot-base-run.h
 @@ -61,8 +61,8 @@ namespace schroot_base