-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add fakeroot as a build dependency
fakeroot helps us set SELinux labels which do not exist on host or work on non-SELinux hosts. Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
- Loading branch information
Showing
6 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
This patch fixes building with musl libc | ||
|
||
https://github.com/void-linux/void-packages/blob/e3ff6da0aa9f378356cec4184580025ddae771de/srcpkgs/fakeroot/patches/fakeroot-no64.patch | ||
|
||
--- a/libfakeroot.c | ||
+++ b/libfakeroot.c | ||
@@ -81,12 +81,14 @@ | ||
#define SEND_STAT64(a,b,c) send_stat64(a,b,c) | ||
#define SEND_GET_STAT(a,b) send_get_stat(a,b) | ||
#define SEND_GET_STAT64(a,b) send_get_stat64(a,b) | ||
+#define SEND_GET_XATTR(a,b,c) send_get_xattr(a,b,c) | ||
#define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b,c) | ||
#else | ||
#define SEND_STAT(a,b,c) send_stat(a,b) | ||
#define SEND_STAT64(a,b,c) send_stat64(a,b) | ||
#define SEND_GET_STAT(a,b) send_get_stat(a) | ||
#define SEND_GET_STAT64(a,b) send_get_stat64(a) | ||
+#define SEND_GET_XATTR(a,b,c) send_get_xattr(a,b) | ||
#define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b) | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Description: Fix shell in fakeroot.in | ||
Use /bin/sh instead of @SHELL@ in fakeroot.in | ||
Author: Juan Picca <jumapico@gmail.com> | ||
Source: Debian | ||
Last-Update: 2024-08-22 by Dmitrii Sharshakov | ||
--- | ||
--- a/scripts/fakeroot.in | ||
+++ b/scripts/fakeroot.in | ||
@@ -1,4 +1,4 @@ | ||
-#!@SHELL@ | ||
+#!/toolchain/bin/bash | ||
|
||
# This script first starts faked (the daemon), and then it will run | ||
# the requested program with fake root privileges. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/Makefile.am b/Makefile.am | ||
index 46f01eb..4c10cfa 100644 | ||
--- a/Makefile.am | ||
+++ b/Makefile.am | ||
@@ -1,6 +1,6 @@ | ||
AUTOMAKE_OPTIONS=foreign | ||
ACLOCAL_AMFLAGS = -I build-aux | ||
-SUBDIRS=doc scripts test | ||
+SUBDIRS=scripts test | ||
|
||
noinst_LTLIBRARIES = libcommunicate.la libmacosx.la libfakeroot_time64.la | ||
libcommunicate_la_SOURCES = communicate.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: fakeroot | ||
dependencies: | ||
- stage: base | ||
- stage: patch | ||
- stage: autoconf | ||
- stage: automake | ||
- stage: libtool | ||
- stage: libcap | ||
steps: | ||
- sources: | ||
- url: https://salsa.debian.org/clint/fakeroot/-/archive/upstream/{{ .fakeroot_version }}/fakeroot-upstream-{{ .fakeroot_version }}.tar.gz | ||
destination: fakeroot.tar.gz | ||
sha256: "{{ .fakeroot_sha256 }}" | ||
sha512: "{{ .fakeroot_sha512 }}" | ||
prepare: | ||
- | | ||
tar -xzvf fakeroot.tar.gz --strip-components=1 | ||
patch -p1 < /pkg/patches/fix-shell.patch | ||
patch -p1 < /pkg/patches/no-docs.patch | ||
patch -p1 < /pkg/patches/fakeroot-no64.patch | ||
autoreconf -vif | ||
./configure \ | ||
--prefix=${TOOLCHAIN} \ | ||
CFLAGS="${CFLAGS} -fPIC" | ||
build: | ||
- | | ||
make -j $(nproc) | ||
install: | ||
- | | ||
make install DESTDIR=/rootfs PREFIX=/toolchain | ||
finalize: | ||
- from: /rootfs | ||
to: / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters