From f3df07819b8587b49856dd1b7325692b1cf0de1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sat, 29 Aug 2020 22:56:23 +0100 Subject: [PATCH] Use upstream fix for t/escape-nested-chroot.t --- ...1fb9538f680af2f31e864c555414ccba842a.patch | 102 ++++++++++++++++++ fakechroot-disable-escape-nested-chroot.patch | 10 -- fakechroot.spec | 7 +- 3 files changed, 107 insertions(+), 12 deletions(-) create mode 100644 b42d1fb9538f680af2f31e864c555414ccba842a.patch delete mode 100644 fakechroot-disable-escape-nested-chroot.patch diff --git a/b42d1fb9538f680af2f31e864c555414ccba842a.patch b/b42d1fb9538f680af2f31e864c555414ccba842a.patch new file mode 100644 index 0000000..5e4a96e --- /dev/null +++ b/b42d1fb9538f680af2f31e864c555414ccba842a.patch @@ -0,0 +1,102 @@ +From b42d1fb9538f680af2f31e864c555414ccba842a Mon Sep 17 00:00:00 2001 +From: Piotr Roszatycki +Date: Mon, 10 Feb 2020 13:59:10 -0800 +Subject: [PATCH] New `statx` function + +--- + NEWS.md | 1 + + configure.ac | 1 + + src/Makefile.am | 1 + + src/statx.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 47 insertions(+) + create mode 100644 src/statx.c + +diff --git a/NEWS.md b/NEWS.md +index 9de12fe..f1210bf 100644 +--- a/NEWS.md ++++ b/NEWS.md +@@ -1,5 +1,10 @@ + # NEWS + ++XX Xxx XXXX ++ ++* UNRELEASED ++* New `statx(2)` function was added: glibc supports it since 2.28. ++ + ## Version 2.20.1 + + 22 Mar 2019 +diff --git a/configure.ac b/configure.ac +index a654edd..f8cdb32 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -277,6 +277,7 @@ AC_CHECK_FUNCS(m4_normalize([ + statfs64 + statvfs + statvfs64 ++ statx + stpcpy + strchrnul + strlcpy +diff --git a/src/Makefile.am b/src/Makefile.am +index d729b0e..6066345 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -152,6 +152,7 @@ libfakechroot_la_SOURCES = \ + statfs64.c \ + statvfs.c \ + statvfs64.c \ ++ statx.c \ + stpcpy.c \ + strchrnul.c \ + strchrnul.h \ +diff --git a/src/statx.c b/src/statx.c +new file mode 100644 +index 0000000..524f73e +--- /dev/null ++++ b/src/statx.c +@@ -0,0 +1,44 @@ ++/* ++ libfakechroot -- fake chroot environment ++ Copyright (c) 2010-2020 Piotr Roszatycki ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ This library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++*/ ++ ++ ++#include ++ ++#ifdef HAVE_STATX ++ ++#define _GNU_SOURCE ++#include ++#include ++#include ++ ++#include "libfakechroot.h" ++ ++ ++wrapper(statx, int, (int dirfd, const char * pathname, int flags, unsigned int mask, struct statx * statxbuf)) ++{ ++ char fakechroot_abspath[FAKECHROOT_PATH_MAX]; ++ char fakechroot_buf[FAKECHROOT_PATH_MAX]; ++ debug("statx(%d, \"%s\", %d, %u, &statxbuf)", dirfd, pathname, flags, mask); ++ expand_chroot_path_at(dirfd, pathname); ++ return nextcall(statx)(dirfd, pathname, flags, mask, statxbuf); ++} ++ ++#else ++typedef int empty_translation_unit; ++#endif diff --git a/fakechroot-disable-escape-nested-chroot.patch b/fakechroot-disable-escape-nested-chroot.patch deleted file mode 100644 index 2e4ecd5..0000000 --- a/fakechroot-disable-escape-nested-chroot.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- fakechroot-2.20.1/test/Makefile.am.orig 2020-08-23 12:28:21.871614223 +0100 -+++ fakechroot-2.20.1/test/Makefile.am 2020-08-23 12:28:25.722597158 +0100 -@@ -12,7 +12,6 @@ TESTS = \ - t/execlp.t \ - t/execve-elfloader.t \ - t/execve-null-envp.t \ -- t/escape-nested-chroot.t \ - t/fts.t \ - t/ftw.t \ - t/host.t \ diff --git a/fakechroot.spec b/fakechroot.spec index 3d6fc96..7bbae12 100644 --- a/fakechroot.spec +++ b/fakechroot.spec @@ -1,11 +1,11 @@ Name: fakechroot Version: 2.20.1 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Gives a fake chroot environment License: LGPLv2+ URL: https://github.com/dex4er/fakechroot Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz -Patch1: fakechroot-disable-escape-nested-chroot.patch +Patch1: https://github.com/dex4er/fakechroot/commit/b42d1fb9538f680af2f31e864c555414ccba842a.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} BuildRequires: autoconf @@ -75,6 +75,9 @@ find %{buildroot}%{_libdir} -name '*.la' -delete -print %{_libdir}/%{name}/ %changelog +* Sat Aug 29 2020 Sérgio Basto - 2.20.1-7 +- Use upstream fix for t/escape-nested-chroot.t + * Sat Aug 01 2020 Fedora Release Engineering - 2.20.1-6 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild