2020-11-20 11:10:42 +08:00
|
|
|
%bcond_without autoconf
|
|
|
|
|
Summary: Gives a fake root environment
|
|
|
|
|
Name: fakeroot
|
|
|
|
|
Version: 1.25.2
|
2022-06-21 11:30:29 +08:00
|
|
|
Release: 3
|
2020-11-20 11:10:42 +08:00
|
|
|
License: GPLv3+ and LGPLv2.1 and MIT and GPL+
|
|
|
|
|
URL: https://tracker.debian.org/pkg/fakeroot
|
|
|
|
|
Source0: http://salsa.debian.org/clint/fakeroot/-/archive/upstream/1.25.2/%{name}-upstream-%{version}.tar.gz
|
|
|
|
|
Patch0: debian_eglibc-fts-without-LFS.patch
|
|
|
|
|
Patch2: debian_fix-shell-in-fakeroot.patch
|
|
|
|
|
Patch4: fakeroot-inttypes.patch
|
|
|
|
|
Patch5: fakeroot-multilib.patch
|
2022-06-21 11:30:29 +08:00
|
|
|
Patch6: fakeroot-drop-tartest.patch
|
2021-03-13 15:21:20 +08:00
|
|
|
Patch6000: backport-define-_STAT_VER-if-not-already-defined.patch
|
|
|
|
|
Patch6001: backport-add-wrappers-for-new-glibc-2.33+-symbols.patch
|
|
|
|
|
Patch6002: backport-fix-compile-error-with-DEBUG-enabled.patch
|
|
|
|
|
Patch6003: backport-fix-__xmknod-at-pointer-argument.patch
|
2019-11-30 16:41:20 +08:00
|
|
|
%if %{with autoconf}
|
2020-11-20 11:10:42 +08:00
|
|
|
BuildRequires: autoconf automake libtool po4a
|
2019-11-30 16:41:20 +08:00
|
|
|
%endif
|
2020-11-20 11:10:42 +08:00
|
|
|
BuildRequires: /usr/bin/getopt libacl-devel libcap-devel sharutils
|
|
|
|
|
Requires: /usr/bin/getopt fakeroot-libs = %{version}-%{release}
|
|
|
|
|
Requires(post): /usr/sbin/alternatives
|
|
|
|
|
Requires(post): /usr/bin/readlink
|
|
|
|
|
Requires(preun): /usr/sbin/alternatives
|
2019-11-30 16:41:20 +08:00
|
|
|
%description
|
2020-11-20 11:10:42 +08:00
|
|
|
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.
|
2019-11-30 16:41:20 +08:00
|
|
|
|
2020-11-20 11:10:42 +08:00
|
|
|
%package libs
|
|
|
|
|
Summary: Gives a fake root environment (libraries)
|
|
|
|
|
%description libs
|
|
|
|
|
This package contains the libraries required by %{name}.
|
2019-11-30 16:41:20 +08:00
|
|
|
|
|
|
|
|
%prep
|
2020-11-20 11:10:42 +08:00
|
|
|
%autosetup -p1 -n %{name}-upstream-%{version}
|
2019-11-30 16:41:20 +08:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%if %{with autoconf}
|
2020-11-20 11:10:42 +08:00
|
|
|
./bootstrap
|
|
|
|
|
pushd doc
|
2019-11-30 16:41:20 +08:00
|
|
|
po4a -k 0 --rm-backups --variable "srcdir=../doc/" po4a/po4a.cfg
|
2020-11-20 11:10:42 +08:00
|
|
|
popd
|
2019-11-30 16:41:20 +08:00
|
|
|
%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'
|
|
|
|
|
exec ../configure "$@"
|
|
|
|
|
EOF
|
|
|
|
|
chmod +x configure
|
2020-11-20 11:10:42 +08:00
|
|
|
%configure \
|
|
|
|
|
--disable-dependency-tracking \
|
|
|
|
|
--disable-static \
|
|
|
|
|
--libdir=%{_libdir}/libfakeroot \
|
|
|
|
|
--with-ipc=$type \
|
|
|
|
|
--program-suffix=-$type
|
2019-11-30 16:41:20 +08:00
|
|
|
make
|
|
|
|
|
cd ..
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
for type in sysv tcp; do
|
2020-11-20 11:10:42 +08:00
|
|
|
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
|
2019-11-30 16:41:20 +08:00
|
|
|
done
|
2020-11-20 11:10:42 +08:00
|
|
|
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
|
2019-11-30 16:41:20 +08:00
|
|
|
|
|
|
|
|
%check
|
2020-11-20 11:10:42 +08:00
|
|
|
for type in sysv tcp; do
|
|
|
|
|
make -C obj-$type check VERBOSE=1
|
2019-11-30 16:41:20 +08:00
|
|
|
done
|
|
|
|
|
|
2020-11-20 11:10:42 +08:00
|
|
|
%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
|
2019-11-30 16:41:20 +08:00
|
|
|
link=$(readlink -e "%{_libdir}/libfakeroot/libfakeroot-0.so")
|
|
|
|
|
if [ "$link" = "%{_libdir}/libfakeroot/libfakeroot-0.so" ]; then
|
|
|
|
|
rm -f "%{_libdir}/libfakeroot/libfakeroot-0.so"
|
|
|
|
|
fi
|
2020-11-20 11:10:42 +08:00
|
|
|
/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 \
|
2019-11-30 16:41:20 +08:00
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
if [ $1 = 0 ]; then
|
|
|
|
|
/usr/sbin/alternatives --remove fakeroot "%{_bindir}/fakeroot-tcp"
|
|
|
|
|
/usr/sbin/alternatives --remove fakeroot "%{_bindir}/fakeroot-sysv"
|
|
|
|
|
fi
|
|
|
|
|
|
2020-11-20 11:10:42 +08:00
|
|
|
%files -f %{name}.lang
|
2019-11-30 16:41:20 +08:00
|
|
|
%defattr(-,root,root,-)
|
2020-11-20 11:10:42 +08:00
|
|
|
%doc COPYING AUTHORS BUGS DEBUG doc/README.saving
|
2019-11-30 16:41:20 +08:00
|
|
|
%{_bindir}/faked-*
|
|
|
|
|
%ghost %{_bindir}/faked
|
|
|
|
|
%{_bindir}/fakeroot-*
|
|
|
|
|
%ghost %{_bindir}/fakeroot
|
2020-11-20 11:10:42 +08:00
|
|
|
%{_mandir}/man1/faked.1*
|
|
|
|
|
%{_mandir}/man1/fakeroot.1*
|
|
|
|
|
|
|
|
|
|
%files libs
|
2019-11-30 16:41:20 +08:00
|
|
|
%dir %{_libdir}/libfakeroot
|
2020-11-20 11:10:42 +08:00
|
|
|
%{_libdir}/libfakeroot/libfakeroot-sysv.so
|
|
|
|
|
%{_libdir}/libfakeroot/libfakeroot-tcp.so
|
2019-11-30 16:41:20 +08:00
|
|
|
%ghost %{_libdir}/libfakeroot/libfakeroot-0.so
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-06-21 11:30:29 +08:00
|
|
|
* Tue Jun 21 2022 liyanan <liyanan32@h-partners.com> - 1.25.2-3
|
|
|
|
|
- Skip tar test: the test is unstable and keeps on randomly failing
|
|
|
|
|
|
2021-03-13 15:21:20 +08:00
|
|
|
* Sat Mar 13 2021 shixuantong <shixuantong@huawei.com> - 1.25.2-2
|
|
|
|
|
- Fix error: '_STAT_VER' undeclared
|
|
|
|
|
|
2020-11-20 11:10:42 +08:00
|
|
|
* Fri Nov 20 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.25.2-1
|
|
|
|
|
- Update to 1.25.2
|
|
|
|
|
|
2020-08-12 17:49:22 +08:00
|
|
|
* Wed Aug 12 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.23-3
|
|
|
|
|
- remove four test cases to solve the compilation failure
|
|
|
|
|
|
2019-11-30 16:41:20 +08:00
|
|
|
* Fri Nov 29 2019 lihao <lihao129@huawei.com> - 1.23-2
|
|
|
|
|
- Package Init
|