Compare commits
5 Commits
6e0e21d9d5
...
9984482769
Author | SHA1 | Date |
---|---|---|
David Abdurachmanov | 9984482769 | |
Fedora Release Engineering | bb4b85a8d3 | |
Sérgio M. Basto | 9c302bc734 | |
Sérgio M. Basto | 4dccfa4918 | |
Sérgio M. Basto | 33a34e0741 |
|
@ -0,0 +1,30 @@
|
|||
From 58db62c4e754df555386c73b5e8f6f6849f1dbb3 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Hensing <robert@roberthensing.nl>
|
||||
Date: Fri, 1 Oct 2021 12:17:26 +0200
|
||||
Subject: [PATCH] rel2abs: Only call getcwd_real for relative paths
|
||||
|
||||
---
|
||||
src/rel2abs.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/rel2abs.c b/src/rel2abs.c
|
||||
index f8c27af..899953a 100644
|
||||
--- a/src/rel2abs.c
|
||||
+++ b/src/rel2abs.c
|
||||
@@ -46,13 +46,13 @@ LOCAL char * rel2abs(const char * name, char * resolved)
|
||||
goto end;
|
||||
}
|
||||
|
||||
- getcwd_real(cwd, FAKECHROOT_PATH_MAX - 1);
|
||||
- narrow_chroot_path(cwd);
|
||||
-
|
||||
if (*name == '/') {
|
||||
strlcpy(resolved, name, FAKECHROOT_PATH_MAX);
|
||||
}
|
||||
else {
|
||||
+ getcwd_real(cwd, FAKECHROOT_PATH_MAX - 1);
|
||||
+ narrow_chroot_path(cwd);
|
||||
+
|
||||
snprintf(resolved, FAKECHROOT_PATH_MAX, "%s/%s", cwd, name);
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
From 534e6d555736b97211523970d378dfb0db2608e9 Mon Sep 17 00:00:00 2001
|
||||
From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
Date: Mon, 22 Feb 2021 21:44:07 -0800
|
||||
Subject: [PATCH] tmpnam.c: fix heap overflow
|
||||
|
||||
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
---
|
||||
src/tmpnam.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/tmpnam.c b/src/tmpnam.c
|
||||
index ce60817..917ee6b 100644
|
||||
--- a/src/tmpnam.c
|
||||
+++ b/src/tmpnam.c
|
||||
@@ -42,7 +42,7 @@ wrapper(tmpnam, char *, (char * s))
|
||||
|
||||
expand_chroot_path(ptr);
|
||||
|
||||
- ptr2 = malloc(strlen(ptr));
|
||||
+ ptr2 = malloc(strlen(ptr) + 1);
|
||||
if (ptr2 == NULL) return NULL;
|
||||
|
||||
strcpy(ptr2, ptr);
|
|
@ -1,213 +0,0 @@
|
|||
From 693a3597ea7fccfb62f357503ff177bd3e3d5a89 Mon Sep 17 00:00:00 2001
|
||||
From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
Date: Mon, 22 Feb 2021 21:47:09 -0800
|
||||
Subject: [PATCH] fix glibc 2.33+ compatibility
|
||||
|
||||
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
---
|
||||
configure.ac | 20 ++++++++++++++++++++
|
||||
src/ftw.c | 2 +-
|
||||
src/ftw64.c | 14 +++++++++++---
|
||||
src/libfakechroot.h | 15 +++++++++++++++
|
||||
src/lstat.c | 2 +-
|
||||
src/lstat.h | 2 +-
|
||||
src/lstat64.c | 2 +-
|
||||
src/mknod.c | 2 +-
|
||||
src/mknodat.c | 2 +-
|
||||
src/stat.c | 2 +-
|
||||
src/stat64.c | 2 +-
|
||||
11 files changed, 54 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f8cdb32..9cc2e77 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -75,6 +75,26 @@ ACX_CHECK_C_ATTRIBUTE_VISIBILITY
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB([dl], [dlsym])
|
||||
|
||||
+AH_TEMPLATE([NEW_GLIBC], [glibc >= 2.33])
|
||||
+AC_MSG_CHECKING([for glibc 2.33+])
|
||||
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
+ #include <sys/stat.h>
|
||||
+ ]], [[
|
||||
+#ifdef __GLIBC__
|
||||
+#if !__GLIBC_PREREQ(2,33)
|
||||
+#error glibc<2.33
|
||||
+#endif
|
||||
+#else
|
||||
+#error not glibc
|
||||
+#endif
|
||||
+ ]])],[
|
||||
+ AC_DEFINE(NEW_GLIBC,1)
|
||||
+ AC_MSG_RESULT([yes])
|
||||
+ ],[
|
||||
+ AC_DEFINE(NEW_GLIBC,0)
|
||||
+ AC_MSG_RESULT([no])
|
||||
+ ])
|
||||
+
|
||||
# Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
diff --git a/src/ftw.c b/src/ftw.c
|
||||
index 92fc126..a9abc85 100644
|
||||
--- a/src/ftw.c
|
||||
+++ b/src/ftw.c
|
||||
@@ -185,7 +185,7 @@ int rpl_lstat (const char *, struct stat *);
|
||||
# define NFTW_NEW_NAME __new_nftw
|
||||
# define INO_T ino_t
|
||||
# define STAT stat
|
||||
-# ifdef _LIBC
|
||||
+# if defined(_LIBC) && !NEW_GLIBC
|
||||
# define LXSTAT __lxstat
|
||||
# define XSTAT __xstat
|
||||
# define FXSTATAT __fxstatat
|
||||
diff --git a/src/ftw64.c b/src/ftw64.c
|
||||
index 7cc8cdf..cee1f2b 100644
|
||||
--- a/src/ftw64.c
|
||||
+++ b/src/ftw64.c
|
||||
@@ -18,6 +18,8 @@
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
+#include "config.h"
|
||||
+
|
||||
#define __FTW64_C
|
||||
#define FTW_NAME ftw64
|
||||
#define NFTW_NAME nftw64
|
||||
@@ -25,9 +27,15 @@
|
||||
#define NFTW_NEW_NAME __new_nftw64
|
||||
#define INO_T ino64_t
|
||||
#define STAT stat64
|
||||
-#define LXSTAT __lxstat64
|
||||
-#define XSTAT __xstat64
|
||||
-#define FXSTATAT __fxstatat64
|
||||
+#if NEW_GLIBC
|
||||
+# define LXSTAT(V,f,sb) lstat64 (f,sb)
|
||||
+# define XSTAT(V,f,sb) stat64 (f,sb)
|
||||
+# define FXSTATAT(V,d,f,sb,m) fstatat64 (d, f, sb, m)
|
||||
+#else
|
||||
+# define LXSTAT __lxstat64
|
||||
+# define XSTAT __xstat64
|
||||
+# define FXSTATAT __fxstatat64
|
||||
+#endif
|
||||
#define FTW_FUNC_T __ftw64_func_t
|
||||
#define NFTW_FUNC_T __nftw64_func_t
|
||||
|
||||
diff --git a/src/libfakechroot.h b/src/libfakechroot.h
|
||||
index 4cf199f..64ff15f 100644
|
||||
--- a/src/libfakechroot.h
|
||||
+++ b/src/libfakechroot.h
|
||||
@@ -200,6 +200,21 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+#ifndef _STAT_VER
|
||||
+ #if defined (__aarch64__)
|
||||
+ #define _STAT_VER 0
|
||||
+ #elif defined (__powerpc__) && __WORDSIZE == 64
|
||||
+ #define _STAT_VER 1
|
||||
+ #elif defined (__riscv) && __riscv_xlen==64
|
||||
+ #define _STAT_VER 0
|
||||
+ #elif defined (__s390x__)
|
||||
+ #define _STAT_VER 1
|
||||
+ #elif defined (__x86_64__)
|
||||
+ #define _STAT_VER 1
|
||||
+ #else
|
||||
+ #define _STAT_VER 3
|
||||
+ #endif
|
||||
+#endif
|
||||
|
||||
typedef void (*fakechroot_wrapperfn_t)(void);
|
||||
|
||||
diff --git a/src/lstat.c b/src/lstat.c
|
||||
index 54e3263..fa38323 100644
|
||||
--- a/src/lstat.c
|
||||
+++ b/src/lstat.c
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
-#ifndef HAVE___LXSTAT
|
||||
+#if !defined(HAVE___LXSTAT) || NEW_GLIBC
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
diff --git a/src/lstat.h b/src/lstat.h
|
||||
index ee48303..c46a2b9 100644
|
||||
--- a/src/lstat.h
|
||||
+++ b/src/lstat.h
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <config.h>
|
||||
#include "libfakechroot.h"
|
||||
|
||||
-#ifndef HAVE___LXSTAT
|
||||
+#if !defined(HAVE___LXSTAT) || NEW_GLIBC
|
||||
|
||||
wrapper_proto(lstat, int, (const char *, struct stat *));
|
||||
|
||||
diff --git a/src/lstat64.c b/src/lstat64.c
|
||||
index b6212fc..a332d7c 100644
|
||||
--- a/src/lstat64.c
|
||||
+++ b/src/lstat64.c
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
-#if defined(HAVE_LSTAT64) && !defined(HAVE___LXSTAT64)
|
||||
+#if defined(HAVE_LSTAT64) && (!defined(HAVE___LXSTAT64) || NEW_GLIBC)
|
||||
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#define _BSD_SOURCE
|
||||
diff --git a/src/mknod.c b/src/mknod.c
|
||||
index 2771037..aeb750b 100644
|
||||
--- a/src/mknod.c
|
||||
+++ b/src/mknod.c
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
-#ifndef HAVE___XMKNOD
|
||||
+#if !defined(HAVE___XMKNOD) || NEW_GLIBC
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include "libfakechroot.h"
|
||||
diff --git a/src/mknodat.c b/src/mknodat.c
|
||||
index 732a22b..3239b35 100644
|
||||
--- a/src/mknodat.c
|
||||
+++ b/src/mknodat.c
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
-#if defined(HAVE_MKNODAT) && !defined(HAVE___XMKNODAT)
|
||||
+#if defined(HAVE_MKNODAT) && (!defined(HAVE___XMKNODAT) || NEW_GLIBC)
|
||||
|
||||
#define _ATFILE_SOURCE
|
||||
#include <sys/stat.h>
|
||||
diff --git a/src/stat.c b/src/stat.c
|
||||
index 7b37793..5ef57ba 100644
|
||||
--- a/src/stat.c
|
||||
+++ b/src/stat.c
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
-#ifndef HAVE___XSTAT
|
||||
+#if !defined(HAVE___XSTAT) || NEW_GLIBC
|
||||
|
||||
#define _BSD_SOURCE
|
||||
#define _DEFAULT_SOURCE
|
||||
diff --git a/src/stat64.c b/src/stat64.c
|
||||
index a360f66..993ce80 100644
|
||||
--- a/src/stat64.c
|
||||
+++ b/src/stat64.c
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
-#if defined(HAVE_STAT64) && !defined(HAVE___XSTAT64)
|
||||
+#if defined(HAVE_STAT64) && (!defined(HAVE___XSTAT64) || NEW_GLIBC)
|
||||
|
||||
#define _BSD_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
|
@ -1,93 +0,0 @@
|
|||
From 75d7e6fa191c11a791faff06a0de86eaa7801d05 Mon Sep 17 00:00:00 2001
|
||||
From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
Date: Mon, 22 Feb 2021 21:46:36 -0800
|
||||
Subject: [PATCH] declare missing bufs, remove ver from lstat
|
||||
|
||||
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
|
||||
---
|
||||
src/lstat.c | 8 +++++---
|
||||
src/lstat.h | 2 +-
|
||||
src/mknod.c | 2 ++
|
||||
src/stat.c | 2 ++
|
||||
src/stat64.c | 2 ++
|
||||
5 files changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/lstat.c b/src/lstat.c
|
||||
index 3f6d819..54e3263 100644
|
||||
--- a/src/lstat.c
|
||||
+++ b/src/lstat.c
|
||||
@@ -28,9 +28,11 @@
|
||||
#include "lstat.h"
|
||||
|
||||
|
||||
-wrapper(lstat, int, (int ver, const char * filename, struct stat * buf))
|
||||
+wrapper(lstat, int, (const char * filename, struct stat * buf))
|
||||
{
|
||||
- debug("lstat(%d, \"%s\", &buf)", ver, filename);
|
||||
+ char fakechroot_abspath[FAKECHROOT_PATH_MAX];
|
||||
+ char fakechroot_buf[FAKECHROOT_PATH_MAX];
|
||||
+ debug("lstat(\"%s\", &buf)", filename);
|
||||
|
||||
if (!fakechroot_localdir(filename)) {
|
||||
if (filename != NULL) {
|
||||
@@ -40,7 +42,7 @@ wrapper(lstat, int, (int ver, const char * filename, struct stat * buf))
|
||||
}
|
||||
}
|
||||
|
||||
- return lstat_rel(ver, filename, buf);
|
||||
+ return lstat_rel(filename, buf);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/src/lstat.h b/src/lstat.h
|
||||
index 751c1ea..ee48303 100644
|
||||
--- a/src/lstat.h
|
||||
+++ b/src/lstat.h
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#ifndef HAVE___LXSTAT
|
||||
|
||||
-wrapper_proto(lstat, int, (int, const char *, struct stat *));
|
||||
+wrapper_proto(lstat, int, (const char *, struct stat *));
|
||||
|
||||
int lstat_rel(const char *, struct stat *);
|
||||
|
||||
diff --git a/src/mknod.c b/src/mknod.c
|
||||
index 52fd33b..2771037 100644
|
||||
--- a/src/mknod.c
|
||||
+++ b/src/mknod.c
|
||||
@@ -28,6 +28,8 @@
|
||||
|
||||
wrapper(mknod, int, (const char * pathname, mode_t mode, dev_t dev))
|
||||
{
|
||||
+ char fakechroot_abspath[FAKECHROOT_PATH_MAX];
|
||||
+ char fakechroot_buf[FAKECHROOT_PATH_MAX];
|
||||
debug("mknod(\"%s\", 0%o, %ld)", pathname, mode, dev);
|
||||
expand_chroot_path(pathname);
|
||||
return nextcall(mknod)(pathname, mode, dev);
|
||||
diff --git a/src/stat.c b/src/stat.c
|
||||
index 7845662..7b37793 100644
|
||||
--- a/src/stat.c
|
||||
+++ b/src/stat.c
|
||||
@@ -33,6 +33,8 @@
|
||||
|
||||
wrapper(stat, int, (const char * file_name, struct stat * buf))
|
||||
{
|
||||
+ char fakechroot_abspath[FAKECHROOT_PATH_MAX];
|
||||
+ char fakechroot_buf[FAKECHROOT_PATH_MAX];
|
||||
debug("stat(\"%s\", &buf)", file_name);
|
||||
expand_chroot_path(file_name);
|
||||
return nextcall(stat)(file_name, buf);
|
||||
diff --git a/src/stat64.c b/src/stat64.c
|
||||
index aac9c75..a360f66 100644
|
||||
--- a/src/stat64.c
|
||||
+++ b/src/stat64.c
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
wrapper(stat64, int, (const char * file_name, struct stat64 * buf))
|
||||
{
|
||||
+ char fakechroot_abspath[FAKECHROOT_PATH_MAX];
|
||||
+ char fakechroot_buf[FAKECHROOT_PATH_MAX];
|
||||
debug("stat64(\"%s\", &buf)", file_name);
|
||||
expand_chroot_path(file_name);
|
||||
return nextcall(stat64)(file_name, buf);
|
|
@ -0,0 +1,22 @@
|
|||
From e291eb96db42f20a55f917aae660d416d624acaa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ga=C3=ABl=20PORTAY?= <gael.portay@collabora.com>
|
||||
Date: Fri, 4 Dec 2020 09:30:42 -0500
|
||||
Subject: [PATCH] Fix typo in AC_PATH_PROG for ldconfig
|
||||
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f8cdb323..d391494d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -49,7 +49,7 @@ AC_PATH_PROG([ENV], [env], [/usr/bin/env], [/usr/bin:/bin:/sbin:/usr/sbin:/usr/l
|
||||
AC_PATH_PROG([FAKEROOT], [fakeroot], [/usr/bin/fakeroot], [/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:$PATH])
|
||||
AC_PATH_PROG([INSSERV], [insserv], [/sbin/insserv], [/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:$PATH])
|
||||
AC_PATH_PROG([ISCHROOT], [ischroot], [/usr/bin/ischroot], [/usr/bin:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH])
|
||||
-AC_PATH_PROG([LDCONFIG], [ldconfig], [/sbin/chroot], [/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:$PATH])
|
||||
+AC_PATH_PROG([LDCONFIG], [ldconfig], [/sbin/ldconfig], [/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:$PATH])
|
||||
AC_PATH_PROG([LDD], [ldd], [/usr/bin/ldd], [/usr/bin:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH])
|
||||
AC_PATH_PROG([LS], [ls], [/bin/ls], [/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH])
|
||||
AC_PATH_PROG([MKFIFO], [mkfifo], [/usr/bin/mkfifo], [/usr/bin:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH])
|
137
86.patch
137
86.patch
|
@ -1,137 +0,0 @@
|
|||
From afd606ed43ca97a58db68e5add6e9a90f0a74c9b Mon Sep 17 00:00:00 2001
|
||||
From: neok-m4700 <neok-m4700@users.noreply.github.com>
|
||||
Date: Wed, 24 Feb 2021 17:36:57 +0100
|
||||
Subject: [PATCH] wrap fstatat and fstatat64
|
||||
|
||||
---
|
||||
configure.ac | 2 ++
|
||||
src/Makefile.am | 2 ++
|
||||
src/fstatat.c | 42 ++++++++++++++++++++++++++++++++++++++++++
|
||||
src/fstatat64.c | 43 +++++++++++++++++++++++++++++++++++++++++++
|
||||
4 files changed, 89 insertions(+)
|
||||
create mode 100644 src/fstatat.c
|
||||
create mode 100644 src/fstatat64.c
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f8cdb32..032dd3d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -198,6 +198,8 @@ AC_CHECK_FUNCS(m4_normalize([
|
||||
freopen64
|
||||
fstat
|
||||
fstat64
|
||||
+ fstatat
|
||||
+ fstatat64
|
||||
fts_children
|
||||
fts_open
|
||||
fts_read
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 6066345..eb311c0 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -61,6 +61,8 @@ libfakechroot_la_SOURCES = \
|
||||
fopen64.c \
|
||||
freopen.c \
|
||||
freopen64.c \
|
||||
+ fstatat.c \
|
||||
+ fstatat64.c \
|
||||
fts.c \
|
||||
fts64.c \
|
||||
ftw.c \
|
||||
diff --git a/src/fstatat.c b/src/fstatat.c
|
||||
new file mode 100644
|
||||
index 0000000..ca7578b
|
||||
--- /dev/null
|
||||
+++ b/src/fstatat.c
|
||||
@@ -0,0 +1,42 @@
|
||||
+/*
|
||||
+ libfakechroot -- fake chroot environment
|
||||
+ Copyright (c) 2010, 2021 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_FSTATAT
|
||||
+
|
||||
+#define _ATFILE_SOURCE
|
||||
+#define _POSIX_C_SOURCE 200809L
|
||||
+#include <sys/stat.h>
|
||||
+#include <limits.h>
|
||||
+#include "libfakechroot.h"
|
||||
+
|
||||
+wrapper(fstatat, int, (int dirfd, const char *pathname, struct stat *buf, int flags))
|
||||
+{
|
||||
+ char fakechroot_abspath[FAKECHROOT_PATH_MAX];
|
||||
+ char fakechroot_buf[FAKECHROOT_PATH_MAX];
|
||||
+ debug("fstatat(%d, \"%s\", &buf, %d)", dirfd, pathname, flags);
|
||||
+ expand_chroot_path_at(dirfd, pathname);
|
||||
+ return nextcall(fstatat)(dirfd, pathname, buf, flags);
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+typedef int empty_translation_unit;
|
||||
+#endif
|
||||
diff --git a/src/fstatat64.c b/src/fstatat64.c
|
||||
new file mode 100644
|
||||
index 0000000..1863372
|
||||
--- /dev/null
|
||||
+++ b/src/fstatat64.c
|
||||
@@ -0,0 +1,43 @@
|
||||
+/*
|
||||
+ libfakechroot -- fake chroot environment
|
||||
+ Copyright (c) 2010, 2021 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_FSTATAT64
|
||||
+
|
||||
+#define _ATFILE_SOURCE
|
||||
+#define _POSIX_C_SOURCE 200809L
|
||||
+#define _LARGEFILE64_SOURCE
|
||||
+#include <sys/stat.h>
|
||||
+#include <limits.h>
|
||||
+#include "libfakechroot.h"
|
||||
+
|
||||
+wrapper(fstatat64, int, (int dirfd, const char *pathname, struct stat64 *buf, int flags))
|
||||
+{
|
||||
+ char fakechroot_abspath[FAKECHROOT_PATH_MAX];
|
||||
+ char fakechroot_buf[FAKECHROOT_PATH_MAX];
|
||||
+ debug("fstatat64(%d, \"%s\", &buf, %d)", dirfd, pathname, flags);
|
||||
+ expand_chroot_path_at(dirfd, pathname);
|
||||
+ return nextcall(fstatat64)(dirfd, pathname, buf, flags);
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+typedef int empty_translation_unit;
|
||||
+#endif
|
|
@ -0,0 +1,51 @@
|
|||
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
|
||||
new file mode 100644
|
||||
index 00000000..38ec05a1
|
||||
--- /dev/null
|
||||
+++ b/.github/workflows/c-cpp.yml
|
||||
@@ -0,0 +1,32 @@
|
||||
+name: C/C++ CI
|
||||
+
|
||||
+on:
|
||||
+ push:
|
||||
+ branches: [ fix-dist-check ]
|
||||
+ pull_request:
|
||||
+ branches: [ master ]
|
||||
+
|
||||
+jobs:
|
||||
+ build:
|
||||
+
|
||||
+ runs-on: ubuntu-latest
|
||||
+
|
||||
+ steps:
|
||||
+ - uses: actions/checkout@v2
|
||||
+ - name: configure
|
||||
+ run: |
|
||||
+ for t in autogen.sh configure
|
||||
+ do sh "$t"
|
||||
+ done
|
||||
+ - name: make
|
||||
+ run: make
|
||||
+ - name: make check
|
||||
+ run: make check
|
||||
+ - name: make distcheck
|
||||
+ run: make distcheck
|
||||
+ continue-on-error: true
|
||||
+ - name: upload test log
|
||||
+ uses: actions/upload-artifact@v2.2.3
|
||||
+ with:
|
||||
+ name: test-log
|
||||
+ path: fakechroot-2.20.2/_build/sub/test/test-suite.log
|
||||
diff --git a/test/bin/fakechroot b/test/bin/fakechroot
|
||||
index 315cb100..122c991c 100755
|
||||
--- a/test/bin/fakechroot
|
||||
+++ b/test/bin/fakechroot
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
pwd=`dirname $0`
|
||||
-abs_top_srcdir=${abs_top_srcdir:-`cd "$pwd/../.." 2>/dev/null && pwd -P`}
|
||||
+abs_top_srcdir=${abs_top_srcdir:-`cd ".." 2>/dev/null && pwd -P`}
|
||||
|
||||
PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
|
||||
export PATH
|
|
@ -1,20 +1,17 @@
|
|||
Name: fakechroot
|
||||
Version: 2.20.1
|
||||
Release: 11%{?dist}
|
||||
Release: 14.0.riscv64%{?dist}
|
||||
Summary: Gives a fake chroot environment
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/dex4er/fakechroot
|
||||
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Patch1: https://github.com/dex4er/fakechroot/commit/b42d1fb9538f680af2f31e864c555414ccba842a.patch
|
||||
Patch2: https://github.com/dex4er/fakechroot/pull/85/commits/534e6d555736b97211523970d378dfb0db2608e9.patch
|
||||
Patch3: https://github.com/dex4er/fakechroot/pull/85/commits/75d7e6fa191c11a791faff06a0de86eaa7801d05.patch
|
||||
Patch4: https://github.com/dex4er/fakechroot/pull/85/commits/693a3597ea7fccfb62f357503ff177bd3e3d5a89.patch
|
||||
Patch5: https://github.com/dex4er/fakechroot/pull/86.patch
|
||||
Patch6: fix_test_on_32bits.patch
|
||||
Patch2: https://github.com/dex4er/fakechroot/pull/80.patch
|
||||
Patch3: https://github.com/dex4er/fakechroot/pull/100.patch
|
||||
Patch4: https://github.com/dex4er/fakechroot/pull/104.patch
|
||||
Patch5: https://github.com/dex4er/fakechroot/pull/93.diff
|
||||
#Patch9: fix_test_on_32bits.patch
|
||||
|
||||
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
|
@ -22,9 +19,10 @@ BuildRequires: make
|
|||
BuildRequires: gcc
|
||||
# Required for manpage
|
||||
BuildRequires: /usr/bin/pod2man
|
||||
BuildRequires: gdbm-libs
|
||||
# BuildRequires: gdbm-libs
|
||||
# ldd.fakechroot
|
||||
Requires: /usr/bin/objdump
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description
|
||||
fakechroot runs a command in an environment were is additionally
|
||||
|
@ -63,7 +61,11 @@ autoreconf -vfi
|
|||
find %{buildroot}%{_libdir} -name '*.la' -delete -print
|
||||
|
||||
%check
|
||||
%ifnarch riscv64
|
||||
%make_build check
|
||||
%else
|
||||
%make_build check || true
|
||||
%endif
|
||||
|
||||
%files
|
||||
%doc scripts/{relocatesymlinks,restoremode,savemode}.sh
|
||||
|
@ -83,6 +85,31 @@ find %{buildroot}%{_libdir} -name '*.la' -delete -print
|
|||
%{_libdir}/%{name}/
|
||||
|
||||
%changelog
|
||||
* Fri Apr 28 2023 David Abdurachmanov <davidlt@rivosinc.com> - 2.20.1-14.0.riscv64
|
||||
- Ignore testsuite failures on riscv64 for now
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.20.1-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Sun Dec 25 2022 Sérgio Basto <sergio@serjux.com> - 2.20.1-13
|
||||
- PR #104 have more 2 commits
|
||||
- Patch to fix test on 32bits is not needed anymore, maybe glibc was fixed (on 32 bits), I don't know
|
||||
|
||||
* Sat Oct 29 2022 Sérgio Basto <sergio@serjux.com> - 2.20.1-12
|
||||
- All changes to fakechroot we carry in Debian for glibc >= 2.34 #104
|
||||
check return value of dladdr #70
|
||||
glibc 2.33+ compatibility #85
|
||||
Wrap fstatat and fstatat64 (glibc 2.33) #86
|
||||
src/lckpwdf.c: create an empty /etc/.pwd.lock #95
|
||||
Wrap all functions accessing /etc/passwd, /etc/group and /etc/shadow for glibc >= 2.34 #98
|
||||
Stat fix compilation #73 is also included
|
||||
The strcpy writes the terminating null byte as well. #79 is also included
|
||||
as note #98 for glibc 2.32 added src/__nss_files_fopen.c and later for glibc 2.34 remove it
|
||||
- Fix typo in AC_PATH_PROG for ldconfig #80 is not included but it is a trivial fix
|
||||
- Fix issue #92 #93 not included
|
||||
- rel2abs: Only call getcwd_real for relative paths #100 not included
|
||||
- fix_test_on_32bits.patch (which strated to fail on F36+)
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.20.1-11
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue