From 7ca155fc10f1dcfb7cb9a172cb97f0c54b05b84dd69cb8b774f4e6b0ad5cde64 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 16 Feb 2015 08:13:36 +0000 Subject: [PATCH 1/2] Accepting request 285938 from home:posophe:branches:Base:System Update and fix OBS-URL: https://build.opensuse.org/request/show/285938 OBS-URL: https://build.opensuse.org/package/show/Base:System/libcap?expand=0&rev=20 --- libcap-2.22.tar.bz2 | 3 --- libcap-2.24.tar.xz | 3 +++ libcap-nolibattr.patch | 6 +++--- libcap.changes | 15 ++++++++++++++ libcap.spec | 44 ++++++++++++++++++------------------------ 5 files changed, 40 insertions(+), 31 deletions(-) delete mode 100644 libcap-2.22.tar.bz2 create mode 100644 libcap-2.24.tar.xz diff --git a/libcap-2.22.tar.bz2 b/libcap-2.22.tar.bz2 deleted file mode 100644 index 08065f7..0000000 --- a/libcap-2.22.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:73ebbd4877b5f69dd28b72098e510c5b318bc480f8201c4061ac98b78c04050f -size 60051 diff --git a/libcap-2.24.tar.xz b/libcap-2.24.tar.xz new file mode 100644 index 0000000..e32607c --- /dev/null +++ b/libcap-2.24.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cee4568f78dc851d726fc93f25f4ed91cc223b1fe8259daa4a77158d174e6c65 +size 63412 diff --git a/libcap-nolibattr.patch b/libcap-nolibattr.patch index e5e2441..a40e930 100644 --- a/libcap-nolibattr.patch +++ b/libcap-nolibattr.patch @@ -1,11 +1,11 @@ --- libcap-2.22.orig/libcap/Makefile +++ libcap-2.22/libcap/Makefile -@@ -16,7 +16,7 @@ FILES=cap_alloc cap_proc cap_extint cap_ +@@ -16,7 +16,7 @@ # no support). ifeq ($(LIBATTR),yes) FILES += cap_file -LDFLAGS += -lattr +LDFLAGS += + DEPS = -lattr endif - - INCLS=libcap.h cap_names.h $(INCS) + \ No newline at end of file diff --git a/libcap.changes b/libcap.changes index e2ef1de..8760d5a 100644 --- a/libcap.changes +++ b/libcap.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Sat Jan 31 11:22:58 UTC 2015 - p.drouand@gmail.com + +- Update to version 2.24 + * Fix compilation problems (note to self, make distclean && make, + before release) + * Some make rule changes to make uploading a release to kernel.org + easier for me. + * Tidied up some documented links. +- Update libcap-nolibattr.patch +- Add pkg-config build requirement; libcap now provides a pkgconfig + file +- Clean up specfile +- Move libraries and binaries to /usr because of #UsrMove + ------------------------------------------------------------------- Thu Jun 19 17:32:36 UTC 2014 - crrodriguez@opensuse.org diff --git a/libcap.spec b/libcap.spec index baf7e33..5e67df8 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,7 +1,7 @@ # # spec file for package libcap # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,17 +20,14 @@ Name: libcap Summary: Library for Capabilities (linux-privs) Support License: BSD-3-Clause and GPL-2.0 Group: System/Libraries -Version: 2.22 +Version: 2.24 Release: 0 -Source: ftp://ftp.de.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-%{version}.tar.bz2 +Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-%{version}.tar.xz Source2: baselibs.conf Url: https://sites.google.com/site/fullycapable/ -BuildRoot: %{_tmppath}/%{name}-%{version}-build Patch0: libcap-nolibattr.patch -%if 0%{?suse_version} > 1030 BuildRequires: fdupes -%endif -%define debug_package_requires libcap2 = %{version}-%{release} +BuildRequires: pkg-config %description Capabilities are a measure to limit the omnipotence of the superuser. @@ -40,8 +37,6 @@ control. Without kernel patches, you can use this library to drop capabilities within setuid binaries. If you use patches, this can be done automatically by the kernel. - - %package -n libcap2 Summary: Library for Capabilities (linux-privs) Support Group: System/Libraries @@ -72,8 +67,6 @@ draft 15 capabilities. Install libcap-devel if you want to develop or compile applications using libcap. - - %package progs Summary: Libcap utility programs Group: System/Filesystems @@ -82,26 +75,26 @@ Group: System/Filesystems This package contains utility programs handling capabilities via libcap. - - %prep %setup -q %patch0 -p1 %build -# lib=%{_lib} make %{?_smp_mflags} COPTFLAG="$RPM_OPT_FLAGS" -lib=%{_lib} make %{?_smp_mflags} DEBUG="-g $RPM_OPT_FLAGS" +make prefix=%{_prefix} lib=%{_lib} LIBDIR=%{_libdir} SBINDIR=%{_sbindir} \ + INCDIR=%{_includedir} MANDIR=%{_mandir} DEBUG="-g %{optflags}" %install -make install DESTDIR=$RPM_BUILD_ROOT LIBDIR=$RPM_BUILD_ROOT/%{_lib} MANDIR=$RPM_BUILD_ROOT%{_mandir} RAISE_SETFCAP=no +make install RAISE_SETFCAP=no \ + DESTDIR=%{buildroot} \ + LIBDIR=%{buildroot}/%{_libdir} \ + SBINDIR=%{buildroot}/%{_sbindir} \ + INCDIR=%{buildroot}/%{_includedir} \ + MANDIR=%{buildroot}/%{_mandir}/ \ + PKGCONFIGDIR=%{buildroot}/%{_libdir}/pkgconfig/ +mkdir -p %{buildroot}/%{_mandir}/man{2,3,8} +mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/ # remove unneeded files -rm -f $RPM_BUILD_ROOT/%{_lib}/*.*a -# move *.so file to libdir and relink -rm -f $RPM_BUILD_ROOT/%{_lib}/*.so -mkdir -p $RPM_BUILD_ROOT%{_libdir} -ln -s /%{_lib}/libcap.so.2 $RPM_BUILD_ROOT%{_libdir}/libcap.so -%if 0%{?suse_version} > 1030 +rm -f $RPM_BUILD_ROOT/%{_libdir}/*.*a %fdupes -s $RPM_BUILD_ROOT -%endif %post -n libcap2 -p /sbin/ldconfig @@ -109,19 +102,20 @@ ln -s /%{_lib}/libcap.so.2 $RPM_BUILD_ROOT%{_libdir}/libcap.so %files -n libcap2 %defattr(-,root,root) -%attr(755,root,root) /%{_lib}/libcap.so.* +%attr(755,root,root)%{_libdir}/libcap.so.* %files progs %defattr(-,root,root) %{_mandir}/man1/* %{_mandir}/man8/* -/sbin/* +%{_sbindir}/* %files devel %defattr(-,root,root) %doc License README CHANGELOG %{_includedir}/sys/capability.h %{_libdir}/*.so +%{_libdir}/pkgconfig/%{name}.pc %{_mandir}/man3/* %changelog From b686ff0d84b37faf63f3cb6310ebefade18abd1759e76cf316deac2597ad4550 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 30 Aug 2016 13:33:41 +0000 Subject: [PATCH 2/2] Accepting request 423725 from home:dimstar:Factory Update to version 2.25 - NOTE: GNOME 3.22 requires at least version 2.23, TW currenly has 2.22; as we need to care for an update anyway, we bumped to 2.25 (current latest) OBS-URL: https://build.opensuse.org/request/show/423725 OBS-URL: https://build.opensuse.org/package/show/Base:System/libcap?expand=0&rev=21 --- libcap-2.24.tar.xz | 3 --- libcap-2.25.tar.xz | 3 +++ libcap-nolibattr.patch | 11 ----------- libcap.changes | 15 +++++++++++++++ libcap.spec | 26 ++++++++++++-------------- 5 files changed, 30 insertions(+), 28 deletions(-) delete mode 100644 libcap-2.24.tar.xz create mode 100644 libcap-2.25.tar.xz delete mode 100644 libcap-nolibattr.patch diff --git a/libcap-2.24.tar.xz b/libcap-2.24.tar.xz deleted file mode 100644 index e32607c..0000000 --- a/libcap-2.24.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cee4568f78dc851d726fc93f25f4ed91cc223b1fe8259daa4a77158d174e6c65 -size 63412 diff --git a/libcap-2.25.tar.xz b/libcap-2.25.tar.xz new file mode 100644 index 0000000..48b06f2 --- /dev/null +++ b/libcap-2.25.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:693c8ac51e983ee678205571ef272439d83afe62dd8e424ea14ad9790bc35162 +size 63672 diff --git a/libcap-nolibattr.patch b/libcap-nolibattr.patch deleted file mode 100644 index a40e930..0000000 --- a/libcap-nolibattr.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libcap-2.22.orig/libcap/Makefile -+++ libcap-2.22/libcap/Makefile -@@ -16,7 +16,7 @@ - # no support). - ifeq ($(LIBATTR),yes) - FILES += cap_file --LDFLAGS += -lattr -+LDFLAGS += - DEPS = -lattr - endif - \ No newline at end of file diff --git a/libcap.changes b/libcap.changes index 8760d5a..50145a0 100644 --- a/libcap.changes +++ b/libcap.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Mon Aug 29 21:10:05 UTC 2016 - dimstar@opensuse.org + +- Update to versison 2.25: + + Recover gperf detection in make rules. + + Man page typo fix. + + Tweak make rules to make packaging more straightforward. + + Fix error explanation in setcap. + + Drop need to link with libattr. It turns out libcap wasn't + actually using any code from that library, so linking to it was + superfluous. +- Drop libcap-nolibattr.patch: fixed upstream. +- No longer add %{buildroot} to all variables for make install the + Makefile learned about the meaning of DESTDIR. + ------------------------------------------------------------------- Sat Jan 31 11:22:58 UTC 2015 - p.drouand@gmail.com diff --git a/libcap.spec b/libcap.spec index 5e67df8..7e3452c 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,7 +1,7 @@ # # spec file for package libcap # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,12 +20,11 @@ Name: libcap Summary: Library for Capabilities (linux-privs) Support License: BSD-3-Clause and GPL-2.0 Group: System/Libraries -Version: 2.24 +Version: 2.25 Release: 0 Source: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-%{version}.tar.xz Source2: baselibs.conf Url: https://sites.google.com/site/fullycapable/ -Patch0: libcap-nolibattr.patch BuildRequires: fdupes BuildRequires: pkg-config @@ -77,7 +76,6 @@ libcap. %prep %setup -q -%patch0 -p1 %build make prefix=%{_prefix} lib=%{_lib} LIBDIR=%{_libdir} SBINDIR=%{_sbindir} \ INCDIR=%{_includedir} MANDIR=%{_mandir} DEBUG="-g %{optflags}" @@ -85,15 +83,14 @@ make prefix=%{_prefix} lib=%{_lib} LIBDIR=%{_libdir} SBINDIR=%{_sbindir} \ %install make install RAISE_SETFCAP=no \ DESTDIR=%{buildroot} \ - LIBDIR=%{buildroot}/%{_libdir} \ - SBINDIR=%{buildroot}/%{_sbindir} \ - INCDIR=%{buildroot}/%{_includedir} \ - MANDIR=%{buildroot}/%{_mandir}/ \ - PKGCONFIGDIR=%{buildroot}/%{_libdir}/pkgconfig/ -mkdir -p %{buildroot}/%{_mandir}/man{2,3,8} -mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/ -# remove unneeded files -rm -f $RPM_BUILD_ROOT/%{_libdir}/*.*a + LIBDIR=/%{_libdir} \ + SBINDIR=/%{_sbindir} \ + INCDIR=/%{_includedir} \ + MANDIR=/%{_mandir}/ \ + PKGCONFIGDIR=%{_libdir}/pkgconfig/ +find %{buildroot} -type f -name '*.la' -print -delete +# do not provide static libs +rm %{buildroot}%{_libdir}/libcap.a %fdupes -s $RPM_BUILD_ROOT %post -n libcap2 -p /sbin/ldconfig @@ -102,7 +99,8 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/*.*a %files -n libcap2 %defattr(-,root,root) -%attr(755,root,root)%{_libdir}/libcap.so.* +%doc License +%{_libdir}/libcap.so.* %files progs %defattr(-,root,root)