diff --git a/0001-acl-2.2.53-test-runwrapper.patch b/0001-acl-2.2.53-test-runwrapper.patch new file mode 100644 index 0000000000000000000000000000000000000000..7c27c6c2305b80f0609991dd4b2094cab7dadd8a --- /dev/null +++ b/0001-acl-2.2.53-test-runwrapper.patch @@ -0,0 +1,44 @@ +From 085cc4ff56857d234e80f37d0316c13eb5718696 Mon Sep 17 00:00:00 2001 +From: Kamil Dudka +Date: Tue, 3 Jul 2018 10:46:58 +0200 +Subject: [PATCH] test/runwrapper: copy the preloaded library + +... to a temporary directory because the original location might +not be accessible by other users. +--- + test/runwrapper | 20 ++++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +diff --git a/test/runwrapper b/test/runwrapper +index 6e0e899..de4555a 100755 +--- a/test/runwrapper ++++ b/test/runwrapper +@@ -1,7 +1,23 @@ + #!/bin/bash + +-if [ -e "$PWD/.libs/libtestlookup.so" ]; then +- export LD_PRELOAD="$PWD/.libs/libtestlookup.so" ++src="$PWD/.libs/libtestlookup.so" ++dst= ++if [ -e "$src" ]; then ++ # copy the preloaded library to a temporary directory because ++ # the original location might not be accessible by other users ++ tmp="$(mktemp -d)" ++ chmod 0755 "$tmp" ++ dst="${tmp}/libtestlookup.so" ++ cp -L "$src" "$dst" ++ export LD_PRELOAD="$dst" + fi + + "${srcdir:-${PWD}}"/test/run "$@" ++ec="$?" ++ ++if [ -n "$dst" ]; then ++ # remove the temporary location ++ rm -rf "$dst" ++fi ++ ++exit "$ec" +-- +2.14.4 + diff --git a/acl-2.3.1.tar.gz b/acl-2.3.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..00ac7b2a6395b482ac3b4d98f3bebb44ed24b58e Binary files /dev/null and b/acl-2.3.1.tar.gz differ diff --git a/acl.spec b/acl.spec index cc07f817c42d0759c8e6614c7c0a768300b1d578..01cba9d1b3ce6ca3e52a3fff68d888c3e4c68843 100644 --- a/acl.spec +++ b/acl.spec @@ -1,90 +1,130 @@ -Name: acl -Version: 2.2.53 -Release: 6 -Summary: Commands for manipulating POSIX access control lists - -License: GPLv2+ -URL: https://savannah.nongnu.org/projects/acl -Source0: http://download.savannah.nongnu.org/releases/acl/acl-2.2.53.tar.gz - -BuildRequires: libattr-devel gawk libtool gettext +Summary: Access control list utilities +Name: acl +Version: 2.3.1 +Release: 1 +BuildRequires: gawk +BuildRequires: gcc +BuildRequires: gettext +BuildRequires: libattr-devel +BuildRequires: libtool +BuildRequires: make +BuildRequires: perl(FileHandle) +Requires: libacl%{?_isa} = %{version}-%{release} +Source: https://download-mirror.savannah.gnu.org/releases/acl/acl-%{version}.tar.gz + +# avoid permission denied problem with LD_PRELOAD in the test-suite +Patch1: 0001-acl-2.2.53-test-runwrapper.patch + +License: GPLv2+ +URL: https://savannah.nongnu.org/projects/acl %description -This package contains commands for manipulating POSIX access control lists, -and the libacl.so dynamic library which contains the POSIX 1003.1e draft -standard 17 functions for manipulating access control lists. +This package contains the getfacl and setfacl utilities needed for +manipulating access control lists. %package -n libacl -Summary: Library for supporting access control list +Summary: Dynamic library for access control list support License: LGPLv2+ Conflicts: filesystem < 3 %description -n libacl -This package contains the library for manipulating access control list. +This package contains the libacl.so dynamic library which contains +the POSIX 1003.1e draft standard 17 functions for manipulating access +control lists. %package -n libacl-devel -Summary: Files necessary to develop applications with libacl -License: LGPLv2+ -Requires: libacl = %{version}-%{release}, libattr-devel +Summary: Files needed for building programs with libacl +License: LGPLv2+ +Requires: libacl%{?_isa} = %{version}-%{release}, libattr-devel %description -n libacl-devel -This package contains header files for the POSIX ACL library. - -%package_help +This package contains header files and documentation needed to develop +programs which make use of the access control list programming interface +defined in POSIX 1003.1e draft standard 17. %prep -%autosetup -n %{name}-%{version} -p1 +%autosetup -p1 %build %configure + +# uncomment to turn on optimizations +# sed -i 's/-O2/-O0/' libtool include/builddefs +# unset CFLAGS + %make_build +%check +# make the test-suite use the just built library (instead of the system one) +export LD_LIBRARY_PATH="${RPM_BUILD_ROOT}%{_libdir}:${LD_LIBRARY_PATH}" + +if ./setfacl -m "u:$(id -u):rwx" .; then + if test 0 = "$(id -u)"; then + # test/root/permissions.test requires the 'daemon' user to be a member + # of the 'bin' group in order not to fail. Prevent the test from + # running if we detect that its requirements are not met (#1085389). + if id -nG daemon | { ! grep bin >/dev/null; }; then + sed -e 's|test/root/permissions.test||' \ + -i test/Makemodule.am Makefile.in Makefile + fi + + # test/root/setfacl.test fails if 'bin' user cannot access build dir + if ! runuser -u bin -- "${PWD}/setfacl" --version; then + sed -e 's|test/root/setfacl.test||' \ + -i test/Makemodule.am Makefile.in Makefile + fi + fi + + # run the upstream test-suite + %make_build check || exit $? +else + echo '*** ACLs are probably not supported by the file system,' \ + 'the test-suite will NOT run ***' +fi + %install %make_install -%delete_la_and_a -rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}* -%find_lang %{name} +# get rid of libacl.a and libacl.la +rm -f $RPM_BUILD_ROOT%{_libdir}/libacl.a +rm -f $RPM_BUILD_ROOT%{_libdir}/libacl.la -%check -# permissions.test needs 'daemon' users to be in the 'bin' group. If not, stop this test. -if test 0 = "$(id -u)"; then - sed -e 's|test/root/permissions.test||' -i test/Makemodule.am Makefile.in Makefile -fi -# setfacl.test needs 'bin' users to have the access to build dir. If not, stop this test. -if ! runuser -u bin -- "${PWD}/setfacl" --version; then - sed -e 's|test/root/setfacl.test||' -i test/Makemodule.am Makefile.in Makefile -fi +chmod 0755 $RPM_BUILD_ROOT/%{_libdir}/libacl.so.*.*.* -make check +# drop already installed documentation, we will use an RPM macro to install it +rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}* -%post -n libacl -p /sbin/ldconfig +%find_lang %{name} -%postun -n libacl -p /sbin/ldconfig +%ldconfig_scriptlets -n libacl %files -f %{name}.lang -%defattr(-,root,root) -%{!?_licensedir:%global license %%doc} %license doc/COPYING* -%{_bindir}/*acl - -%files -n libacl -%{_libdir}/libacl.so.* +%{_bindir}/chacl +%{_bindir}/getfacl +%{_bindir}/setfacl +%{_mandir}/man1/chacl.1* +%{_mandir}/man1/getfacl.1* +%{_mandir}/man1/setfacl.1* +%{_mandir}/man5/acl.5* %files -n libacl-devel -%defattr(-,root,root) -%{_includedir}/acl/libacl.h -%{_includedir}/sys/acl.h %{_libdir}/libacl.so -%{_libdir}/pkgconfig/libacl.pc +%{_libdir}/pkgconfig/*.pc +%{_includedir}/acl +%{_includedir}/sys/acl.h +%{_mandir}/man3/acl_* -%files help -%defattr(-,root,root) -%{_mandir}/man1/* -%{_mandir}/man3/* -%{_mandir}/man5/* +%files -n libacl +%{_libdir}/libacl.so.* %changelog +* Wed Jul 07 2021 ningjin - 2.3.1-1 +- update + +* Fri Feb 28 2020 openEuler Buildteam - 2.2.53-7 +- Obsoletes acl-devel + * Wed Feb 12 2020 openEuler Buildteam - 2.2.53-6 - Change acl-devel to libacl-devel @@ -96,4 +136,3 @@ make check * Tue Sep 10 2019 openEuler Buildteam - 2.2.53-3 - Package init - diff --git a/acl.yaml b/acl.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e37183d951df43d5f4b339605ee1fdd2731c748a --- /dev/null +++ b/acl.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: git://git.savannah.gnu.org/acl.git +tag_prefix: ^v +seperator: .