Date: Thu, 11 Mar 2004 13:52:46 +0100 From: "Meno Abels" <abels@adviser.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: meno.abels@adviser.com Subject: ports/64102: New port: security/fakeroot simulate root user behavior Message-ID: <20040311125247.3FA898400D@pmff.de> Resent-Message-ID: <200403111300.i2BD0frI097548@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 64102 >Category: ports >Synopsis: New port: security/fakeroot simulate root user behavior >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Mar 11 05:00:40 PST 2004 >Closed-Date: >Last-Modified: >Originator: Meno Abels >Release: FreeBSD 5.2.1-RELEASE i386 >Organization: Adviser COM >Environment: System: FreeBSD race 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #6: Mon Feb 23 18:41:05 CET 2004 root@neo.abels.adviser.com:/usr/obj/usr/src/sys/GENERIC i386 >Description: Fakeroot runs a command in an environment were it appears to have root privileges for file manipulation, by setting LD_PRELOAD to a library with alternative versions of getuid(), stat(), etc. This is useful for allowing users to create archives (tar, ar, .deb .rpm etc.) with files in them with root permissions/ownership. Without fakeroot one would have to have root privileges to create the constituent files of the archives with the correct permissions and ownership, and then pack them up, or one would have to construct the archives directly, without using the archiver. WWW: http://freshmeat.net/projects/fakeroot >How-To-Repeat: make install make deinstall make install >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # fakeroot # fakeroot/pkg-plist # fakeroot/pkg-descr # fakeroot/distinfo # fakeroot/Makefile # fakeroot/files # fakeroot/files/patch-communicate.h # fakeroot/files/patch-libfakeroot.c # fakeroot/files/patch-doc.Makefile # fakeroot/files/patch-fakeroot # echo c - fakeroot mkdir -p fakeroot > /dev/null 2>&1 echo x - fakeroot/pkg-plist sed 's/^X//' >fakeroot/pkg-plist << 'END-of-fakeroot/pkg-plist' X@comment $FreeBSD$ Xbin/fakeroot Xman/man1/faked.1 Xman/man1/fakeroot.1 Xlib/libfakeroot.la Xlib/libfakeroot.so.0 Xlib/libfakeroot.so Xlib/libfakeroot.a Xbin/faked END-of-fakeroot/pkg-plist echo x - fakeroot/pkg-descr sed 's/^X//' >fakeroot/pkg-descr << 'END-of-fakeroot/pkg-descr' XFakeroot runs a command in an environment were it appears to have Xroot privileges for file manipulation, by setting LD_PRELOAD to a Xlibrary with alternative versions of getuid(), stat(), etc. This Xis useful for allowing users to create archives (tar, ar, .deb .rpm Xetc.) with files in them with root permissions/ownership. Without Xfakeroot one would have to have root privileges to create the Xconstituent files of the archives with the correct permissions and Xownership, and then pack them up, or one would have to construct Xthe archives directly, without using the archiver. X XWWW: http://freshmeat.net/projects/fakeroot END-of-fakeroot/pkg-descr echo x - fakeroot/distinfo sed 's/^X//' >fakeroot/distinfo << 'END-of-fakeroot/distinfo' XMD5 (fakeroot_0.8.5.tar.gz) = 5e4179328074d938872c4bcbe3245c3d XSIZE (fakeroot_0.8.5.tar.gz) = 842857 END-of-fakeroot/distinfo echo x - fakeroot/Makefile sed 's/^X//' >fakeroot/Makefile << 'END-of-fakeroot/Makefile' X# New ports collection makefile for: fakeroot X# Date created: 11 March 2004 X# Whom: Meno Abels <meno.abels@adviser.com> X# X# $FreeBSD$ X# X XPORTNAME= fakeroot XPORTVERSION= 0.8.5 XPORTREVISION= 1 XCATEGORIES= security XMASTER_SITES= http://ftp.debian.org/debian/pool/main/f/fakeroot/ XDISTNAME= ${PORTNAME}_${PORTVERSION} X XMAINTAINER= Meno.Abels@Adviser.com XCOMMENT= Fakeroot allow you to simulate the root user behavior like chown X XGNU_CONFIGURE= yes XCONFIGURE_TARGET= X XWRKSRC="${WRKDIR}/${PORTNAME}-${PORTVERSION}" X Xpost-build: X Xpost-install: X X.include <bsd.port.mk> END-of-fakeroot/Makefile echo c - fakeroot/files mkdir -p fakeroot/files > /dev/null 2>&1 echo x - fakeroot/files/patch-communicate.h sed 's/^X//' >fakeroot/files/patch-communicate.h << 'END-of-fakeroot/files/patch-communicate.h' X--- communicate.h Fri Sep 26 04:07:11 2003 X+++ communicate.h Thu Mar 11 12:51:34 2004 X@@ -38,7 +38,9 @@ X #if defined(sun) || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) X #define STAT64_SUPPORT X #else X+#if !defined(__FreeBSD__) X #warning Not using stat64 support X+#endif X /* if glibc is 2.0 or older, undefine these again */ X #undef STAT64_SUPPORT X #undef _LARGEFILE64_SOURCE END-of-fakeroot/files/patch-communicate.h echo x - fakeroot/files/patch-libfakeroot.c sed 's/^X//' >fakeroot/files/patch-libfakeroot.c << 'END-of-fakeroot/files/patch-libfakeroot.c' X--- libfakeroot.c Fri Dec 19 03:38:05 2003 X+++ libfakeroot.c Thu Mar 11 12:52:45 2004 X@@ -667,6 +667,6 @@ X return 0; X } X X-int setgroups(size_t size, const gid_t *list){ X+int setgroups(int size, const gid_t *list){ X return 0; X } END-of-fakeroot/files/patch-libfakeroot.c echo x - fakeroot/files/patch-doc.Makefile sed 's/^X//' >fakeroot/files/patch-doc.Makefile << 'END-of-fakeroot/files/patch-doc.Makefile' X--- doc/Makefile.am Tue Sep 2 06:00:59 2003 X+++ doc/Makefile.am Thu Mar 11 13:23:43 2004 X@@ -1,5 +1,4 @@ X AUTOMAKE_OPTIONS=foreign X-SUBDIRS = es fr sv X X man_MANS = faked.1 fakeroot.1 X X--- doc/Makefile.in Sun Feb 22 23:18:19 2004 X+++ doc/Makefile.in Thu Mar 11 13:23:47 2004 X@@ -161,7 +161,6 @@ X target_os = @target_os@ X target_vendor = @target_vendor@ X AUTOMAKE_OPTIONS = foreign X-SUBDIRS = es fr sv X man_MANS = faked.1 fakeroot.1 X X #another automake bug workaround END-of-fakeroot/files/patch-doc.Makefile echo x - fakeroot/files/patch-fakeroot sed 's/^X//' >fakeroot/files/patch-fakeroot << 'END-of-fakeroot/files/patch-fakeroot' X--- ../fakeroot-0.8.5/scripts/fakeroot Wed Nov 12 17:07:18 2003 X+++ scripts/fakeroot Thu Mar 11 13:40:00 2004 X@@ -16,7 +16,7 @@ X PREFIX=`dirname ${BINDIR}` X X LIB=libfakeroot.so.0 X-PATHS=${PREFIX}/lib/libfakeroot:${PREFIX}/lib64/libfakeroot X+PATHS=${PREFIX}/lib X FAKED=${BINDIR}/faked X X FAKED_MODE="unknown-is-root" X END-of-fakeroot/files/patch-fakeroot exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040311125247.3FA898400D>