Initial commit

This commit is contained in:
2026-09-04 15:59:56 +03:00
commit 8b242baa78
9 changed files with 2335 additions and 0 deletions
+22
View File
@@ -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])
+30
View File
@@ -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
+178
View File
@@ -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
+86
View File
@@ -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