Use upstream fix for t/escape-nested-chroot.t
This commit is contained in:
parent
f98fb1cf75
commit
f3df07819b
|
@ -0,0 +1,102 @@
|
||||||
|
From b42d1fb9538f680af2f31e864c555414ccba842a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Piotr Roszatycki <piotr.roszatycki@gmail.com>
|
||||||
|
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 <dexter@debian.org>
|
||||||
|
+
|
||||||
|
+ 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 <config.h>
|
||||||
|
+
|
||||||
|
+#ifdef HAVE_STATX
|
||||||
|
+
|
||||||
|
+#define _GNU_SOURCE
|
||||||
|
+#include <sys/types.h>
|
||||||
|
+#include <sys/stat.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
+
|
||||||
|
+#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
|
|
@ -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 \
|
|
|
@ -1,11 +1,11 @@
|
||||||
Name: fakechroot
|
Name: fakechroot
|
||||||
Version: 2.20.1
|
Version: 2.20.1
|
||||||
Release: 6%{?dist}
|
Release: 7%{?dist}
|
||||||
Summary: Gives a fake chroot environment
|
Summary: Gives a fake chroot environment
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/dex4er/fakechroot
|
URL: https://github.com/dex4er/fakechroot
|
||||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
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}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
|
@ -75,6 +75,9 @@ find %{buildroot}%{_libdir} -name '*.la' -delete -print
|
||||||
%{_libdir}/%{name}/
|
%{_libdir}/%{name}/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Aug 29 2020 Sérgio Basto <sergio@serjux.com> - 2.20.1-7
|
||||||
|
- Use upstream fix for t/escape-nested-chroot.t
|
||||||
|
|
||||||
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.20.1-6
|
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.20.1-6
|
||||||
- Second attempt - Rebuilt for
|
- Second attempt - Rebuilt for
|
||||||
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
Loading…
Reference in New Issue