/[packages]/updates/1/libcap/current/SPECS/libcap.spec
ViewVC logotype

Contents of /updates/1/libcap/current/SPECS/libcap.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 188943 - (show annotations) (download)
Fri Dec 30 03:35:15 2011 UTC (12 years, 3 months ago) by anssi
File size: 3543 byte(s)
- security fix for CVE-2011-4099 (programs could access outside chroot,
  patch from rhel, upstream, via Mandriva)

1 %define major 2
2 %define libname %mklibname cap %{major}
3 %define develname %mklibname cap -d
4
5 Summary: Library for getting and setting POSIX.1e capabilities
6 Name: libcap
7 Version: 2.19
8 %define subrel 1
9 Release: %mkrel 7
10 Group: System/Kernel and hardware
11 License: BSD/GPLv2
12 URL: http://www.kernel.org/pub/linux/libs/security/linux-privs/
13 Source0: http://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz
14 Source1: ftp://ftp.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.4/capfaq-0.2.txt
15 Patch0: libcap-2.16-linkage_fix.diff
16 Patch1: libcap-mdv-CVE-2011-4099.diff
17 BuildRequires: attr-devel
18 BuildRequires: pam-devel
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
20
21 %description
22 %{name} is a library for getting and setting POSIX.1e (formerly POSIX 6)
23 draft 15 capabilities.
24
25 %package utils
26 Summary: Administration tools for POSIX.1e capabilities
27 Group: System/Kernel and hardware
28
29 %description utils
30 %{name} is a library for getting and setting POSIX.1e (formerly POSIX 6)
31 draft 15 capabilities.
32
33 This package contains utilities to control these capabilities.
34
35 %package -n pam_cap
36 Summary: PAM module for getting and setting POSIX.1e capabilities
37 Group: System/Libraries
38
39 %description -n pam_cap
40 The purpose of this module is to enforce inheritable capability sets for a
41 specified user.
42
43 %package -n %{libname}
44 Summary: Library for getting and setting POSIX.1e capabilities
45 Group: System/Kernel and hardware
46 Provides: %{name} = %{version}-%{release}
47
48 %description -n %{libname}
49 %{name} is a library for getting and setting POSIX.1e (formerly POSIX 6)
50 draft 15 capabilities.
51
52 %package -n %{develname}
53 Summary: Development files for %{name}
54 Group: Development/Kernel
55 Requires: %{libname} = %{version}-%{release}
56 Provides: %{name}-devel = %{version}-%{release}
57 Provides: cap-devel = %{version}-%{release}
58 Conflicts: %{mklibname cap 1 -d}
59
60 %description -n %{develname}
61 Development files (Headers, libraries for static linking, etc) for %{name}.
62
63 %{name} is a library for getting and setting POSIX.1e (formerly POSIX 6)
64 draft 15 capabilities.
65
66 Install %{name}-devel if you want to develop or compile applications supporting
67 Linux kernel capabilities.
68
69 %prep
70
71 %setup -q
72 %patch0 -p0
73 %patch1 -p0
74
75 install -m644 %{SOURCE1} .
76
77 perl -pi -e 's,^man_prefix=.*,man_prefix=\$\(prefix)/share,g' Make.Rules
78
79 %build
80 %serverbuild
81
82 # voodoo magic
83 LDFLAGS=`rpm --eval %%configure|grep LDFLAGS|cut -d\" -f2`
84 perl -pi -e "s|^CFLAGS\ :=.*|CFLAGS\ :=$CFLAGS|g" Make.Rules
85 perl -pi -e "s|^LDFLAGS\ :=.*|LDFLAGS\ :=$LDFLAGS|g" Make.Rules
86
87 %make prefix=%{_prefix}
88
89 %install
90 rm -rf %{buildroot}
91
92 install -d %{buildroot}%{_sysconfdir}/security
93
94 make install prefix=%{_prefix} LIBDIR=%{buildroot}/%{_lib} FAKEROOT=%{buildroot}
95
96 # conflics with man-pages
97 rm -f %{buildroot}%{_mandir}/man2/*
98
99 install -m0640 pam_cap/capability.conf %{buildroot}%{_sysconfdir}/security/
100
101 %clean
102 rm -rf %{buildroot}
103
104 %files utils
105 %defattr(-,root,root)
106 %doc CHANGELOG License README contrib
107 %{_sbindir}/capsh
108 %{_sbindir}/getcap
109 %{_sbindir}/getpcaps
110 %{_sbindir}/setcap
111 %{_mandir}/man8/getcap.8*
112 %{_mandir}/man8/setcap.8*
113
114 %files -n pam_cap
115 %defattr(-,root,root)
116 %doc pam_cap/License
117 %attr(0640,root,root) %config(noreplace) %{_sysconfdir}/security/capability.conf
118 /%{_lib}/security/pam_cap.so
119
120 %files -n %{libname}
121 %defattr(-,root,root)
122 /%{_lib}/lib*.so.%{major}*
123
124 %files -n %{develname}
125 %defattr(-,root,root)
126 %doc capfaq-0.2.txt
127 %{_includedir}/*
128 /%{_lib}/*.so
129 /%{_lib}/*.a
130 %{_mandir}/man3/*
131 %{_mandir}/man1/capsh.1.*
132
133
134

  ViewVC Help
Powered by ViewVC 1.1.30