diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 --- a/.cvsignore +++ /dev/null diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..406ec10 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/fakeroot_1.18.4.orig.tar.bz2 +/fakeroot_1.20.2.orig.tar.bz2 +/fakeroot_1.21.orig.tar.gz +/fakeroot_1.22.orig.tar.bz2 +/fakeroot_1.23.orig.tar.xz +/fakeroot_1.24.orig.tar.gz diff --git a/Makefile b/Makefile deleted file mode 100644 index ba24169..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: fakeroot -# $Id$ -NAME := fakeroot -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/debian_eglibc-fts-without-LFS.patch b/debian_eglibc-fts-without-LFS.patch new file mode 100644 index 0000000..5ba45fd --- /dev/null +++ b/debian_eglibc-fts-without-LFS.patch @@ -0,0 +1,26 @@ +--- a/libfakeroot.c ++++ b/libfakeroot.c +@@ -1949,11 +1949,7 @@ + || r->fts_info == FTS_NS || r->fts_info == FTS_NSOK)) + r->fts_statp = NULL; /* Otherwise fts_statp may be a random pointer */ + if(r && r->fts_statp) { /* Should we bother checking fts_info here? */ +-# if defined(STAT64_SUPPORT) && !defined(__APPLE__) +- SEND_GET_STAT64(r->fts_statp, _STAT_VER); +-# else + SEND_GET_STAT(r->fts_statp, _STAT_VER); +-# endif + } + + return r; +@@ -1972,11 +1968,7 @@ + first=next_fts_children(ftsp, options); + for(r = first; r; r = r->fts_link) { + if(r && r->fts_statp) { /* Should we bother checking fts_info here? */ +-# if defined(STAT64_SUPPORT) && !defined(__APPLE__) +- SEND_GET_STAT64(r->fts_statp, _STAT_VER); +-# else + SEND_GET_STAT(r->fts_statp, _STAT_VER); +-# endif + } + } + diff --git a/debian_fix-shell-in-fakeroot.patch b/debian_fix-shell-in-fakeroot.patch new file mode 100644 index 0000000..ce5d23f --- /dev/null +++ b/debian_fix-shell-in-fakeroot.patch @@ -0,0 +1,13 @@ +Description: Fix shell in fakeroot.in + Use /bin/sh instead of @SHELL@ in fakeroot.in +Author: Juan Picca +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. diff --git a/debian_hide-dlsym-error.patch b/debian_hide-dlsym-error.patch new file mode 100644 index 0000000..3fd34c8 --- /dev/null +++ b/debian_hide-dlsym-error.patch @@ -0,0 +1,32 @@ +Description: Hide error from dlsym() + dlsym(), starting in glibc 2.24 actually reports errors. In our case, + we try to get ACL functions which are not in the glibc. This causes + failures in test suites, so hide those messages for non-debugging + purposes for now. It also makes the build logs annoying to read. +Author: Julian Andres Klode +Origin: vendor +Bug-Debian: https://bugs.debian.org/830912 +Forwarded: no +Last-Update: 2016-08-12 + +--- a/libfakeroot.c ++++ b/libfakeroot.c +@@ -256,10 +256,16 @@ void load_library_symbols(void){ + /* clear dlerror() just in case dlsym() legitimately returns NULL */ + msg = dlerror(); + *(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name); ++ + if ( (msg = dlerror()) != NULL){ +- fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg); +-/* abort ();*/ ++#ifdef LIBFAKEROOT_DEBUGGING ++ if (fakeroot_debug) { ++ fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg); ++/* abort ();*/ ++ } ++#endif + } ++ + } + } + diff --git a/fakeroot-inttypes.patch b/fakeroot-inttypes.patch new file mode 100644 index 0000000..1c645dc --- /dev/null +++ b/fakeroot-inttypes.patch @@ -0,0 +1,55 @@ +diff -up fakeroot-1.20.2/faked.c.inttypes fakeroot-1.20.2/faked.c +--- fakeroot-1.20.2/faked.c.inttypes 2014-10-05 17:16:00.000000000 +0200 ++++ fakeroot-1.20.2/faked.c 2015-06-17 11:29:01.335799421 +0200 +@@ -125,7 +125,7 @@ + #ifdef FAKEROOT_DB_PATH + # include + #endif +- ++#include + #ifndef FAKEROOT_FAKENET + # define FAKE_KEY msg_key + #else /* FAKEROOT_FAKENET */ +@@ -614,10 +614,10 @@ int save_database(const uint32_t remote) + (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", +- (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); ++ fprintf(f,"dev=%" PRIx64 ",ino=%" PRIu64 ",mode=%" PRIo32 ",uid=%" PRIu32 ",gid=%" PRIu32 ",nlink=%" PRIu32",rdev=%" PRIu64 "\n", ++ i->buf.dev, i->buf.ino, i->buf.mode, ++ i->buf.uid, i->buf.gid, i->buf.nlink, ++ i->buf.rdev); + #endif + } + +@@ -655,7 +655,7 @@ int load_database(const uint32_t remote) + 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; +@@ -682,13 +682,13 @@ int load_database(const uint32_t remote) + /* */ + /*********************************/ + void debug_stat(const struct fakestat *st){ +- fprintf(stderr,"dev:ino=(%llx:%lli), mode=0%lo, own=(%li,%li), nlink=%li, rdev=%lli\n", ++ fprintf(stderr,"dev:ino=(%" PRIx64 ":%" PRIx64 "), mode=0%" PRIo32 ", own=(%" PRIi32 ",%" PRIi32 "), nlink=%" PRIi32 ", rdev=%" PRIi64 "\n", + st->dev, + st->ino, +- (long)st->mode, +- (long)st->uid, +- (long)st->gid, +- (long)st->nlink, ++ st->mode, ++ st->uid, ++ st->gid, ++ st->nlink, + st->rdev); + } + diff --git a/fakeroot-multilib.patch b/fakeroot-multilib.patch new file mode 100644 index 0000000..ba793a3 --- /dev/null +++ b/fakeroot-multilib.patch @@ -0,0 +1,12 @@ +diff -up fakeroot-1.20.2/scripts/fakeroot.in.multilib fakeroot-1.20.2/scripts/fakeroot.in +--- fakeroot-1.20.2/scripts/fakeroot.in.multilib 2014-10-05 17:16:00.000000000 +0200 ++++ fakeroot-1.20.2/scripts/fakeroot.in 2015-09-28 09:56:43.891990046 +0200 +@@ -35,7 +35,7 @@ FAKEROOT_BINDIR=@bindir@ + + USEABSLIBPATH=@LDPRELOADABS@ + LIB=lib@fakeroot_transformed@@DLSUFFIX@ +-PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot ++PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib/libfakeroot + FAKED=${FAKEROOT_BINDIR}/@faked_transformed@ + + FAKED_MODE="unknown-is-root" diff --git a/fakeroot.spec b/fakeroot.spec new file mode 100644 index 0000000..e52cf88 --- /dev/null +++ b/fakeroot.spec @@ -0,0 +1,338 @@ +%bcond_with autoconf + +Summary: Gives a fake root environment +Name: fakeroot +Version: 1.24 +Release: 2%{?dist} +# setenv.c: LGPLv2+ +# contrib/Fakeroot-Stat-1.8.8: Perl (GPL+ or Artistic) +# the rest: GPLv3+ +License: GPLv3+ and LGPLv2+ and (GPL+ or Artistic) +URL: https://tracker.debian.org/pkg/fakeroot +Source0: https://cdn-aws.deb.debian.org/debian/pool/main/f/fakeroot/%{name}_%{version}.orig.tar.gz + +# Debian package patches, from debian.tar.xz +Patch0: debian_eglibc-fts-without-LFS.patch +Patch2: debian_fix-shell-in-fakeroot.patch +Patch3: debian_hide-dlsym-error.patch +# Address some POSIX-types related problems. +Patch4: fakeroot-inttypes.patch +# Fix LD_LIBRARY_PATH for multilib: https://bugzilla.redhat.com/show_bug.cgi?id=1241527 +Patch5: fakeroot-multilib.patch + +%if %{with autoconf} +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: po4a +%endif +BuildRequires: /usr/bin/getopt +BuildRequires: gcc +# https://bugzilla.redhat.com/show_bug.cgi?id=887001 +BuildRequires: libacl-devel +BuildRequires: libcap-devel +# uudecode used by tests/tartest +BuildRequires: sharutils +Requires: /usr/bin/getopt +Requires: fakeroot-libs = %{version}-%{release} +Requires(post): /usr/sbin/alternatives +Requires(post): /usr/bin/readlink +Requires(preun): /usr/sbin/alternatives + + +%description +fakeroot runs a command in an environment wherein it appears to have +root privileges for file manipulation. fakeroot works by replacing the +file manipulation library functions (chmod(2), stat(2) etc.) by ones +that simulate the effect the real library functions would have had, +had the user really been root. + +%package libs +Summary: Gives a fake root environment (libraries) + +%description libs +This package contains the libraries required by %{name}. + +%prep +%autosetup -p1 + +%build +%if %{with autoconf} +autoreconf -i +pushd doc +po4a -k 0 --rm-backups --variable "srcdir=../doc/" po4a/po4a.cfg +popd +%endif + +for file in ./doc/{*.1,*/*.1}; do + iconv -f latin1 -t utf8 < $file > $file.new && \ + mv -f $file.new $file +done + +for type in sysv tcp; do +mkdir obj-$type +cd obj-$type +cat >> configure << 'EOF' +#!/bin/sh +exec ../configure "$@" +EOF +chmod +x configure +%configure \ + --disable-dependency-tracking \ + --disable-static \ + --libdir=%{_libdir}/libfakeroot \ + --with-ipc=$type \ + --program-suffix=-$type +make +cd .. +done + +%install +for type in sysv tcp; do + make -C obj-$type install libdir=%{_libdir}/libfakeroot DESTDIR=%{buildroot} + mv %{buildroot}%{_libdir}/libfakeroot/libfakeroot-0.so \ + %{buildroot}%{_libdir}/libfakeroot/libfakeroot-$type.so + rm -f %{buildroot}%{_libdir}/libfakeroot/libfakeroot.so + rm -f %{buildroot}%{_libdir}/libfakeroot/libfakeroot.*la + %find_lang faked-$type --without-mo --with-man + %find_lang fakeroot-$type --without-mo --with-man +done + +rm %{buildroot}%{_mandir}{,/*}/man1/fake{d,root}-sysv.1 +rename -- -tcp '' %{buildroot}%{_mandir}{,/*}/man1/fake{d,root}-tcp.1 +sed -e 's/-tcp//g' fake{d,root}-tcp.lang > fakeroot.lang + +%check +for type in sysv tcp; do + make -C obj-$type check VERBOSE=1 +done + +%post +link=$(readlink -e "/usr/bin/fakeroot") +if [ "$link" = "/usr/bin/fakeroot" ]; then + rm -f /usr/bin/fakeroot +fi +link=$(readlink -e "%{_bindir}/faked") +if [ "$link" = "%{_bindir}/faked" ]; then + rm -f "%{_bindir}/faked" +fi +link=$(readlink -e "%{_libdir}/libfakeroot/libfakeroot-0.so") +if [ "$link" = "%{_libdir}/libfakeroot/libfakeroot-0.so" ]; then + rm -f "%{_libdir}/libfakeroot/libfakeroot-0.so" +fi + +/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot \ + "%{_bindir}/fakeroot-tcp" 50 \ + --slave %{_bindir}/faked faked %{_bindir}/faked-tcp \ + --slave %{_libdir}/libfakeroot/libfakeroot-0.so libfakeroot.so %{_libdir}/libfakeroot/libfakeroot-tcp.so \ + +/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot \ + "%{_bindir}/fakeroot-sysv" 40 \ + --slave %{_bindir}/faked faked %{_bindir}/faked-sysv \ + --slave %{_libdir}/libfakeroot/libfakeroot-0.so libfakeroot.so %{_libdir}/libfakeroot/libfakeroot-sysv.so \ + +%preun +if [ $1 = 0 ]; then + /usr/sbin/alternatives --remove fakeroot "%{_bindir}/fakeroot-tcp" + /usr/sbin/alternatives --remove fakeroot "%{_bindir}/fakeroot-sysv" +fi + +%files -f %{name}.lang +%defattr(-,root,root,-) +%doc COPYING AUTHORS BUGS DEBUG doc/README.saving +%{_bindir}/faked-* +%ghost %{_bindir}/faked +%{_bindir}/fakeroot-* +%ghost %{_bindir}/fakeroot +%{_mandir}/man1/faked.1* +%{_mandir}/man1/fakeroot.1* + +%files libs +%dir %{_libdir}/libfakeroot +%{_libdir}/libfakeroot/libfakeroot-sysv.so +%{_libdir}/libfakeroot/libfakeroot-tcp.so +%ghost %{_libdir}/libfakeroot/libfakeroot-0.so + +%changelog +* Tue Sep 24 2019 Dominik Mierzejewski - 1.24-2 +- stop alternativizing manpages, they're identical for both sysv and tcp + variants (#1677540) + +* Fri Sep 20 2019 Dominik Mierzejewski - 1.24-1 +- update to 1.24 (#1750054) +- update source URL +- drop obsolete patches + +* Thu Jul 25 2019 Fedora Release Engineering - 1.23-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 1.23-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Nov 30 2018 Dominik Mierzejewski - 1.23-2 +- t.tar failure is no longer reproducible (#1601392) + +* Mon Jul 16 2018 Dominik Mierzejewski - 1.23-1 +- update to 1.23 (#1597055) +- point to working URLs +- pretend t.tar test succeeds for now (#1601392) +- make testsuite more verbose for the future + +* Fri Jul 13 2018 Fedora Release Engineering - 1.22-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 1.22-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Aug 29 2017 Dominik Mierzejewski - 1.22-1 +- update to 1.22 + +* Wed Aug 02 2017 Fedora Release Engineering - 1.21-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.21-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 1.21-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sat Dec 31 2016 Adam Williamson - 1.21-2 +- Apply all patches from Debian package (should fix libuser build) + +* Sat Dec 31 2016 Adam Williamson - 1.21-1 +- New release 1.21 + +* Wed Feb 03 2016 Fedora Release Engineering - 1.20.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sat Dec 26 2015 Dominik Mierzejewski - 1.20.2-3 +- fix root privilege faking for copied files/dirs (bug 887001) + +* Mon Sep 28 2015 Dominik Mierzejewski - 1.20.2-2 +- fix LD_LIBRARY_PATH for multilib environment (bug 1241527) +- update License: tag +- don't strip the libraries in install, just keep the executable bit +- when converting from latin1 to utf8, don't use the converted file + if the conversion failed: the pt manpage is already utf8 + +* Thu Jun 18 2015 Dominik Mierzejewski - 1.20.2-1 +- update to 1.20.2 +- alternativize libfakeroot and faked as well (bug 817088) +- include Portugese manpages +- add missing BR: libcap-devel +- autogenerate most of the file list + +* Wed Jun 17 2015 Fedora Release Engineering - 1.18.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Feb 21 2015 Till Maas - 1.18.4-5 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Sat Aug 16 2014 Fedora Release Engineering - 1.18.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.18.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Aug 26 2013 Ralf Corsépius - 1.18.4-2 +- Add alternatives (Mimic Debian's behavior). + +* Fri Jul 26 2013 Ralf Corsépius - 1.18.4-1 +- Upstream update. +- Spec cleanup. +- Add fakeroot-1.18.4-inttypes.patch. + +* Wed Feb 13 2013 Fedora Release Engineering - 1.12.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 1.12.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 1.12.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 1.12.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu May 27 2010 Richard W.M. Jones - 1.12.4-2 +- Strip libfakeroot-*.so (RHBZ#596735). +- Verified that libguestfs still builds and runs with this change (this + represents a fairly aggressive test of fakeroot). + +* Fri Jan 29 2010 Richard W.M. Jones - 1.12.4-1 +- Upstream removed the tarball for 1.12.2, which made Source0 invalid. +- There is a new version (1.12.4), so update to the new version. + +* Fri Jul 24 2009 Fedora Release Engineering - 1.12.2-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sun Mar 22 2009 Axel Thimm - 1.12.2-21 +- Update to 1.12.2. +- Create a fakeroot-libs subpackage so that the package is multilib + aware (by Richard W.M. Jones , see RH bug + #490953). + +* Sat Feb 14 2009 Axel Thimm - 1.12.1-20 +- Update to 1.12.1. + +* Sat Nov 22 2008 Axel Thimm - 1.11-19 +- Update to 1.11. + +* Fri Oct 3 2008 Axel Thimm - 1.9.7-18 +- Update to 1.9.7. + +* Sun Aug 24 2008 Axel Thimm - 1.9.6-17 +- %%check || : does not work anymore. + +* Sun Aug 3 2008 Axel Thimm - 1.9.6-16 +- Update to 1.9.6. + +* Thu Mar 8 2007 Axel Thimm - 1.6.4-15 +- Update to 1.6.4. + +* Wed Jan 10 2007 Axel Thimm - 1.5.12-14 +- Update to 1.5.12. + +* Sun Jan 7 2007 Axel Thimm - 1.5.10-13 +- po4a currently not need as a BR. +- remove empty README, add debian/changelog. + +* Sun Dec 31 2006 Axel Thimm - 1.5.10-12 +- Add %%{_libdir}/libfakeroot to %%files. +- Add %%check. + +* Fri Dec 29 2006 Axel Thimm - 1.5.10-11 +- Extend the %%description a bit. + +* Thu Dec 28 2006 Axel Thimm - 1.5.10-10 +- Don't build static lib. +- Exclude libtool lib. +- %%makeinstall to make install DESTDIR=%%buildroot. + +* Mon Aug 7 2006 Axel Thimm - 1.5.10-9 +- Update to 1.5.10. + +* Fri Feb 17 2006 Axel Thimm +- Update to 1.5.7. + +* Thu Nov 24 2005 Axel Thimm +- Update to 1.5.5. + +* Sat Sep 17 2005 Axel Thimm +- Update to 1.5.1. + +* Fri Sep 2 2005 Axel Thimm +- Update to 1.4.3. + +* Sun Jul 3 2005 Axel Thimm +- Update to 1.4.1. + +* Sun Feb 6 2005 Axel Thimm +- Update to 1.2.4. + +* Sun Jan 25 2004 Axel Thimm +- Update to 0.8.3. + +* Wed Oct 8 2003 Axel Thimm +- Initial build. diff --git a/sources b/sources index e69de29..3df2f4a 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (fakeroot_1.24.orig.tar.gz) = b15db7bbfb03264f294fb3b42813e17758b43ef7f121e55a24af9ec30ff3f4ec8eb0392db88133e56f9728b3828f6c1432d1e5d2e881a69d083ad444b9177487