Add fakeroot recipe.
This commit is contained in:
parent
bc1567a92d
commit
34ff79359b
38
recipes/fakeroot/Makefile
Normal file
38
recipes/fakeroot/Makefile
Normal file
@ -0,0 +1,38 @@
|
||||
name = fakeroot
|
||||
version = 1.25.3
|
||||
release = 0
|
||||
URL = http://ftp.debian.org/debian/pool/main/f/fakeroot/fakeroot_$(version).orig.tar.gz
|
||||
url = "https://packages.debian.org/fakeroot"
|
||||
arch="all"
|
||||
license="GPL-3.0-or-later"
|
||||
|
||||
pkgdesc="Gives a fake root environment, useful for building packages as a non-privileged user"
|
||||
|
||||
patches != ls *.patch
|
||||
|
||||
dependencies = util-linux
|
||||
build-dependencies = nasm linux-dev util-linux-dev
|
||||
|
||||
makedepends_build = libtool autoconf automake po4a
|
||||
makedepends_host = libcap-dev acl-dev linux-headers
|
||||
makedepends = $(makedepends_build) $(makedepends_host)
|
||||
|
||||
CONFIG_SHELL = /bin/sh
|
||||
export CONFIG_SHELL
|
||||
|
||||
CONFIGURE_OPTIONS_USER = --build=$(CBUILD) --host=$(CHOST)
|
||||
|
||||
SYSCONF ?= ../../
|
||||
include $(SYSCONF)/package.mk
|
||||
|
||||
ifeq ($(CLIBC), musl)
|
||||
# musl does not have _STAT_VER, it's really not used for
|
||||
# anything, so define it as zero (just like uclibc does)
|
||||
CFLAGS = "-D_STAT_VER=0 $(CFLAGS)"
|
||||
endif
|
||||
|
||||
pre_configure:
|
||||
$(Q)cd $(bdir) && ./bootstrap
|
||||
|
||||
pre_fake_root_install:
|
||||
$(Q)cd $(bdir)/doc && po4a -k 0 --rm-backups --variable "srcdir=../doc/" po4a/po4a.cfg
|
17
recipes/fakeroot/fakeroot-no64.patch
Normal file
17
recipes/fakeroot/fakeroot-no64.patch
Normal file
@ -0,0 +1,17 @@
|
||||
--- 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
|
||||
|
46
recipes/fakeroot/fakeroot-skip-ipc-sanity-check.patch
Normal file
46
recipes/fakeroot/fakeroot-skip-ipc-sanity-check.patch
Normal file
@ -0,0 +1,46 @@
|
||||
diff -urN fakeroot-1.25.3.orig/configure.ac fakeroot-1.25.3/configure.ac
|
||||
--- fakeroot-1.25.3.orig/configure.ac 2020-12-15 02:33:22.866626448 -0700
|
||||
+++ fakeroot-1.25.3/configure.ac 2020-12-15 02:33:40.563359415 -0700
|
||||
@@ -25,42 +25,6 @@
|
||||
[ac_cv_use_ipc],
|
||||
[ac_cv_use_ipc=sysv])
|
||||
|
||||
-if test $ac_cv_use_ipc = "sysv"; then
|
||||
- AC_MSG_CHECKING([whether SysV IPC message queues are actually working on the host])
|
||||
-
|
||||
- AC_LANG_PUSH(C)
|
||||
- AC_TRY_RUN([
|
||||
-#include <stdlib.h>
|
||||
-#include <sys/types.h>
|
||||
-#include <sys/ipc.h>
|
||||
-#include <sys/msg.h>
|
||||
-#include <time.h>
|
||||
-#include <unistd.h>
|
||||
-
|
||||
-int main() {
|
||||
-
|
||||
- srandom(time(NULL)+getpid()*33151);
|
||||
- key_t msg_key = random();
|
||||
- int msg_get = msgget(msg_key, IPC_CREAT|0600);
|
||||
-
|
||||
- if (msg_get==-1) {
|
||||
- return 1;
|
||||
- } else {
|
||||
- msgctl(msg_get, IPC_RMID, NULL);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
-}], [ac_cv_use_ipc=sysv], [ac_cv_use_ipc=tcp])
|
||||
-
|
||||
- if test $ac_cv_use_ipc = "tcp"; then
|
||||
- AC_MSG_RESULT([No, using TCP])
|
||||
- else
|
||||
- AC_MSG_RESULT([Yes])
|
||||
- fi
|
||||
-
|
||||
- AC_LANG_POP(C)
|
||||
-fi
|
||||
-
|
||||
AC_ARG_WITH([dbformat],
|
||||
AS_HELP_STRING([--with-dbformat@<:@=DBFORMAT@:>@],
|
||||
[database format to use: either inode (default) or path]),
|
34
recipes/fakeroot/fakeroot-stdint.patch
Normal file
34
recipes/fakeroot/fakeroot-stdint.patch
Normal file
@ -0,0 +1,34 @@
|
||||
--- fakeroot-1.18.2.orig/faked.c
|
||||
+++ fakeroot-1.18.2/faked.c
|
||||
@@ -514,11 +514,11 @@
|
||||
|
||||
#ifdef FAKEROOT_DB_PATH
|
||||
if (find_path(i->buf.dev, i->buf.ino, roots, path))
|
||||
- fprintf(f,"mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu %s\n",
|
||||
+ fprintf(f,"mode=%"PRIo64",uid=%"PRIu64",gid=%"PRIu64",nlink=%"PRIu64",rdev=%"PRIu64" %s\n",
|
||||
(uint64_t) i->buf.mode,(uint64_t) i->buf.uid,(uint64_t) i->buf.gid,
|
||||
(uint64_t) i->buf.nlink,(uint64_t) i->buf.rdev,path);
|
||||
#else
|
||||
- fprintf(f,"dev=%llx,ino=%llu,mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu\n",
|
||||
+ fprintf(f,"dev=%"PRIx64",ino=%"PRIu64",mode=%"PRIo64",uid=%"PRIu64",gid=%"PRIu64",nlink=%"PRIu64",rdev=%"PRIu64"\n",
|
||||
(uint64_t) i->buf.dev,(uint64_t) i->buf.ino,(uint64_t) i->buf.mode,
|
||||
(uint64_t) i->buf.uid,(uint64_t) i->buf.gid,(uint64_t) i->buf.nlink,
|
||||
(uint64_t) i->buf.rdev);
|
||||
@@ -544,7 +544,7 @@
|
||||
|
||||
while(1){
|
||||
#ifdef FAKEROOT_DB_PATH
|
||||
- r=scanf("mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu "DB_PATH_SCAN"\n",
|
||||
+ r=scanf("mode=%"PRIo64",uid=%"PRIu64",gid=%"PRIu64",nlink=%"PRIu64",rdev=%"PRIu64" "DB_PATH_SCAN"\n",
|
||||
&stmode, &stuid, &stgid, &stnlink, &strdev, &path);
|
||||
if (r != 6)
|
||||
break;
|
||||
@@ -559,7 +559,7 @@
|
||||
stdev = path_st.st_dev;
|
||||
stino = path_st.st_ino;
|
||||
#else
|
||||
- r=scanf("dev=%llx,ino=%llu,mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu\n",
|
||||
+ r=scanf("dev=%"PRIx64",ino=%"PRIu64",mode=%"PRIo64",uid=%"PRIu64",gid=%"PRIu64",nlink=%"PRIu64",rdev=%"PRIu64"\n",
|
||||
&stdev, &stino, &stmode, &stuid, &stgid, &stnlink, &strdev);
|
||||
if (r != 7)
|
||||
break;
|
13
recipes/fakeroot/fix-shell-in-fakeroot.patch
Normal file
13
recipes/fakeroot/fix-shell-in-fakeroot.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Description: Fix shell in fakeroot.in
|
||||
Use /bin/sh instead of @SHELL@ in fakeroot.in
|
||||
Author: Juan Picca <jumapico@gmail.com>
|
||||
Last-Update: 2016-06-27
|
||||
---
|
||||
--- a/scripts/fakeroot.in
|
||||
+++ b/scripts/fakeroot.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!@SHELL@
|
||||
+#!/bin/sh
|
||||
|
||||
# This script first starts faked (the daemon), and then it will run
|
||||
# the requested program with fake root privileges.
|
11
recipes/fakeroot/xstatjunk.patch
Normal file
11
recipes/fakeroot/xstatjunk.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- fakeroot-1.18.4.orig/configure.ac 2012-06-02 18:23:41.000000000 +0000
|
||||
+++ fakeroot-1.18.4configure.ac 2015-09-24 23:15:56.917470073 +0000
|
||||
@@ -301,7 +301,7 @@
|
||||
FUNC=`echo $SEARCH|sed -e 's/.*%//'`
|
||||
PRE=`echo $SEARCH|sed -e 's/%.*//'`
|
||||
FOUND=
|
||||
- for WRAPPED in __${PRE}x${FUNC} _${PRE}x${FUNC} __${PRE}${FUNC}13 ${PRE}${FUNC}; do
|
||||
+ for WRAPPED in ${PRE}${FUNC}; do
|
||||
AC_CHECK_FUNCS($WRAPPED,FOUND=$WRAPPED)
|
||||
dnl
|
||||
dnl to unconditionally define only the _* functions, comment out the 2 lines above,
|
Loading…
Reference in New Issue
Block a user