openwrt-packages/admin/schroot/patches/01-openwrt.patch

216 lines
8.4 KiB
Diff

--- 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
# Check for host platform
@@ -336,7 +322,6 @@ PKG_CHECK_MODULES([UUID], [uuid],
[HAVE_UUID=yes],
[HAVE_UUID=no])
-AM_PATH_CPPUNIT([1.10.0], [HAVE_CPPUNIT=yes])
AM_CONDITIONAL([USE_UNIT_TESTS], [test -n "$HAVE_CPPUNIT"])
SCHROOT_CFLAGS="$UUID_CFLAGS"
@@ -688,42 +673,25 @@ if test "$BOOST_PROGRAM_OPTIONS_VALIDATI
fi
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}"
--- a/bin/schroot-base/schroot-base-run.h
+++ b/bin/schroot-base/schroot-base-run.h
@@ -61,8 +61,8 @@ namespace schroot_base
std::cout.imbue(std::locale());
std::cerr.imbue(std::locale());
- bindtextdomain (SBUILD_MESSAGE_CATALOGUE, SCHROOT_LOCALE_DIR);
- textdomain (SBUILD_MESSAGE_CATALOGUE);
+ //bindtextdomain (SBUILD_MESSAGE_CATALOGUE, SCHROOT_LOCALE_DIR);
+ //textdomain (SBUILD_MESSAGE_CATALOGUE);
typename options_type::ptr opts(new options_type);
main_type kit(opts);
--- a/sbuild/sbuild-feature.h
+++ b/sbuild/sbuild-feature.h
@@ -24,6 +24,7 @@
#include <string>
#include <boost/format.hpp>
+#include <libintl.h>
namespace sbuild
{
--- a/etc/setup.d/20copyfiles
+++ b/etc/setup.d/20copyfiles
@@ -39,9 +39,9 @@ copy_file()
if [ -e "$2" ]; then
# Device and inode
- da=$(/usr/bin/stat --format="%d %i" "$1")
+ da=$(/bin/stat --format="%d %i" "$1")
# This one can fail since it might not exist yet
- db=$(/usr/bin/stat --format="%d %i" "$2" 2>/dev/null || :)
+ db=$(/bin/stat --format="%d %i" "$2" 2>/dev/null || :)
if [ "$da" = "$db" ]; then
COPY="false"
--- a/etc/setup.d/20nssdatabases
+++ b/etc/setup.d/20nssdatabases
@@ -29,7 +29,7 @@ set -e
dup_nss()
{
info "Copying $1 database to $2"
- getent "$1" > "$2"
+ cat "/etc/$1" > "$2"
}
if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then
@@ -42,9 +42,9 @@ if [ $STAGE = "setup-start" ] || [ $STAG
fi
# Device and inode
- dr=$(/usr/bin/stat --format="%d %i" "/etc/$db")
+ dr=$(/bin/stat --format="%d %i" "/etc/$db")
# This one can fail since it might not exist yet
- dc=$(/usr/bin/stat --format="%d %i" "${CHROOT_PATH}/etc/$db" 2>/dev/null || :)
+ dc=$(/bin/stat --format="%d %i" "${CHROOT_PATH}/etc/$db" 2>/dev/null || :)
# If the database inside and outside the chroot is the
# same, it's very likely that dup_nss would blank the
--- a/etc/profile-templates/all/all/nssdatabases
+++ b/etc/profile-templates/all/all/nssdatabases
@@ -3,5 +3,5 @@
# <database name>
passwd
shadow
-group
-gshadow
+#group
+#gshadow
--- a/etc/profile-templates/buildd/all/nssdatabases
+++ b/etc/profile-templates/buildd/all/nssdatabases
@@ -3,5 +3,5 @@
# <database name>
passwd
shadow
-group
-gshadow
+#group
+#gshadow
--- a/etc/profile-templates/default/all/nssdatabases
+++ b/etc/profile-templates/default/all/nssdatabases
@@ -1,4 +1,4 @@
services
protocols
-networks
+#networks
hosts
--- a/etc/profile-templates/desktop/all/nssdatabases
+++ b/etc/profile-templates/desktop/all/nssdatabases
@@ -1,4 +1,4 @@
services
protocols
-networks
+#networks
hosts
--- a/etc/profile-templates/default/linux/fstab
+++ b/etc/profile-templates/default/linux/fstab
@@ -7,7 +7,7 @@
# to run additional services in the chroot. However, note that this
# may potentially cause undesirable behaviour on upgrades, such as
# killing services on the host.
-#/run /run none rw,bind 0 0
+/run /run none rw,bind 0 0
#/run/lock /run/lock none rw,bind 0 0
-#/dev/shm /dev/shm none rw,bind 0 0
-#/run/shm /run/shm none rw,bind 0 0
+/tmp/shm /dev/shm none rw,bind 0 0
+/tmp/shm /run/shm none rw,bind 0 0
--- a/etc/profile-templates/desktop/linux/fstab
+++ b/etc/profile-templates/desktop/linux/fstab
@@ -12,7 +12,7 @@
# to run additional services in the chroot. However, note that this
# may potentially cause undesirable behaviour on upgrades, such as
# killing services on the host.
-#/run /run none rw,bind 0 0
+/run /run none rw,bind 0 0
#/run/lock /run/lock none rw,bind 0 0
-#/dev/shm /dev/shm none rw,bind 0 0
-#/run/shm /run/shm none rw,bind 0 0
+/tmp/shm /dev/shm none rw,bind 0 0
+/tmp/shm /run/shm none rw,bind 0 0