update to 1.25.2

This commit is contained in:
jpzhang187 2020-11-20 11:10:42 +08:00
parent 0ff749ad9b
commit 5d50e3fe44
8 changed files with 81 additions and 319 deletions

View File

@ -1,108 +0,0 @@
Fix the type of xattr functions to match the glibc headers.
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -1570,7 +1570,7 @@
#endif /* HAVE_CAPSET */
#if defined(HAVE_SETXATTR) || defined(HAVE_LSETXATTR) || defined(HAVE_FSETXATTR)
-static size_t common_setxattr(INT_STRUCT_STAT *st, const char *name, void * value, size_t size, int flags)
+static int common_setxattr(INT_STRUCT_STAT *st, const char *name, const void * value, size_t size, int flags)
{
xattr_args xattr;
xattr.name = name;
@@ -1625,7 +1625,7 @@
#endif /* defined(HAVE_LISTXATTR) || defined(HAVE_LLISTXATTR) || defined(HAVE_FLISTXATTR) */
#if defined(HAVE_REMOVEXATTR) || defined(HAVE_LREMOVEXATTR) || defined(HAVE_FREMOVEXATTR)
-static size_t common_removexattr(INT_STRUCT_STAT *st, const char *name)
+static int common_removexattr(INT_STRUCT_STAT *st, const char *name)
{
xattr_args xattr;
xattr.name = name;
@@ -1643,7 +1643,7 @@
#endif /* defined(HAVE_REMOVEXATTR) || defined(HAVE_LREMOVEXATTR) || defined(HAVE_FREMOVEXATTR) */
#ifdef HAVE_SETXATTR
-ssize_t setxattr(const char *path, const char *name, void *value, size_t size, int flags)
+int setxattr(const char *path, const char *name, const void *value, size_t size, int flags)
{
INT_STRUCT_STAT st;
int r;
@@ -1664,7 +1664,7 @@
#endif /* HAVE_SETXATTR */
#ifdef HAVE_LSETXATTR
-ssize_t lsetxattr(const char *path, const char *name, void *value, size_t size, int flags)
+int lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags)
{
INT_STRUCT_STAT st;
int r;
@@ -1685,7 +1685,7 @@
#endif /* HAVE_LSETXATTR */
#ifdef HAVE_FSETXATTR
-ssize_t fsetxattr(int fd, const char *name, void *value, size_t size, int flags)
+int fsetxattr(int fd, const char *name, const void *value, size_t size, int flags)
{
INT_STRUCT_STAT st;
int r;
@@ -1832,7 +1832,7 @@
#endif /* HAVE_FLISTXATTR */
#ifdef HAVE_REMOVEXATTR
-ssize_t removexattr(const char *path, const char *name)
+int removexattr(const char *path, const char *name)
{
INT_STRUCT_STAT st;
int r;
@@ -1853,7 +1853,7 @@
#endif /* HAVE_REMOVEXATTR */
#ifdef HAVE_LREMOVEXATTR
-ssize_t lremovexattr(const char *path, const char *name)
+int lremovexattr(const char *path, const char *name)
{
INT_STRUCT_STAT st;
int r;
@@ -1874,7 +1874,7 @@
#endif /* HAVE_LREMOVEXATTR */
#ifdef HAVE_FREMOVEXATTR
-ssize_t fremovexattr(int fd, const char *name)
+int fremovexattr(int fd, const char *name)
{
INT_STRUCT_STAT st;
int r;
--- a/wrapfunc.inp
+++ b/wrapfunc.inp
@@ -168,22 +168,22 @@
fgetxattr;ssize_t;(int fd, const char *name, void *value, size_t size);(fd, name, value, size)
#endif /* HAVE_FGETXATTR */
#ifdef HAVE_SETXATTR
-setxattr;ssize_t;(const char *path, const char *name, void *value, size_t size, int flags);(path, name, value, size, flags)
+setxattr;int;(const char *path, const char *name, const void *value, size_t size, int flags);(path, name, value, size, flags)
#endif /* HAVE_SETXATTR */
#ifdef HAVE_LSETXATTR
-lsetxattr;ssize_t;(const char *path, const char *name, void *value, size_t size, int flags);(path, name, value, size, flags)
+lsetxattr;int;(const char *path, const char *name, const void *value, size_t size, int flags);(path, name, value, size, flags)
#endif /* HAVE_LSETXATTR */
#ifdef HAVE_FSETXATTR
-fsetxattr;ssize_t;(int fd, const char *name, void *value, size_t size, int flags);(fd, name, value, size, flags)
+fsetxattr;int;(int fd, const char *name, const void *value, size_t size, int flags);(fd, name, value, size, flags)
#endif /* HAVE_FSETXATTR */
#ifdef HAVE_REMOVEXATTR
-removexattr;ssize_t;(const char *path, const char *name);(path, name)
+removexattr;int;(const char *path, const char *name);(path, name)
#endif /* HAVE_REMOVEXATTR */
#ifdef HAVE_LREMOVEXATTR
-lremovexattr;ssize_t;(const char *path, const char *name);(path, name)
+lremovexattr;int;(const char *path, const char *name);(path, name)
#endif /* HAVE_LREMOVEXATTR */
#ifdef HAVE_FREMOVEXATTR
-fremovexattr;ssize_t;(int fd, const char *name);(fd, name)
+fremovexattr;int;(int fd, const char *name);(fd, name)
#endif /* HAVE_FREMOVEXATTR */
#ifdef HAVE_FSTATAT

View File

@ -1,32 +0,0 @@
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 <juliank@ubuntu.com>
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
}
+
}
}

View File

@ -1,10 +1,10 @@
diff -up fakeroot-1.20.2/scripts/fakeroot.in.multilib fakeroot-1.20.2/scripts/fakeroot.in diff -up fakeroot-1.25.2/scripts/fakeroot.in.multilib fakeroot-1.25.2/scripts/fakeroot.in
--- fakeroot-1.20.2/scripts/fakeroot.in.multilib 2014-10-05 17:16:00.000000000 +0200 --- fakeroot-1.25.2/scripts/fakeroot.in.multilib 2020-10-05 21:34:34.584490563 +0200
+++ fakeroot-1.20.2/scripts/fakeroot.in 2015-09-28 09:56:43.891990046 +0200 +++ fakeroot-1.25.2/scripts/fakeroot.in 2020-10-05 21:35:33.264201406 +0200
@@ -35,7 +35,7 @@ FAKEROOT_BINDIR=@bindir@ @@ -35,7 +35,7 @@ FAKEROOT_BINDIR=@bindir@
USEABSLIBPATH=@LDPRELOADABS@ USEABSLIBPATH=@LDPRELOADABS@
LIB=lib@fakeroot_transformed@@DLSUFFIX@ FAKEROOT_LIB=lib@fakeroot_transformed@@DLSUFFIX@
-PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot -PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot
+PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib/libfakeroot +PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib/libfakeroot
FAKED=${FAKEROOT_BINDIR}/@faked_transformed@ FAKED=${FAKEROOT_BINDIR}/@faked_transformed@

View File

@ -1,40 +0,0 @@
diff --git a/test/Makefile.am b/test/Makefile.am
index b37d4cd..12b6056 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,15 +1,11 @@
AUTOMAKE_OPTIONS=foreign
TESTS = \
- t.chmod_dev \
t.echoarg \
t.falsereturn \
- t.mknod \
t.no_ld_preload \
t.no_ld_preload_link \
t.option \
- t.tar \
- t.touchinstall \
t.truereturn \
t.xattr
diff --git a/test/Makefile.in b/test/Makefile.in
index f565485..5727ecf 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -459,15 +459,11 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
TESTS = \
- t.chmod_dev \
t.echoarg \
t.falsereturn \
- t.mknod \
t.no_ld_preload \
t.no_ld_preload_link \
t.option \
- t.tar \
- t.touchinstall \
t.truereturn \
t.xattr

View File

@ -1,12 +0,0 @@
diff -up fakeroot-1.23/test/tartest.tests fakeroot-1.23/test/tartest
--- fakeroot-1.23/test/tartest.tests 2018-07-16 11:23:37.524589359 +0200
+++ fakeroot-1.23/test/tartest 2018-07-16 11:33:46.051167023 +0200
@@ -79,7 +79,7 @@ uudecode ${SRCDIR}/tartest.tar.gz.uue
tar -cf - tar | gzip -9 > faketar.tar.gz
-${SRCDIR}/compare-tar tartest.tar.gz faketar.tar.gz
+${SRCDIR}/compare-tar tartest.tar.gz faketar.tar.gz || :
#test 2: try to unpack, pack the tar archive, and
# see if the result is the same archive

Binary file not shown.

View File

@ -1,141 +1,106 @@
%bcond_with autoconf %bcond_without autoconf
Name: fakeroot
Version: 1.23
Release: 3
Summary: Gives a fake root environment Summary: Gives a fake root environment
License: GPLv3+ and LGPLv2+ and (GPL+ or Artistic) Name: fakeroot
Version: 1.25.2
Release: 1
License: GPLv3+ and LGPLv2.1 and MIT and GPL+
URL: https://tracker.debian.org/pkg/fakeroot URL: https://tracker.debian.org/pkg/fakeroot
Source0: http://http.debian.net/debian/pool/main/f/fakeroot/%{name}_%{version}.orig.tar.xz Source0: http://salsa.debian.org/clint/fakeroot/-/archive/upstream/1.25.2/%{name}-upstream-%{version}.tar.gz
Patch0: debian_eglibc-fts-without-LFS.patch
Patch0000: debian_eglibc-fts-without-LFS.patch Patch2: debian_fix-shell-in-fakeroot.patch
Patch0001: debian_glibc-xattr-types.patch Patch4: fakeroot-inttypes.patch
Patch0002: debian_fix-shell-in-fakeroot.patch Patch5: fakeroot-multilib.patch
Patch0003: debian_hide-dlsym-error.patch
Patch0004: fakeroot-inttypes.patch
Patch0005: fakeroot-multilib.patch
Patch0006: fakeroot-tests.patch
Patch0007: fakeroot-remove-four-test-cases.patch
%if %{with autoconf} %if %{with autoconf}
BuildRequires: autoconf automake libtool po4a BuildRequires: autoconf automake libtool po4a
%endif %endif
BuildRequires: util-linux libacl-devel libcap-devel sharutils BuildRequires: /usr/bin/getopt libacl-devel libcap-devel sharutils
Requires: util-linux Requires: /usr/bin/getopt fakeroot-libs = %{version}-%{release}
Requires(post): chkconfig Requires(post): /usr/sbin/alternatives
Requires(post): coreutils Requires(post): /usr/bin/readlink
Requires(preun):chkconfig Requires(preun): /usr/sbin/alternatives
Provides: fakeroot-libs = %{version}-%{release}
Obsoletes: fakeroot-libs < %{version}-%{release}
%description %description
fakeroot replaces the invocation of library function to run a command fakeroot runs a command in an environment wherein it appears to have
in a fake environment in which it executes just like has root privileges. root privileges for file manipulation. fakeroot works by replacing the
This is implemented by simulating the file manipulation functions such as file manipulation library functions (chmod(2), stat(2) etc.) by ones
chmod and stat. that simulate the effect the real library functions would have had,
had the user really been root.
%package help %package libs
Summary: Documentation for fakeroot Summary: Gives a fake root environment (libraries)
%description help %description libs
Documentation for fakeroot This package contains the libraries required by %{name}.
%prep %prep
%autosetup -p1 %autosetup -p1 -n %{name}-upstream-%{version}
%build %build
%if %{with autoconf} %if %{with autoconf}
autoreconf -i ./bootstrap
cd doc pushd doc
po4a -k 0 --rm-backups --variable "srcdir=../doc/" po4a/po4a.cfg po4a -k 0 --rm-backups --variable "srcdir=../doc/" po4a/po4a.cfg
cd - popd
%endif %endif
for file in ./doc/{*.1,*/*.1}; do for file in ./doc/{*.1,*/*.1}; do
iconv -f latin1 -t utf8 < $file > $file.new && \ iconv -f latin1 -t utf8 < $file > $file.new && \
mv -f $file.new $file mv -f $file.new $file
done done
for type in sysv tcp; do for type in sysv tcp; do
mkdir obj-$type mkdir obj-$type
cd obj-$type cd obj-$type
cat >> configure << 'EOF' cat >> configure << 'EOF'
#!/bin/sh
exec ../configure "$@" exec ../configure "$@"
EOF EOF
chmod +x configure chmod +x configure
%configure --disable-dependency-tracking --disable-static \ %configure \
--libdir=%{_libdir}/libfakeroot --with-ipc=$type --program-suffix=-$type --disable-dependency-tracking \
--disable-static \
--libdir=%{_libdir}/libfakeroot \
--with-ipc=$type \
--program-suffix=-$type
make make
cd .. cd ..
done done
%install %install
for type in sysv tcp; do for type in sysv tcp; do
%make_install -C obj-$type libdir=%{_libdir}/libfakeroot make -C obj-$type install libdir=%{_libdir}/libfakeroot DESTDIR=%{buildroot}
mv %{buildroot}%{_libdir}/libfakeroot/libfakeroot-{0,$type}.so 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.so
%delete_la rm -f %{buildroot}%{_libdir}/libfakeroot/libfakeroot.*la
%find_lang faked-$type --without-mo --with-man %find_lang faked-$type --without-mo --with-man
%find_lang fakeroot-$type --without-mo --with-man %find_lang fakeroot-$type --without-mo --with-man
done done
rm %{buildroot}%{_mandir}{,/*}/man1/fake{d,root}-sysv.1
cat fake{d,root}-{sysv,tcp}.lang > fakeroot.lang rename -- -tcp '' %{buildroot}%{_mandir}{,/*}/man1/fake{d,root}-tcp.1
sed -e 's/-tcp//g' fake{d,root}-tcp.lang > fakeroot.lang
%check %check
make -C obj-sysv check VERBOSE=1 for type in sysv tcp; do
make -C obj-tcp check VERBOSE=1 make -C obj-$type check VERBOSE=1
%post
for name in fakeroot faked; do
link=$(readlink -e "/usr/bin/$name")
if [ "$link" = "/usr/bin/$name" ]; then
rm -f /usr/bin/$name
fi
done 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") link=$(readlink -e "%{_libdir}/libfakeroot/libfakeroot-0.so")
if [ "$link" = "%{_libdir}/libfakeroot/libfakeroot-0.so" ]; then if [ "$link" = "%{_libdir}/libfakeroot/libfakeroot-0.so" ]; then
rm -f "%{_libdir}/libfakeroot/libfakeroot-0.so" rm -f "%{_libdir}/libfakeroot/libfakeroot-0.so"
fi fi
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot \
for type in tcp sysv; do "%{_bindir}/fakeroot-tcp" 50 \
if [ "$type" = "tcp" ]; then --slave %{_bindir}/faked faked %{_bindir}/faked-tcp \
priority=50 --slave %{_libdir}/libfakeroot/libfakeroot-0.so libfakeroot.so %{_libdir}/libfakeroot/libfakeroot-tcp.so
else /usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot \
priority=40 "%{_bindir}/fakeroot-sysv" 40 \
fi --slave %{_bindir}/faked faked %{_bindir}/faked-sysv \
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot "%{_bindir}/fakeroot-$type" $priority \ --slave %{_libdir}/libfakeroot/libfakeroot-0.so libfakeroot.so %{_libdir}/libfakeroot/libfakeroot-sysv.so \
--slave %{_bindir}/faked faked %{_bindir}/faked-$type \
--slave %{_libdir}/libfakeroot/libfakeroot-0.so libfakeroot.so %{_libdir}/libfakeroot/libfakeroot-$type.so
done
%post help
for type in tcp sysv; do
if [ "$type" = "tcp" ]; then
priority=50
else
priority=40
fi
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot "%{_bindir}/fakeroot-$type" $priority \
--slave %{_mandir}/man1/fakeroot.1.gz fakeroot.1.gz %{_mandir}/man1/fakeroot-$type.1.gz \
--slave %{_mandir}/man1/faked.1.gz faked.1.gz %{_mandir}/man1/faked-$type.1.gz
done
for lang in de es fr nl pt sv; do
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot "%{_bindir}/fakeroot-tcp" 50 \
--slave %{_mandir}/$lang/man1/fakeroot.1.gz fakeroot.$lang.1.gz %{_mandir}/$lang/man1/fakeroot-tcp.1.gz \
--slave %{_mandir}/$lang/man1/faked.1.gz faked.$lang.1.gz %{_mandir}/$lang/man1/faked-tcp.1.gz
done
for lang in de es fr nl pt sv; do
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot "%{_bindir}/fakeroot-sysv" 40 \
--slave %{_mandir}/$lang/man1/fakeroot.1.gz fakeroot.$lang.1.gz %{_mandir}/$lang/man1/fakeroot-sysv.1.gz \
--slave %{_mandir}/$lang/man1/faked.1.gz faked.$lang.1.gz %{_mandir}/$lang/man1/faked-sysv.1.gz
done
%preun %preun
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
@ -143,37 +108,26 @@ if [ $1 = 0 ]; then
/usr/sbin/alternatives --remove fakeroot "%{_bindir}/fakeroot-sysv" /usr/sbin/alternatives --remove fakeroot "%{_bindir}/fakeroot-sysv"
fi fi
%files %files -f %{name}.lang
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc COPYING AUTHORS BUGS DEBUG %doc COPYING AUTHORS BUGS DEBUG doc/README.saving
%{_bindir}/faked-* %{_bindir}/faked-*
%ghost %{_bindir}/faked %ghost %{_bindir}/faked
%{_bindir}/fakeroot-* %{_bindir}/fakeroot-*
%ghost %{_bindir}/fakeroot %ghost %{_bindir}/fakeroot
%{_mandir}/man1/faked.1*
%{_mandir}/man1/fakeroot.1*
%files libs
%dir %{_libdir}/libfakeroot %dir %{_libdir}/libfakeroot
%{_libdir}/libfakeroot/libfakeroot-*.so %{_libdir}/libfakeroot/libfakeroot-sysv.so
%{_libdir}/libfakeroot/libfakeroot-tcp.so
%ghost %{_libdir}/libfakeroot/libfakeroot-0.so %ghost %{_libdir}/libfakeroot/libfakeroot-0.so
%files help
%doc doc/README.saving
%{_mandir}/man1/*
%{_mandir}/*/man1/*
%ghost %{_mandir}/man1/faked.1.gz
%ghost %{_mandir}/man1/fakeroot.1.gz
%ghost %lang(de) %{_mandir}/de/man1/faked.1.gz
%ghost %lang(de) %{_mandir}/de/man1/fakeroot.1.gz
%ghost %lang(es) %{_mandir}/es/man1/faked.1.gz
%ghost %lang(es) %{_mandir}/es/man1/fakeroot.1.gz
%ghost %lang(fr) %{_mandir}/fr/man1/faked.1.gz
%ghost %lang(fr) %{_mandir}/fr/man1/fakeroot.1.gz
%ghost %lang(pt) %{_mandir}/pt/man1/faked.1.gz
%ghost %lang(pt) %{_mandir}/pt/man1/fakeroot.1.gz
%ghost %lang(sv) %{_mandir}/sv/man1/faked.1.gz
%ghost %lang(sv) %{_mandir}/sv/man1/fakeroot.1.gz
%ghost %lang(nl) %{_mandir}/nl/man1/faked.1.gz
%ghost %lang(nl) %{_mandir}/nl/man1/fakeroot.1.gz
%changelog %changelog
* Fri Nov 20 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.25.2-1
- Update to 1.25.2
* Wed Aug 12 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.23-3 * Wed Aug 12 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.23-3
- remove four test cases to solve the compilation failure - remove four test cases to solve the compilation failure

Binary file not shown.