schroot: runtime musl fixes

This commit is contained in:
Andrea Brancaleoni 2015-08-24 18:52:29 +02:00
parent 754116d14d
commit 450eec0ffd
3 changed files with 86 additions and 2 deletions

View file

@ -0,0 +1,25 @@
From 6ffdd152d3fb07921c02e739ce5b47d1e177e7e6 Mon Sep 17 00:00:00 2001
From: Andrea Brancaleoni <miwaxe@gmail.com>
Date: Mon, 24 Aug 2015 18:39:16 +0200
Subject: [PATCH] getent
---
etc/setup.d/20nssdatabases | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git etc/setup.d/20nssdatabases etc/setup.d/20nssdatabases
index 6f14c81..697bb1e 100755
--- etc/setup.d/20nssdatabases
+++ etc/setup.d/20nssdatabases
@@ -29,7 +29,7 @@ set -e
dup_nss()
{
info "Copying $1 database to $2"
- getent "$1" > "$2"
+ getent "$1" > "$2" 2>/dev/null || cat "/etc/$1" > "$2"
}
if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then
--
2.5.0

View file

@ -0,0 +1,60 @@
From f7ecc01d4e773ac532c3fc990833ca4d1cda6a7b Mon Sep 17 00:00:00 2001
From: Andrea Brancaleoni <miwaxe@gmail.com>
Date: Mon, 24 Aug 2015 18:25:10 +0200
Subject: [PATCH] getmntent fix
---
lib/sbuild/mntstream.cc | 15 ++-------------
lib/sbuild/mntstream.h | 3 +--
2 files changed, 3 insertions(+), 15 deletions(-)
diff --git lib/sbuild/mntstream.cc lib/sbuild/mntstream.cc
index 7f5e7d4..44b472d 100644
--- lib/sbuild/mntstream.cc
+++ lib/sbuild/mntstream.cc
@@ -31,9 +31,7 @@ namespace sbuild
error<mntstream::error_code>::error_strings =
{
// TRANSLATORS: %1% = mount file name
- {mntstream::MNT_OPEN, N_("Failed to open mount file %1%")},
- // TRANSLATORS: %1% = mount file name
- {mntstream::MNT_READ, N_("Failed to read mount file %1%")}
+ {mntstream::MNT_OPEN, N_("Failed to open mount file %1%")}
};
mntstream::mntentry::mntentry (const struct mntent& entry):
@@ -94,16 +92,7 @@ namespace sbuild
errno = 0;
entry = getmntent(mntfile);
- if (entry == 0) // EOF or error
- {
- //std::cerr << "Mount file read error: ";
- if (errno) // error
- {
- this->error_status = true;
- throw error(this->file, MNT_READ, strerror(errno));
- }
- return;
- }
+ if (entry == 0) return;
mntentry newentry(*entry); // make a mntentry
this->data.push_back(newentry); // push onto the end of the list
diff --git lib/sbuild/mntstream.h lib/sbuild/mntstream.h
index a406d6e..7e52559 100644
--- lib/sbuild/mntstream.h
+++ lib/sbuild/mntstream.h
@@ -49,8 +49,7 @@ namespace sbuild
/// Error codes.
enum error_code
{
- MNT_OPEN, ///< Failed to open mount file.
- MNT_READ ///< Failed to read mount file.
+ MNT_OPEN ///< Failed to open mount file.
};
/// Exception type.
--
2.5.0

View file

@ -1,7 +1,7 @@
# Template file for 'schroot'
pkgname=schroot
version=1.7.2
revision=4
revision=5
build_pie=yes
build_style=cmake
configure_args="
@ -64,7 +64,6 @@ homepage="https://wiki.debian.org/Schroot"
distfiles="${DEBIAN_SITE}/main/s/${pkgname}/${pkgname}_${version}.orig.tar.xz"
checksum="0fabc156da95cfcd63493bf1c3a438efa4a550c4f280d8f1c6f9e67c3d424661"
CFLAGS="-include /usr/include/libintl.h"
LDFLAGS="-lboost_regex"
pre_configure() {