upg fakechroot
This commit is contained in:
parent
e6afedb347
commit
f369cd0916
|
@ -7,9 +7,8 @@
|
|||
|
||||
pkgname=fakechroot
|
||||
pkgver=2.20.1
|
||||
pkgrel=02
|
||||
pkgrel=03
|
||||
pkgdesc="Gives a fake chroot environment"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/dex4er/fakechroot/wiki"
|
||||
depends=('sh' 'perl')
|
||||
makedepends=(automake autoconf)
|
||||
|
@ -17,16 +16,31 @@ provides=('fakechroot')
|
|||
conflicts=('fakechroot-git')
|
||||
options=('staticlibs')
|
||||
source=($pkgname-$pkgver.tar.gz::https://github.com/dex4er/fakechroot/archive/${pkgver}.tar.gz
|
||||
"fix_glibc_2.33_compatibility.patch::https://github.com/lipnitsk/fakechroot/commit/693a3597ea7fccfb62f357503ff177bd3e3d5a89.patch"
|
||||
"remove_ver_from_lstat.patch::https://github.com/lipnitsk/fakechroot/commit/75d7e6fa191c11a791faff06a0de86eaa7801d05.patch")
|
||||
statx.patch
|
||||
$pkgname-2.patch::https://github.com/dex4er/fakechroot/pull/80.patch
|
||||
$pkgname-3.patch::https://github.com/dex4er/fakechroot/pull/100.patch
|
||||
$pkgname-4.patch::https://github.com/dex4er/fakechroot/pull/104.patch
|
||||
$pkgname-5.patch::https://github.com/dex4er/fakechroot/pull/93.patch)
|
||||
# "fix_glibc_2.33_compatibility.patch::https://github.com/lipnitsk/fakechroot/commit/693a3597ea7fccfb62f357503ff177bd3e3d5a89.patch"
|
||||
# "remove_ver_from_lstat.patch::https://github.com/lipnitsk/fakechroot/commit/75d7e6fa191c11a791faff06a0de86eaa7801d05.patch")
|
||||
|
||||
prepare() {
|
||||
cd $pkgname-$pkgver
|
||||
# Apply patches similiar to Fedora https://src.fedoraproject.org/rpms/fakechroot/blob/rawhide/f/fakechroot.spec#_8
|
||||
patch -Np1 -i "${srcdir}/statx.patch"
|
||||
for i in {2..5}; do
|
||||
patch -Np1 -i "${srcdir}/${pkgname}-${i}.patch"
|
||||
done
|
||||
|
||||
patch -Np1 -i "$srcdir/fix_glibc_2.33_compatibility.patch"
|
||||
patch -Np1 -i "$srcdir/remove_ver_from_lstat.patch"
|
||||
autoreconf -vfi
|
||||
}
|
||||
|
||||
#prepare() {
|
||||
# cd $pkgname-$pkgver
|
||||
#
|
||||
# patch -Np1 -i "$srcdir/fix_glibc_2.33_compatibility.patch"
|
||||
# patch -Np1 -i "$srcdir/remove_ver_from_lstat.patch"
|
||||
#}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
|
@ -55,19 +69,18 @@ package() {
|
|||
echo '/usr/lib/libfakeroot/fakechroot/' > "${pkgdir}"/etc/ld.so.conf.d/fakechroot.conf
|
||||
}
|
||||
|
||||
#---- license gpg-key sha256sums ----
|
||||
#---- arch license gpg-key & sha256sums ----
|
||||
|
||||
arch=(x86_64)
|
||||
|
||||
license=('LGPL')
|
||||
|
||||
md5sums=('69612efa06636e79a56898512222b0fc'
|
||||
SKIP
|
||||
SKIP)
|
||||
sha512sums=('50f96d10de52eab32319746798396b972c021fb2e30679a2697214e01a974afbb4e0205dc51d5d9c7b57ac462d1a6fd14fd46ca9a92eefd20beef0d65ea76e0f'
|
||||
SKIP
|
||||
SKIP)
|
||||
|
||||
sha256sums=(7f9d60d0d48611969e195fadf84d05f6c74f71bbf8f41950ad8f5bf061773e18 # fakechroot-2.20.1.tar.gz
|
||||
4038238c9a3ec67b6a749a55eb206f92fcc75a8e762d27b1cca236bd49fdcd40 # fix_glibc_2.33_compatibility.patch
|
||||
2ca655d046390b2822c0e8fc65c32a3c8851542896452e940b8e16d57f0dd0e5) # remove_ver_from_lstat.patch
|
||||
|
||||
sha256sums=(7f9d60d0d48611969e195fadf84d05f6c74f71bbf8f41950ad8f5bf061773e18 # fakechroot-2.20.1.tar.gz
|
||||
9da94ccffd8992e27a7de9b7e37d655b301036120b808dda23942a32228e8ad4 # statx.patch
|
||||
e52bd008b80d91c420a39bdf9512311aed957ed0694dcf0e91a9dfb45dc9ad3a # fakechroot-2.patch
|
||||
1df4ac7967fcaeacf0e5036d4c04272ca8a291e998fa1ee6953b250e072ffc3e # fakechroot-3.patch
|
||||
3af556df739666be149a69fc80177f35632b0e5b959f07d60f90258ea16c2aee # fakechroot-4.patch
|
||||
f1127fc734271fefe9d32fe3714c60410e4365b39c02bceaac68f0148d9d8602) # fakechroot-5.patch
|
||||
|
||||
## cb040d983ce636c268486bf9ce10d9ec331ad6f8e539b2f14306fc7018cc9a90 fakechroot-2.20.1-03-x86_64.pkg.tar.lz
|
||||
|
||||
|
|
|
@ -4,16 +4,41 @@
|
|||
|
||||
pkgname=fakechroot
|
||||
pkgver=2.20.1
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="Gives a fake chroot environment"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/dex4er/fakechroot/wiki"
|
||||
license=('LGPL')
|
||||
depends=('sh' 'perl')
|
||||
source=($pkgname-$pkgver.tar.gz::https://github.com/dex4er/fakechroot/archive/${pkgver}.tar.gz)
|
||||
md5sums=('69612efa06636e79a56898512222b0fc')
|
||||
sha512sums=('50f96d10de52eab32319746798396b972c021fb2e30679a2697214e01a974afbb4e0205dc51d5d9c7b57ac462d1a6fd14fd46ca9a92eefd20beef0d65ea76e0f')
|
||||
source=($pkgname-$pkgver.tar.gz::https://github.com/dex4er/fakechroot/archive/${pkgver}.tar.gz
|
||||
statx.patch
|
||||
$pkgname-2.patch::https://github.com/dex4er/fakechroot/pull/80.patch
|
||||
$pkgname-3.patch::https://github.com/dex4er/fakechroot/pull/100.patch
|
||||
$pkgname-4.patch::https://github.com/dex4er/fakechroot/pull/104.patch
|
||||
$pkgname-5.patch::https://github.com/dex4er/fakechroot/pull/93.patch)
|
||||
md5sums=('69612efa06636e79a56898512222b0fc'
|
||||
'755d2beaa0c09b508020d49566c38964'
|
||||
'23c2444ee9dbe9934ce8a6ce49ae5b1a'
|
||||
'f1fa6a0561ed6771785be74cee99e93a'
|
||||
'590bcb88b0d5c89c8a4b37c84b7c6aad'
|
||||
'ec930b912a9e48166591ac8e4668fdce')
|
||||
sha512sums=('50f96d10de52eab32319746798396b972c021fb2e30679a2697214e01a974afbb4e0205dc51d5d9c7b57ac462d1a6fd14fd46ca9a92eefd20beef0d65ea76e0f'
|
||||
'd611d1e6ca7a95ba64ab7001e552d6f8e3fa0468e08fdb6af1b9bff979d8ddd9b9e0eab50a7c5198d5b273450787dd67bb51d714dcd79abc0bc92b947d6f018c'
|
||||
'7715c50ff332ee727afb834cd0f4b13f727d8152cff86ee0b8bebb286431b820f2a4e30a16655cf1e9f23c38cc31993a8563ca3aa08f10fa779894f282d20d51'
|
||||
'655f3c589d0c1958df0573b5d86e5541d0a31743d50e35347099679d41574f00ac5c6f13e74629073ebc1bbe138b6ac513abd47590d780adebe1d04c8c8c5194'
|
||||
'45d0970289e4c4a2f74d92fa5e157bdd8941763ee631288a7a948afd43f751414fa6bc4c99db165a0ef90c5daeede2a297c20e73b7b0305a574e99ffce647870'
|
||||
'6a176a6a123efe5ff554b22dc0492a819f71581bdc38bc14a45ff61f163b8f2c6536bd1d559e2554bb08d4b7a59b87889bc99315995bfc8e2da1b28cf92c8def')
|
||||
|
||||
prepare() {
|
||||
cd $pkgname-$pkgver
|
||||
# Apply patches similiar to Fedora https://src.fedoraproject.org/rpms/fakechroot/blob/rawhide/f/fakechroot.spec#_8
|
||||
patch -Np1 -i "${srcdir}/statx.patch"
|
||||
for i in {2..5}; do
|
||||
patch -Np1 -i "${srcdir}/${pkgname}-${i}.patch"
|
||||
done
|
||||
|
||||
autoreconf -vfi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
|
|
|
@ -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])
|
|
@ -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 f8c27af9..899953a2 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);
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,178 @@
|
|||
From e6ce10f50726ac926b9e90710117e8be6c8c8074 Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Yeleighton <ne01026@shark.2a.pl>
|
||||
Date: Thu, 29 Apr 2021 15:06:53 +0200
|
||||
Subject: [PATCH 1/7] build action
|
||||
|
||||
---
|
||||
.github/workflows/c-cpp.yml | 23 +++++++++++++++++++++++
|
||||
1 file changed, 23 insertions(+)
|
||||
create mode 100644 .github/workflows/c-cpp.yml
|
||||
|
||||
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
|
||||
new file mode 100644
|
||||
index 00000000..e3233268
|
||||
--- /dev/null
|
||||
+++ b/.github/workflows/c-cpp.yml
|
||||
@@ -0,0 +1,23 @@
|
||||
+name: C/C++ CI
|
||||
+
|
||||
+on:
|
||||
+ push:
|
||||
+ branches: [ master ]
|
||||
+ pull_request:
|
||||
+ branches: [ master ]
|
||||
+
|
||||
+jobs:
|
||||
+ build:
|
||||
+
|
||||
+ runs-on: ubuntu-latest
|
||||
+
|
||||
+ steps:
|
||||
+ - uses: actions/checkout@v2
|
||||
+ - name: configure
|
||||
+ run: ./configure
|
||||
+ - name: make
|
||||
+ run: make
|
||||
+ - name: make check
|
||||
+ run: make check
|
||||
+ - name: make distcheck
|
||||
+ run: make distcheck
|
||||
|
||||
From aedcacc4c3703d34d829a3d77cf8382d445b6429 Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Yeleighton <ne01026@shark.2a.pl>
|
||||
Date: Thu, 29 Apr 2021 15:08:54 +0200
|
||||
Subject: [PATCH 2/7] autogen.sh
|
||||
|
||||
---
|
||||
.github/workflows/c-cpp.yml | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
|
||||
index e3233268..ac02906d 100644
|
||||
--- a/.github/workflows/c-cpp.yml
|
||||
+++ b/.github/workflows/c-cpp.yml
|
||||
@@ -14,7 +14,10 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: configure
|
||||
- run: ./configure
|
||||
+ run: |
|
||||
+ for t in autogen.sh configure
|
||||
+ do sh "$t"
|
||||
+ done
|
||||
- name: make
|
||||
run: make
|
||||
- name: make check
|
||||
|
||||
From 1cb53cfadf5f1dff1d46d27716e35b53c89cdb9d Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Yeleighton <ne01026@shark.2a.pl>
|
||||
Date: Thu, 29 Apr 2021 15:23:25 +0200
|
||||
Subject: [PATCH 3/7] upload test log
|
||||
|
||||
---
|
||||
.github/workflows/c-cpp.yml | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
|
||||
index ac02906d..0d46b938 100644
|
||||
--- a/.github/workflows/c-cpp.yml
|
||||
+++ b/.github/workflows/c-cpp.yml
|
||||
@@ -24,3 +24,9 @@ jobs:
|
||||
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: test/test-suite.log
|
||||
|
||||
From bca711379020d17a26a3c2c313a11aa28c6d9653 Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Yeleighton <ne01026@shark.2a.pl>
|
||||
Date: Fri, 30 Apr 2021 09:16:01 +0200
|
||||
Subject: [PATCH 4/7] path: fakechroot-2.20.2/_build/sub/
|
||||
|
||||
---
|
||||
.github/workflows/c-cpp.yml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
|
||||
index 0d46b938..cc65f078 100644
|
||||
--- a/.github/workflows/c-cpp.yml
|
||||
+++ b/.github/workflows/c-cpp.yml
|
||||
@@ -29,4 +29,4 @@ jobs:
|
||||
uses: actions/upload-artifact@v2.2.3
|
||||
with:
|
||||
name: test-log
|
||||
- path: test/test-suite.log
|
||||
+ path: fakechroot-2.20.2/_build/sub/test/test-suite.log
|
||||
|
||||
From 953fed82a2fff84c7f7ebed09eee1cddeb8578a3 Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Yeleighton <ne01026@shark.2a.pl>
|
||||
Date: Fri, 30 Apr 2021 09:18:08 +0200
|
||||
Subject: [PATCH 5/7] branches: [ fix-dist-check ]
|
||||
|
||||
---
|
||||
.github/workflows/c-cpp.yml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
|
||||
index cc65f078..38ec05a1 100644
|
||||
--- a/.github/workflows/c-cpp.yml
|
||||
+++ b/.github/workflows/c-cpp.yml
|
||||
@@ -2,7 +2,7 @@ name: C/C++ CI
|
||||
|
||||
on:
|
||||
push:
|
||||
- branches: [ master ]
|
||||
+ branches: [ fix-dist-check ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
|
||||
From e1a5c99000d932df43125fd444d82691948680fd Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Yeleighton <ne01026@shark.2a.pl>
|
||||
Date: Fri, 30 Apr 2021 10:19:10 +0200
|
||||
Subject: [PATCH 6/7] cd "../.."
|
||||
|
||||
---
|
||||
test/bin/fakechroot | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/bin/fakechroot b/test/bin/fakechroot
|
||||
index 315cb100..4904d33e 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
|
||||
|
||||
From a854440ba208892435f00461024a0a0cfb7168c1 Mon Sep 17 00:00:00 2001
|
||||
From: Christopher Yeleighton <ne01026@shark.2a.pl>
|
||||
Date: Fri, 30 Apr 2021 10:22:10 +0200
|
||||
Subject: [PATCH 7/7] cd ".."
|
||||
|
||||
---
|
||||
test/bin/fakechroot | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/bin/fakechroot b/test/bin/fakechroot
|
||||
index 4904d33e..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 "../.." 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
|
|
@ -0,0 +1,86 @@
|
|||
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
|
||||
|
||||
---
|
||||
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/configure.ac b/configure.ac
|
||||
index a654edda..f8cdb323 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 d729b0e1..60663452 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 00000000..524f73e2
|
||||
--- /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
|
Loading…
Reference in New Issue