Initial commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
# Ignore BPM archives and signatures
|
||||||
|
*.bpm
|
||||||
|
*.bpm.sig
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Github repository
|
||||||
|
REPO="dex4er/fakechroot"
|
||||||
|
|
||||||
|
# Get tag name using Github Rest API
|
||||||
|
TAG_NAME=$(curl -s -L -H "X-GitHub-Api-Version: 2022-11-28" -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/"$REPO"/releases/latest | jq -r '.tag_name')
|
||||||
|
|
||||||
|
echo "$TAG_NAME"
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
name: fakechroot
|
||||||
|
description: Gives a fake chroot environment
|
||||||
|
version: 2.20.1
|
||||||
|
revision: 1
|
||||||
|
url: https://github.com/dex4er/fakechroot/wiki
|
||||||
|
license: LGPL-2.1-or-later
|
||||||
|
maintainers:
|
||||||
|
- [email protected]
|
||||||
|
architecture: any
|
||||||
|
type: source
|
||||||
|
depends:
|
||||||
|
- perl
|
||||||
|
- sh
|
||||||
|
downloads:
|
||||||
|
- url: https://github.com/dex4er/fakechroot/archive/refs/tags/${BPM_PKG_VERSION}.tar.gz
|
||||||
|
extract_to: ${BPM_SOURCE}
|
||||||
|
extract_strip_components: 1
|
||||||
|
checksum: 7f9d60d0d48611969e195fadf84d05f6c74f71bbf8f41950ad8f5bf061773e18
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
||||||
|
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||||
|
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||||
|
|
||||||
|
# The prepare function is executed in the root of the temp directory
|
||||||
|
# This function is used for putting downloaded files to the correct location or applying patches
|
||||||
|
prepare() {
|
||||||
|
cd "$BPM_SOURCE"
|
||||||
|
patch -Np1 -i "$BPM_WORKDIR"/statx.patch
|
||||||
|
patch -Np1 -i "$BPM_WORKDIR"/fakechroot-2.patch
|
||||||
|
patch -Np1 -i "$BPM_WORKDIR"/fakechroot-3.patch
|
||||||
|
patch -Np1 -i "$BPM_WORKDIR"/fakechroot-4.patch
|
||||||
|
patch -Np1 -i "$BPM_WORKDIR"/fakechroot-5.patch
|
||||||
|
|
||||||
|
autoreconf -fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# The build function is executed in the source directory
|
||||||
|
# This function is used to compile the source code
|
||||||
|
build() {
|
||||||
|
./configure --prefix=/usr --sysconfdir=/etc
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
# The check function is executed in the source directory
|
||||||
|
# This function is used to run tests to verify the package has been compiled correctly
|
||||||
|
check() {
|
||||||
|
# One t/fst.t fails on BTRFS
|
||||||
|
make -k check
|
||||||
|
}
|
||||||
|
|
||||||
|
# The package function is executed in the source directory
|
||||||
|
# This function is used to move the compiled files into the output directory
|
||||||
|
package() {
|
||||||
|
make DESTDIR="$BPM_OUTPUT" install
|
||||||
|
|
||||||
|
install -dm755 "$BPM_OUTPUT"/etc/ld.so.conf.d/
|
||||||
|
echo '/usr/lib/fakechroot/' > "$BPM_OUTPUT"/etc/ld.so.conf.d/fakechroot.conf
|
||||||
|
|
||||||
|
# Install package license
|
||||||
|
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/fakechroot/LICENSE
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
From e291eb96db42f20a55f917aae660d416d624acaa Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Ga=C3=ABl=20PORTAY?= <[email protected]>
|
||||||
|
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 <[email protected]>
|
||||||
|
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 <[email protected]>
|
||||||
|
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 <[email protected]>
|
||||||
|
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 <[email protected]>
|
||||||
|
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/[email protected]
|
||||||
|
+ with:
|
||||||
|
+ name: test-log
|
||||||
|
+ path: test/test-suite.log
|
||||||
|
|
||||||
|
From bca711379020d17a26a3c2c313a11aa28c6d9653 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christopher Yeleighton <[email protected]>
|
||||||
|
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/[email protected]
|
||||||
|
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 <[email protected]>
|
||||||
|
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 <[email protected]>
|
||||||
|
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 <[email protected]>
|
||||||
|
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 <[email protected]>
|
||||||
|
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 <[email protected]>
|
||||||
|
+
|
||||||
|
+ 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
|
||||||
Reference in New Issue
Block a user