Compare commits

...
Sign in to create a new pull request.

141 commits

Author SHA1 Message Date
Carlos Rodriguez-Fernandez
d3979ba09d
Update to 2.77 2025-10-30 16:33:55 -07:00
Alejandro Sáez
73dd028157 rebuild 2025-10-10 17:10:46 +02:00
Maxwell G
4f902f1666 Rebuild for golang-1.25.0 2025-08-15 18:24:12 -05:00
Fedora Release Engineering
2f86af5298 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 19:25:57 +00:00
Carlos Rodriguez-Fernandez
ecb8d1cb46
Update to version 2.76 2025-04-14 22:14:24 -07:00
Carlos Rodriguez-Fernandez
c097689033
Update internal CI tests 2025-01-24 13:30:13 -07:00
Carlos Rodriguez-Fernandez
607880c702
Update to 2.73 2025-01-24 11:32:01 -07:00
Fedora Release Engineering
3f2c35c4b9 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 10:46:02 +00:00
Zbigniew Jędrzejewski-Szmek
4126e7676b Rebuilt for the bin-sbin merge (2nd attempt)
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2025-01-12 14:33:14 +01:00
Carlos Rodriguez-Fernandez
403c688803
update to 2.71 2024-10-28 17:34:47 -07:00
Fedora Release Engineering
ea30cbed1e Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 13:27:58 +00:00
Zbigniew Jędrzejewski-Szmek
f165102918 Rebuilt for the bin-sbin merge
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2024-07-09 13:29:27 +02:00
Anderson Toshiyuki Sasaki
f6cc8a0776 Include CGO_CFLAGS and CGO_LDFLAGS in the make command
Set the value of CGO_CFLAGS as the CFLAGS environment variable value and
CGO_LDFLAGS as the LDFLAGS value as part of the make command.

The goal is to include the hardening compilation flags when building the
Go binaries with CGO enabled.

Also add -compressdwarf=false to ldflags, make the build verbose by
adding the options -v -x, and force rebuilding by adding the -a option.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2024-06-12 07:52:26 +02:00
Carlos Rodriguez-Fernandez
120b640485
update to 2.70 2024-05-20 08:31:30 -07:00
Carlos Rodriguez-Fernandez
98e4da842f
fix golang version dependency 2024-04-14 21:30:25 -07:00
Zbigniew Jędrzejewski-Szmek
bac8f5e536 Add compat sbin Provides
In preparation for https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin.
dwarftherapist requires /usr/sbin/setcap.
2024-04-14 15:31:35 +02:00
Zbigniew Jędrzejewski-Szmek
6b8df4ed5f Actually use the sbindir location provided by rpm
/usr/sbin was always used, which breaks build with
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin,
because then %_sbindir in %files doesn't match the file locations.
2024-04-09 15:02:43 +02:00
Carlos Rodriguez-Fernandez
deb9345a8c
make correction to the capability.conf manpage 2024-04-05 19:33:01 -07:00
Carlos Rodriguez-Fernandez
d105d70b42
reenable PIE in the captree tool 2024-04-05 19:32:56 -07:00
Carlos Rodriguez-Fernandez
9376ef2fc2
Fix incompatibility of the build with go 1.22. 2024-04-05 11:45:12 -07:00
Carlos Rodriguez-Fernandez
d219098669
Add manpages for pam_cap and capability.conf 2024-04-05 11:45:00 -07:00
Maxwell G
478088c996
Rebuild for golang 1.22.0 2024-02-11 23:29:35 +00:00
Fedora Release Engineering
eea486d298 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 01:39:48 +00:00
Fedora Release Engineering
027afa6099 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 03:42:20 +00:00
Carlos Rodriguez-Fernandez
9298823630
run captree smoke tests 2023-12-10 22:13:31 -07:00
Yaakov Selkowitz
a3e0bbb8fc Limit captree to %golang_arches
RHEL has dropped i686 from golang, without which the build of captree
(but not its manpage) is disabled.
2023-12-08 06:12:56 -05:00
Carlos Rodriguez-Fernandez
a0bcf8dd16
ignore known lint issues 2023-11-25 11:50:03 -07:00
Carlos Rodriguez-Fernandez
0476c6eb3a
fix gating 2023-11-23 22:36:32 -07:00
Dominik 'Rathann' Mierzejewski
34559e0319 Make file lists more explicit to avoid accidental ABI changes 2023-11-20 23:03:41 +01:00
Dominik 'Rathann' Mierzejewski
75bb5af48b upload sources and add GPG key to git 2023-11-20 21:54:28 +01:00
Carlos Rodriguez-Fernandez
e6e70f005a
update to 2.69 and modernize tests 2023-11-20 08:36:39 -07:00
Fedora Release Engineering
3d19cbc8ff Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 10:26:26 +00:00
Fedora Release Engineering
3978f4ec3e Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 15:57:00 +00:00
Fedora Release Engineering
bf07aacd92 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 17:25:35 +00:00
Fedora Release Engineering
57896f99c5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 15:52:02 +00:00
Fedora Release Engineering
57d7f730dc - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 11:03:05 +00:00
Peter Robinson
b7ee31eb11 Rebase distro flags patch 2021-02-14 22:50:31 +00:00
Peter Robinson
07c405388c cleanup .gitignore 2021-02-10 15:19:54 +00:00
Giuseppe Scrivano
0a116b22dc
Update to 0.2.48
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-02-10 15:41:35 +01:00
Fedora Release Engineering
33bb977157 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 16:45:18 +00:00
Peter Robinson
7408f6c23e Update to 0.2.46 2021-01-17 10:17:39 +00:00
Tom Stellard
787690e78f Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-05 01:30:35 +00:00
Karsten Hopp
366827aa94 update to 2.44
remove additional getpcaps manpage as it now included in the sources
update license tag

Signed-off-by: Karsten Hopp <karsten.hopp@targens.de>
2020-10-21 14:57:59 +02:00
Fedora Release Engineering
67e96608f2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 04:20:16 +00:00
Fedora Release Engineering
b6ff988c34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 08:42:34 +00:00
Fedora Release Engineering
e0653df68c - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 12:54:16 +00:00
Karsten Hopp
478085da04 enable gating
Signed-off-by: Karsten Hopp <karsten@redhat.com>
2019-02-04 14:18:45 +01:00
Karsten Hopp
0f144a5492 bump release 2019-02-04 13:59:06 +01:00
Karsten Hopp
949589eef0 bump release 2019-02-04 13:57:47 +01:00
Fedora Release Engineering
75d8e88352 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 06:46:51 +00:00
Igor Gnatenko
221793d6c4 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:11 +01:00
gitolite tester
2bfd2c8930 bump release 2019-01-28 12:39:34 +01:00
root
38b03e9432 add CI tests using the standard test interface (astepano) 2019-01-28 11:36:30 +00:00
Karsten Hopp
fbcc8c1370 update to 2.26
Signed-off-by: Karsten Hopp <karsten@redhat.com>
2019-01-15 13:53:18 +01:00
Fedora Release Engineering
d86fc23c40 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 07:52:46 +00:00
Karsten Hopp
1943023aad bump release and rebuild 2018-07-02 16:29:53 +02:00
Susant Sahani
931be7aaf4 Adds tests according to the CI
justification
Adds tests according to the CI wiki specifically the standard test interface in the spec.
The playbook includes Tier1 level test cases that have been tested in the following contexts and
is passing reliably: Classic. Test logs are stored in the artifacts directory.
The following steps are used to execute the tests using the standard test interface:

Test enveronment
Make sure you have installed packages from the spec
```
ansible-2.4.1.0-2.fc28.noarch
python2-dnf-2.7.5-1.fc28.noarch
libselinux-python-2.7-2.fc28.x86_64
standard-test-roles-2.5-1.fc28.noarch
```

Run tests for Classic
Snip of the example test run for Classic tests:

```

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Duration: 0s
::   Assertions: 2 good, 0 bad
::   Assertions: 2 good, 0 bad
::   RESULT: PASS
::   RESULT: PASS

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test
::   Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 15:49:17 ] :: [   LOG    ] :: Starting libcap tests ...
:: [ 15:49:17 ] :: [   LOG    ] :: Starting libcap tests ...
:: [ 15:49:17 ] :: [  BEGIN   ] :: Running '/usr/bin/test-libcap'
[==========] Running 1 test(s).
[ RUN      ] test_drop_cap_net_raw
[       OK ] test_drop_cap_net_raw
[==========] 1 test(s) run.
[  PASSED  ] 1 test(s).
:: [ 15:49:17 ] :: [   PASS   ] :: Command '/usr/bin/test-libcap' (Expected 0, got 0)
:: [ 15:49:17 ] :: [   PASS   ] :: Command '/usr/bin/test-libcap' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 0s
::   Duration: 0s
::   Assertions: 1 good, 0 bad
::   Assertions: 1 good, 0 bad
::   RESULT: PASS
::   RESULT: PASS
```
2018-06-26 15:50:59 +05:30
Karsten Hopp
b9b09f2bf4 Buildrequire gcc 2018-02-21 10:05:50 +01:00
Fedora Release Engineering
ee515425b1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 21:17:55 +00:00
Igor Gnatenko
ffccb63de0
Switch to %ldconfig_scriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-03 18:15:34 +01:00
Fedora Release Engineering
e1524cd2a3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 01:14:51 +00:00
Fedora Release Engineering
6a551b81f5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 18:36:04 +00:00
Petr Písař
968a3b0f12 perl dependency renamed to perl-interpreter <https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules> 2017-07-12 14:47:14 +02:00
Fedora Release Engineering
f17ad4c828 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 18:26:24 +00:00
Karsten Hopp
9f890cf8cf add -static subpackage (rhbz#1380251) 2016-12-15 11:11:16 +01:00
Lubomir Rintel
b4907a9c77 Add perl BR to fix FTBFS 2016-11-27 20:17:37 +01:00
Peter Robinson
73b4e91415 bump release 2016-04-25 10:15:11 +01:00
Peter Robinson
f23323f156 Fix pkgconfig install location on aarch64, Spec file cleanups 2016-04-25 10:14:24 +01:00
Karsten Hopp
740b4b1376 libcap-2.25 2016-04-11 19:00:39 +02:00
Dennis Gilmore
dbee13ba15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-04 02:57:30 +00:00
Dennis Gilmore
0f4605475d - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-17 14:59:48 +00:00
Peter Robinson
ac8ee69437 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-17 02:29:58 +00:00
Tom Callaway
8249508989 fix license handling 2014-07-17 14:11:11 -04:00
Dennis Gilmore
7cbf653de8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-06 21:46:29 -05:00
Karsten Hopp
10bf45d809 fix libdir in libcap.pc 2014-04-25 12:59:49 +02:00
Peter Robinson
21d9195d8a set pkg-config dir to proper value to get it built on AArch64 2014-04-23 09:43:00 +01:00
Karsten Hopp
0a1c43c400 fix URL and license 2014-04-16 14:59:22 +02:00
Karsten Hopp
0dec76c504 update to 2.24
dropped patch for rhbz#911878, it is upstream now
2014-04-16 11:54:54 +02:00
Dennis Gilmore
c5bd5acad3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-02 23:58:00 -05:00
Karsten Hopp
7d61a12f1f Merge commit '092440402b' into f19
Conflicts:
	libcap.spec
2013-05-14 14:04:37 +02:00
Karsten Hopp
092440402b mv libraries to /usr/lib*
add getpcaps man page
spec file cleanup
fix URL of tarball
2013-05-14 13:58:22 +02:00
Karsten Hopp
889762dced add getpcaps man page 2013-05-14 13:58:09 +02:00
Karsten Hopp
b86f2aecd7 add patch from Mark Wielaard to fix use of uninitialized memory in _fcaps_load, rhbz #911878 2013-05-14 11:54:08 +02:00
Ville Skyttä
0b88293fb7 Build with $RPM_OPT_FLAGS and $RPM_LD_FLAGS. 2013-02-24 21:05:17 +02:00
Dennis Gilmore
2e39f6a59c - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-13 22:06:08 -06:00
Dennis Gilmore
84aef22548 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-19 14:22:39 -05:00
Dennis Gilmore
71517181d9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-13 01:26:38 -06:00
Karsten Hopp
4cd0579100 update to 2.22 (#689752) 2011-07-27 15:10:13 +02:00
Dennis Gilmore
3049490c78 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-07 22:54:41 -06:00
Fedora Release Engineering
608ea3522b dist-git conversion 2010-07-28 20:46:13 +00:00
Karsten Hopp
e79109b0ec - update to 2.17 2009-12-10 14:24:42 +00:00
Bill Nottingham
683e3c636a Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 23:50:52 +00:00
Jesse Keating
e0f41390f0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-25 05:24:01 +00:00
Karsten Hopp
6f511d446b - more fixes 2009-06-16 19:57:11 +00:00
Karsten Hopp
f7e6927aee - update headerfix patch 2009-06-16 19:51:59 +00:00
Karsten Hopp
024414f9a2 - fix build problems with p.e. cdrkit 2009-06-16 19:42:32 +00:00
Karsten Hopp
24c7369c90 - update, with a fix for rebuild problems 2009-03-22 17:02:16 +00:00
Jesse Keating
eb61066842 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-25 13:57:47 +00:00
Karsten Hopp
2669fc286e - fix buildrequires and path to pam security module 2008-06-06 13:12:30 +00:00
Karsten Hopp
13f281d1bb - drop old libcap tarball 2008-06-06 12:58:23 +00:00
Karsten Hopp
c2f3b5e622 - drop libcap.so.1 2008-06-06 12:40:29 +00:00
Karsten Hopp
f2adbc0024 drop obsolete patch 2008-06-06 12:37:19 +00:00
Karsten Hopp
234212358a - libcap-2.10 2008-06-05 13:26:10 +00:00
Karsten Hopp
5c19a860d6 - don't build static binaries (#433808) 2008-02-21 16:23:13 +00:00
Karsten Hopp
83f7d0b97d make libcap.so.1 a symlink 2008-02-20 11:11:01 +00:00
Karsten Hopp
7918e311ff - fix typo 2008-02-20 11:02:03 +00:00
Karsten Hopp
bf612ab2c0 - temporarily add libcap-1 libraries to bootstrap some packages 2008-02-20 11:00:41 +00:00
Jesse Keating
4e3e5569c0 - Autorebuild for GCC 4.3 2008-02-19 09:59:09 +00:00
Karsten Hopp
ba4584cab9 - remove obsolete patches 2008-02-15 19:54:41 +00:00
Karsten Hopp
6f27f70253 - upate to 2.06 (#432983) 2008-02-15 19:50:00 +00:00
Karsten Hopp
8b6fa16031 - drop post,postun requirements on ldconfig as find-requires can handle
this
2008-01-16 09:27:18 +00:00
Karsten Hopp
d3432d6422 - add disttag
- fix changelog
- fix defattr
2008-01-15 09:42:47 +00:00
Karsten Hopp
a2ea56fe92 - use cp -p in spec file to preserve file attributes (#225992)
- add license file
2008-01-14 12:24:58 +00:00
Bill Nottingham
b0d06e1c78 makefile update to properly grab makefile.common 2007-10-15 18:59:38 +00:00
Karsten Hopp
c1a50f37a0 - fix license tag 2007-08-24 20:01:15 +00:00
Karsten Hopp
4d95bd590f - rebuild for buildID 2007-08-24 19:54:26 +00:00
Karsten Hopp
397e61db0c - add CAP_AUDIT_WRITE and CAP_AUDIT_CONTROL (#229833) 2007-02-23 22:21:40 +00:00
Karsten Hopp
2f357d6467 - drop obsolete ia64 patch
- rpmlint fixes
2007-02-21 14:43:04 +00:00
Karsten Hopp
05ac135285 - misc. review fixes
- add debian patch to make it build with a recent glibc
- remove static lib
2007-02-21 14:28:14 +00:00
Karsten Hopp
eab0736c97 - add patch to support COPTFLAG (#199365) 2006-07-19 10:30:59 +00:00
Jesse Keating
30f01f3ca5 bumped for rebuild 2006-07-12 06:46:37 +00:00
Jesse Keating
2845a5df99 bump for bug in double-long on ppc(64) 2006-02-11 03:53:34 +00:00
Jesse Keating
c9e2dae41d bump for new gcc/glibc 2006-02-07 12:29:45 +00:00
Karsten Hopp
7db4bb6529 - added development manpages
- as there are no manpages for the executables available, added at least a
    FAQ (#172324)
2005-12-19 13:03:45 +00:00
Jesse Keating
00939fd8bb gcc update bump 2005-12-09 22:41:31 +00:00
Steve Grubb
b45dc7c84a correct typo 2005-10-31 19:19:58 +00:00
Steve Grubb
4d3e63e419 - rebuild to pick up audit capabilities 2005-10-31 19:17:36 +00:00
Karsten Hopp
f585bd72b6 - build with gcc-4 2005-03-02 12:00:14 +00:00
Karsten Hopp
94e6b261ea rebuild with -D_FORTITY_SOURCE=2 2005-02-09 10:19:12 +00:00
cvsdist
b4d4093b27 auto-import changelog data from libcap-1.10-20.src.rpm
Tue Aug 31 2004 Phil Knirsch <pknirsch@redhat.com> 1.10-20
- Fix wrong typedef in userland patch (#98801)
2004-09-09 07:23:15 +00:00
cvsdist
4329914ba8 auto-import changelog data from libcap-1.10-19.src.rpm
Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
2004-09-09 07:23:12 +00:00
cvsdist
7c5d115ca2 auto-import changelog data from libcap-1.10-18.1.src.rpm
Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
2004-09-09 07:23:05 +00:00
cvsdist
e7194a1d8f auto-import changelog data from libcap-1.10-17.src.rpm
Tue Jan 27 2004 Karsten Hopp <karsten@redhat.de> 1.10-17
- use _manpath
2004-09-09 07:22:44 +00:00
cvsdist
ac603f9883 auto-import changelog data from libcap-1.10-16.src.rpm
Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt
2004-09-09 07:22:39 +00:00
cvsdist
c26ace6f71 auto-import changelog data from libcap-1.10-15.src.rpm
Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt
Sat Jan 04 2003 Jeff Johnson <jbj@redhat.com> 1.10-14
- set execute bits on library so that requires are generated.
Thu Nov 21 2002 Mike A. Harris <mharris@redhat.com> 1.10-13
- Removed %name macro sillyness from package Summary, description text,
    etc.
- Removed archaic Prefix: tag
- lib64 fixes everywhere to use _lib, _libdir, etc
- Removed deletion of RPM_BUILD_DIR from %clean section
- Added -q flag to setup macro
- Severely cleaned up spec file, and removed usage of perl
2004-09-09 07:22:01 +00:00
cvsdist
0eb7206aa7 auto-import changelog data from libcap-1.10-12.src.rpm
Fri Jul 19 2002 Jakub Jelinek <jakub@redhat.com> 1.10-12
- CFLAGS was using COPTFLAG variable, not COPTFLAGS
- build with -fpic
- apply the IA-64 patch everywhere, use capget/capset from glibc, not
    directly as _syscall (as it is broken on IA-32 with -fpic)
- reenable alpha
2004-09-09 07:21:56 +00:00
cvsdist
0703d9f9a8 auto-import changelog data from libcap-1.10-11.src.rpm
Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild
Wed May 29 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.10-10
- Exclude alpha for now, apparent gcc bug.
2004-09-09 07:21:53 +00:00
cvsdist
38360e64a8 auto-import libcap-1.10-8 from libcap-1.10-8.src.rpm 2004-09-09 07:21:44 +00:00
cvsdist
2544c6565a auto-import changelog data from libcap-1.10-6.src.rpm
Fri Nov 09 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.10-6
- Fix sys/capabilities.h header (#55727)
- Move to /lib, some applications seem to be using this rather early
    (#55733)
2004-09-09 07:21:31 +00:00
cvsdist
d92e238ef3 auto-import changelog data from libcap-1.10-5.src.rpm
Mon Jul 16 2001 Trond Eivind Glomsrd <teg@redhat.com>
- Add post,postun scripts
2004-09-09 07:21:27 +00:00
cvsdist
3b8486c2fd auto-import changelog data from libcap-1.10-4.src.rpm
Tue Jul 10 2001 Jakub Jelinek <jakub@redhat.com>
- don't build libcap.so.1 with ld -shared, but gcc -shared
Wed Jun 20 2001 Trond Eivind Glomsrd <teg@redhat.com>
- Rebuild - it was missing for alpha
Wed Jun 06 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- add s390/s390x support
Thu May 17 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.10-1
- initial RPM
- fix build on ia64
2004-09-09 07:21:23 +00:00
27 changed files with 1054 additions and 6 deletions

View file

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/libcap-*.tar.gz
/libcap-*.tar.sign
/*.src.rpm

105
29EE848AE2CCF3F4.asc Normal file
View file

@ -0,0 +1,105 @@
pub rsa4096 2011-10-07 [SC]
38A644698C69787344E954CE29EE848AE2CCF3F4
uid Andrew G. Morgan <morgan@kernel.org>
uid Andrew G. Morgan (Work Address) <agm@google.com>
sub rsa4096 2011-10-07 [E]
E8BBFE9EBCE94FB48D2F98FC61B996743B143E89
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBE6OiBIBEADpdtUxC8Fmhn5UK6UCZdU7mFgZwN8U9cabFUPfUIkMqXULhCD0
hG2/amuiiUoLollPjOopNqk4cc8LcZfszOdBFAYj7MeWzNySVw4KkWrVCEH/bZ0Q
QzZH2qmoMT5CIrtcNxCAvukYsZLhyZYO0HdfuE05mVhVjtX9Btfxr7Ndvb7L4MRS
3Qb6+nHTgfn/Oow92/koIWvi0YvskKdZypeU888TQL99E8xdgL2n2Ip3xYwBHRR2
GPb5MGOuEItF3tJ0kkILW5mzkJq/iLzRphzKjdF76I9QVRP8dZ+uWHPubWePm/5c
1H9lnlw00ZZ/ucQvSwTesUYk2aKkxzgm6X8fCdJXBLGgW5K6CkynpjN3qJ9KpcNY
H55smUgp8BaiWuoHe4pLvuBhnN2wiYOe2j9UvGX1OaRstMXFx7YbBvkGgdoZthUe
VPGAa4K+dnI2oy4wukzl/unAKrlMCBRsRoW2qjy3TDSXqwJhd34ilHzrdAdchrh/
acBfbBtRzVlcDTnGltDNMuRTXzujaY9C3B0L2E+Jfrds8WcM8ASO4mHwJUTMrBwM
b5sFSG+/X9Ufg/c2G086HQ7xMERUA5oz66P5ReHCph8WHQN2L5vtZwL7//hZB9hn
G0K1210YEDXpFPijpis/54MKUSkWEFOLjUbiSPbwEfb79A00CcHojQQinw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WX5
-----END PGP PUBLIC KEY BLOCK-----

View file

@ -1,6 +0,0 @@
# Makefile for source rpm: libcap
# $Id$
NAME := libcap
SPECFILE = $(firstword $(wildcard *.spec))
include ../common/Makefile.common

13
_makenames-build.patch Normal file
View file

@ -0,0 +1,13 @@
diff --git a/libcap/Makefile b/libcap/Makefile
index f0eb87e..e90a950 100644
--- a/libcap/Makefile
+++ b/libcap/Makefile
@@ -80,7 +80,7 @@ $(PSXTITLE).pc: $(PSXTITLE).pc.in
$< >$@
_makenames: _makenames.c cap_names.list.h
- $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@ $(BUILD_LDFLAGS)
+ $(BUILD_CC) $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
cap_names.h: _makenames
./_makenames > cap_names.h

18
gating.yaml Normal file
View file

@ -0,0 +1,18 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpminspect.static-analysis}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional}
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

2
libcap.rpmlintrc Normal file
View file

@ -0,0 +1,2 @@
addFilter('.*static-library-without-debuginfo.*')
addFilter('.*pam-unauthorized-module.*')

496
libcap.spec Normal file
View file

@ -0,0 +1,496 @@
Name: libcap
Version: 2.77
Release: 1%{?dist}
Summary: Library for getting and setting POSIX.1e capabilities
URL: https://sites.google.com/site/fullycapable/
License: BSD-3-Clause OR GPL-2.0-only
Source0: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.gz
Source1: https://mirrors.edge.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{name}-%{version}.tar.sign
Source2: https://git.kernel.org/pub/scm/docs/kernel/pgpkeys.git/plain/keys/29EE848AE2CCF3F4.asc
Patch0: _makenames-build.patch
BuildRequires: pam-devel gcc
BuildRequires: make
BuildRequires: glibc-static
BuildRequires: gnupg2
%ifarch %{golang_arches}
BuildRequires: golang >= 1.22
%endif
%if "%{_sbindir}" == "%{_bindir}"
# Compat symlinks for Requires in other packages.
# We rely on filesystem to create the symlinks for us.
Requires: filesystem(unmerged-sbin-symlinks)
Provides: /usr/sbin/setcap
%endif
%description
libcap is a library for getting and setting POSIX.1e (formerly POSIX 6)
draft 15 capabilities.
%package static
Summary: Static libraries for libcap development
Requires: %{name} = %{version}-%{release}
%description static
The libcap-static package contains static libraries needed to develop programs
that use libcap and need to be statically linked.
libcap is a library for getting and setting POSIX.1e (formerly POSIX 6)
draft 15 capabilities.
%package devel
Summary: Development files for libcap
Requires: %{name} = %{version}-%{release}
%description devel
Development files (Headers, etc) for libcap.
libcap is a library for getting and setting POSIX.1e (formerly POSIX 6)
draft 15 capabilities.
Install libcap-devel if you want to develop or compile applications using
libcap.
%ifarch %{golang_arches}
%package -n captree
Summary: Capability inspection utility
%description -n captree
The captree program was inspired by the utility pstree, but it uses the
libcap/cap (Go package) API to explore process runtime state and display
the capability status of processes and threads.
%endif
%prep
gzip -cd %{SOURCE0} | %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data=-
%autosetup -p1
%build
%make_build prefix=%{_prefix} lib=%{_lib} SBINDIR=%{_sbindir} CGO_REQUIRED=1 CGO_CFLAGS="${CFLAGS}" CGO_LDFLAGS="${LDFLAGS}" GO_BUILD_FLAGS="-buildmode=pie -a -v -x -ldflags='-compressdwarf=false -B gobuildid'" all
%check
make test
%install
%make_install prefix=%{_prefix} lib=%{_lib} SBINDIR=%{_sbindir} CGO_REQUIRED=1 CGO_CFLAGS="${CFLAGS}" CGO_LDFLAGS="${LDFLAGS}" GO_BUILD_FLAGS="-buildmode=pie -ldflags='-compressdwarf=false -B gobuildid'"
mkdir -p %{buildroot}/%{_mandir}/man{2,3,5,8}
mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/
chmod +x %{buildroot}/%{_libdir}/*.so.*
%ldconfig_scriptlets
%files
%license License
%doc doc/capability.md
%{_libdir}/libcap.so.2{,.*}
%{_libdir}/libpsx.so.2{,.*}
%{_sbindir}/{capsh,getcap,getpcaps,setcap}
%{_mandir}/man1/capsh.1*
%{_mandir}/man5/capability.conf.5*
%{_mandir}/man7/cap_text_formats.7*
%{_mandir}/man8/{getcap,getpcaps,setcap,pam_cap}.8*
%{_libdir}/security/pam_cap.so
%exclude %{_mandir}/man8/captree.8*
%files static
%{_libdir}/libcap.a
%{_libdir}/libpsx.a
%files devel
%{_includedir}/sys/capability.h
%{_includedir}/sys/psx_syscall.h
%{_libdir}/libcap.so
%{_libdir}/libpsx.so
%{_mandir}/man3/cap*.3*
%{_mandir}/man3/libcap.3*
%{_mandir}/man3/libpsx.3*
%{_mandir}/man3/psx_*.3*
%{_mandir}/man3/__psx_syscall.3*
%{_libdir}/pkgconfig/{libcap,libpsx}.pc
%ifarch %{golang_arches}
%files -n captree
%license License
%{_sbindir}/captree
%{_mandir}/man8/captree.8*
%endif
%changelog
* Tue Oct 28 2025 Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com> - 2.77-1
- Update to version 2.77 (rhbz#2406446)
* Fri Oct 10 2025 Alejandro Sáez <asm@redhat.com> - 2.76-4
- rebuild
* Fri Aug 15 2025 Maxwell G <maxwell@gtmx.me> - 2.76-3
- Rebuild for golang-1.25.0
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.76-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Apr 14 2025 Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com> - 2.76-1
- Update to version 2.76 (rhbz#2349318, rhbz#2352529)
* Fri Jan 24 2025 Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com> - 2.73-2
- Update internal CI tests
* Fri Jan 24 2025 Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com> - 2.73-1
- Update to version 2.73 (rhbz#2340722)
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.71-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.71-2
- Rebuilt for the bin-sbin merge (2nd attempt)
* Mon Oct 28 2024 Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com> - 2.71-1
- Update to version 2.71
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.70-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Jul 09 2024 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.70-3
- Rebuilt for the bin-sbin merge
* Tue Jun 04 2024 Anderson Toshiyuki Sasaki <ansasaki@redhat.com> - 2.70-2
- Set CGO_CFLAGS=$CFLAGS and CGO_LDFLAGS=$LDFLAGS to build Go code
* Mon May 20 2024 Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com> - 2.70-1
- Update to version 2.70
* Fri Apr 05 2024 Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com> - 2.69-8
- Make correction to the capability.conf manpage
* Fri Apr 05 2024 Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com> - 2.69-7
- Reenable PIE in the captree tool
* Thu Apr 04 2024 Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com> - 2.69-6
- Fix incompatibility of the build with go 1.22.
* Wed Apr 03 2024 Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com> - 2.69-5
- Add manpages for pam_cap and capability.conf
* Sun Feb 11 2024 Maxwell G <maxwell@gtmx.me> - 2.69-4
- Rebuild for golang 1.22.0
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.69-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.69-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Nov 06 2023 Carlos Rodriguez-Fernandez <carlosrodrifernandez@gmail.com> - 2.69-1
- Update to 2.69 (with contribs from Yanko Kaneti <yaneti@declera.com>, and Andrew G. Morgan <morgan@kernel.org>)
- Update license to SPDX (by Anderson Toshiyuki Sasaki <ansasaki@redhat.com>)
- Make file lists more explicit to avoid accidental ABI changes (Dominik Mierzejewski <dominik@greysector.net>)
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.48-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.48-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.48-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.48-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.48-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Sun Feb 14 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2.48-2
- Rebase distro flags patch
* Wed Feb 10 2021 Giuseppe Scrivano <gscrivan@redhat.com> - 2.48-1
- Update to 0.2.48
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.46-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sun Jan 17 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 2.46-1
- Update to 0.2.46
* Wed Oct 21 2020 Karsten Hopp <karsten@fedoraproject.org> - 2.44-1
- update to 2.44
- remove additional getpcaps manpage as it now included in the sources
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.26-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.26-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.26-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Feb 04 2019 Karsten Hopp <karsten@redhat.com> - 2.26-5
- enable gating
* Mon Feb 04 2019 Karsten Hopp <karsten@redhat.com> - 2.26-4
- bump release
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.26-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jan 28 2019 Karsten Hopp <karsten@redhat.com> - 2.26-2
- add CI tests using the standard test interface (astepano)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.25-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jul 02 2018 Karsten Hopp <karsten@redhat.com> - 2.25-11
- rebuild
* Wed Feb 21 2018 Karsten Hopp <karsten@redhat.com> - 2.25-10
- buildrequire gcc
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.25-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.25-8
- Switch to %%ldconfig_scriptlets
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.25-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.25-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.25-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Dec 15 2016 Karsten Hopp <karsten@redhat.com> - 2.25-4
- add -static subpackage (rhbz#1380251)
* Sun Nov 27 2016 Lubomir Rintel <lkundrak@v3.sk> - 2.25-3
- Add perl BR to fix FTBFS
* Mon Apr 25 2016 Peter Robinson <pbrobinson@fedoraproject.org> 2.25-2
- Fix pkgconfig install location on aarch64
- Spec file cleanups
* Mon Apr 11 2016 Karsten Hopp <karsten@redhat.com> - 2.25-1
- libcap-2.25
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.24-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.24-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.24-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Thu Jul 17 2014 Tom Callaway <spot@fedoraproject.org> - 2.24-6
- fix license handling
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.24-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri Apr 25 2014 Karsten Hopp <karsten@redhat.com> 2.24-4
- fix libdir in libcap.pc
* Wed Apr 23 2014 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 2.24-3
- set pkg-config dir to proper value to get it built on AArch64
* Wed Apr 16 2014 Karsten Hopp <karsten@redhat.com> 2.24-2
- fix URL and license
* Wed Apr 16 2014 Karsten Hopp <karsten@redhat.com> 2.24-1
- update to 2.24
- dropped patch for rhbz#911878, it is upstream now
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.22-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue May 14 2013 Karsten Hopp <karsten@redhat.com> 2.22-6
- mv libraries to /usr/lib*
- add getpcaps man page
- spec file cleanup
- fix URL of tarball
* Tue May 14 2013 Karsten Hopp <karsten@redhat.com> 2.22-5
- add patch from Mark Wielaard to fix use of uninitialized memory in _fcaps_load
rhbz #911878
* Sun Feb 24 2013 Ville Skyttä <ville.skytta@iki.fi> - 2.22-5
- Build with $RPM_OPT_FLAGS and $RPM_LD_FLAGS.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.22-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.22-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.22-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Jul 27 2011 Karsten Hopp <karsten@redhat.com> 2.22-1
- update to 2.22 (#689752)
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Dec 10 2009 Karsten Hopp <karsten@redhat.com> 2.17-1
- update to 2.17
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.16-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue Jun 16 2009 Karsten Hopp <karsten@redhat.com> 2.16-4
- fix build problems with p.e. cdrkit
* Sun Mar 22 2009 Karsten Hopp <karsten@redhat.com> 2.16-1
- update, with a fix for rebuild problems
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Fri Jun 06 2008 Karsten Hopp <karsten@redhat.com> 2.10-2
- drop libcap.so.1
- fix buildrequires and path to pam security module
* Thu Jun 05 2008 Karsten Hopp <karsten@redhat.com> 2.10-1
- libcap-2.10
* Thu Feb 21 2008 Karsten Hopp <karsten@redhat.com> 2.06-4
- don't build static binaries (#433808)
* Wed Feb 20 2008 Karsten Hopp <karsten@redhat.com> 2.06-3
- temporarily add libcap-1 libraries to bootstrap some packages
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.06-2
- Autorebuild for GCC 4.3
* Fri Feb 15 2008 Karsten Hopp <karsten@redhat.com> 2.06-1
- upate to 2.06 (#432983)
* Wed Jan 16 2008 Karsten Hopp <karsten@redhat.com> 1.10-33
- drop post,postun requirements on ldconfig as find-requires can handle this
* Tue Jan 15 2008 Karsten Hopp <karsten@redhat.com> 1.10-32
- add disttag
- fix changelog
- fix defattr
* Mon Jan 14 2008 Karsten Hopp <karsten@redhat.com> 1.10-31
- use cp -p in spec file to preserve file attributes (#225992)
- add license file
* Fri Aug 24 2007 Karsten Hopp <karsten@redhat.com> 1.10-30
- rebuild
* Fri Feb 23 2007 Karsten Hopp <karsten@redhat.com> 1.10-29
- add CAP_AUDIT_WRITE and CAP_AUDIT_CONTROL (#229833)
* Wed Feb 21 2007 Karsten Hopp <karsten@redhat.com> 1.10-28
- drop obsolete ia64 patch
- rpmlint fixes
* Wed Feb 21 2007 Karsten Hopp <karsten@redhat.com> 1.10-27
- misc. review fixes
- add debian patch to make it build with a recent glibc
- remove static lib
* Wed Jul 19 2006 Karsten Hopp <karsten@redhat.de> 1.10-25
- add patch to support COPTFLAG (#199365)
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.10-24.2.1
- rebuild
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.10-24.2
- bump again for double-long bug on ppc(64)
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.10-24.1
- rebuilt for new gcc4.1 snapshot and glibc changes
* Mon Dec 19 2005 Karsten Hopp <karsten@redhat.de> 1.10-24
- added development manpages
- as there are no manpages for the executables available, added at least
a FAQ (#172324)
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt
* Mon Oct 31 2005 Steve Grubb <sgrubb@redhat.com> 1.10-23
- rebuild to pick up audit capabilities
* Wed Mar 02 2005 Karsten Hopp <karsten@redhat.de> 1.10-22
- build with gcc-4
* Wed Feb 09 2005 Karsten Hopp <karsten@redhat.de> 1.10-21
- rebuilt
* Tue Aug 31 2004 Phil Knirsch <pknirsch@redhat.com> 1.10-20
- Fix wrong typedef in userland patch (#98801)
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Tue Jan 27 2004 Karsten Hopp <karsten@redhat.de> 1.10-17
- use _manpath
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt
* Sat Jan 4 2003 Jeff Johnson <jbj@redhat.com> 1.10-14
- set execute bits on library so that requires are generated.
* Thu Nov 21 2002 Mike A. Harris <mharris@redhat.com> 1.10-13
- Removed %%name macro sillyness from package Summary, description text, etc.
- Removed archaic Prefix: tag
- lib64 fixes everywhere to use _lib, _libdir, etc
- Removed deletion of RPM_BUILD_DIR from %%clean section
- Added -q flag to setup macro
- Severely cleaned up spec file, and removed usage of perl
* Fri Jul 19 2002 Jakub Jelinek <jakub@redhat.com> 1.10-12
- CFLAGS was using COPTFLAG variable, not COPTFLAGS
- build with -fpic
- apply the IA-64 patch everywhere, use capget/capset from glibc,
not directly as _syscall (as it is broken on IA-32 with -fpic)
- reenable alpha
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild
* Wed May 29 2002 Bernhard Rosenkraenzer <bero@redhat.com> 1.10-10
- Exclude alpha for now, apparent gcc bug.
* Fri Nov 9 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.10-6
- Fix sys/capabilities.h header (#55727)
- Move to /lib, some applications seem to be using this rather early
(#55733)
* Mon Jul 16 2001 Trond Eivind Glomsrød <teg@redhat.com>
- Add post,postun scripts
* Tue Jul 10 2001 Jakub Jelinek <jakub@redhat.com>
- don't build libcap.so.1 with ld -shared, but gcc -shared
* Wed Jun 20 2001 Trond Eivind Glomsrød <teg@redhat.com>
- Rebuild - it was missing for alpha
* Wed Jun 06 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- add s390/s390x support
* Thu May 17 2001 Bernhard Rosenkraenzer <bero@redhat.com> 1.10-1
- initial RPM
- fix build on ia64

5
plans/main.fmf Normal file
View file

@ -0,0 +1,5 @@
summary: Basic smoke test for libcap
discover:
how: fmf
execute:
how: tmt

View file

@ -0,0 +1,2 @@
SHA512 (libcap-2.77.tar.gz) = e5471afc4f149a8330e6df07effe58cac44d8a773b1fff0686e7039c41888e33402e1942fe5271a142e159a6088abbdbb7a82133389b3a9351749c2bf797b6b8
SHA512 (libcap-2.77.tar.sign) = c362eefb80bbc110b7d7c676cc2b37e04bd3dab1b8b4577d62a0774b6300258743156c57102e8dc11c35d2ea876053dc57eae44197137273413b959df33ef0c0

2
tests/capsh/main.fmf Normal file
View file

@ -0,0 +1,2 @@
summary: capsh tests
description: tests basic capsh functionality

94
tests/capsh/test.sh Executable file
View file

@ -0,0 +1,94 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlRun "useradd -m libcap_tester"
rlPhaseEnd
rlPhaseStartTest "Should remove capability"
rlRun -s "capsh --drop=cap_sys_admin -- -c 'getpcaps \$\$'"
rlAssertGrep "cap_sys_admin-ep" $rlRun_LOG
rlPhaseEnd
rlPhaseStartTest "Should prevent the use of removed capability"
rlRun -s "capsh --drop=cap_net_raw -- -c 'ping localhost -e 0 -c 1'" 2,126 "Ping without cap_net_raw shoud fail"
rlAssertGrep "Operation not permitted" $rlRun_LOG
rlPhaseEnd
rlPhaseStartTest "Should set the prevailing process capabilities"
rlRun -s "capsh --caps=cap_chown+p --print"
rlAssertGrep "^Current:.*cap_chown[+=][ei]?p[ei]?.*" $rlRun_LOG -E
rlPhaseEnd
rlPhaseStartTest "Should set the inheritable set of capabilities"
rlRun -s "capsh --inh=cap_chown --print"
rlAssertGrep "^Current:.*cap_chown[+=][ep]?i[ep]?.*" $rlRun_LOG -E
rlPhaseEnd
rlPhaseStartTest "Should set and show the inheritable set of capabilities"
rlRun -s "capsh --inh=cap_chown -- -c 'getpcaps \$\$' 2>&1"
rlAssertGrep ".*cap_chown[+=][ep]?i[ep]?.*" $rlRun_LOG -E
rlPhaseEnd
rlPhaseStartTest "Should assume the identity of the user nobody"
USERID=`id -u nobody`
GROUPID=`id -g nobody`
rlRun -s "capsh --user=nobody -- -c 'id'"
rlAssertGrep "uid=$USERID(nobody) gid=$GROUPID(nobody) groups=$GROUPID(nobody)" $rlRun_LOG
rlPhaseEnd
rlPhaseStartTest "Should assume the nobody identity with uid"
USERID=`id -u nobody`
rlRun -s "capsh --uid=$USERID -- -c 'id'"
rlAssertGrep "uid=$USERID(nobody) gid=0(root) groups=0(root)" $rlRun_LOG
rlPhaseEnd
rlPhaseStartTest "Should assume guid of nobody"
GROUPID=`id -g nobody`
rlRun -s "capsh --gid=$GROUPID -- -c 'id'"
rlAssertGrep "uid=0(root) gid=$GROUPID(nobody)" $rlRun_LOG
rlPhaseEnd
rlPhaseStartTest "Should assume the supplementary groups"
GROUPID=`id -g nobody`
GROUP2ID=`id -g daemon`
rlRun -s "capsh --groups=${GROUPID},${GROUP2ID} -- -c id"
rlAssertGrep "uid=0(root) gid=0(root) groups=0(root),${GROUP2ID}(daemon),${GROUPID}(nobody)" $rlRun_LOG
rlPhaseEnd
rlPhaseStartTest "Should decode capabilities"
rlRun "CODE=$( cat /proc/$$/status | awk '/CapEff/ { print $2 }' )"
rlRun "DECODE=$( capsh --decode=$CODE | cut -d '=' -f 2 )"
rlRun "capsh --print | grep \"$DECODE\""
rlPhaseEnd
rlPhaseStartTest "Should detect the existence of a capability on the system"
rlRun "capsh --supports=cap_net_raw"
rlPhaseEnd
rlPhaseStartTest "Should detect the absence of a capability on the system"
rlRun -s "capsh --supports=cap_foo_bar" 1
rlAssertGrep "cap\[cap_foo_bar\] not recognized by library" $rlRun_LOG
rlPhaseEnd
rlPhaseStartTest "Should error for unsupported option"
rlRun "capsh --foo bar" 1
rlPhaseEnd
rlPhaseStartTest "Should run as a regular user"
USERID=`id -u libcap_tester`
rlRun -s "su - libcap_tester -c 'capsh --print'"
rlAssertGrep "Current: =\$" $rlRun_LOG -E
rlAssertGrep "uid=$USERID(libcap_tester)" $rlRun_LOG
rlPhaseEnd
rlPhaseStartCleanup
rlRun "userdel -r libcap_tester"
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalEnd

2
tests/captree/main.fmf Normal file
View file

@ -0,0 +1,2 @@
summary: captree smoke test
description: tests basic captree functionality

23
tests/captree/test.sh Executable file
View file

@ -0,0 +1,23 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
if rpm --eval '%{golang_arches}' | tr ' ' '\n' | grep -q -e "$(rpm --eval '%{_arch}')"; then
rlPhaseStartTest "Should display help"
rlRun "captree -h"
rlPhaseEnd
rlPhaseStartTest "Should list capabilities of pid 1"
rlRun -s "captree --depth 1 1"
rlAssertGrep 'systemd.*=ep' $rlRun_LOG
rlPhaseEnd
rlPhaseStartTest "Should display sys admin capability"
rlRun -s "capsh --drop=cap_sys_admin -- -c 'captree --verbose \$\$'"
rlAssertGrep "!cap_sys_admin" $rlRun_LOG
rlPhaseEnd
fi
rlJournalEnd

View file

@ -0,0 +1,2 @@
summary: setcap and getcap tests
description: tests setcap and getcap basic functionality

98
tests/getcap-setcap/test.sh Executable file
View file

@ -0,0 +1,98 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest "Should set and get capabilities on multiple files"
rlRun "touch test-file-0"
rlRun "touch test-file-1"
rlRun "setcap cap_net_admin+p test-file-0 cap_net_raw+ei test-file-1"
rlRun -s "getcap test-file-0 test-file-1"
rlAssertGrep "test-file-0.*cap_net_admin[+=]p" $rlRun_LOG -E
rlAssertGrep "test-file-1.*cap_net_raw[+=]ei" $rlRun_LOG -E
rlRun "rm -f test-file-0 test-file-1"
rlPhaseEnd
rlPhaseStartTest "Should set capabilities via stdin"
rlRun "touch test-file-0"
rlRun "echo -e 'cap_net_raw+p\ncap_net_admin+p' > input"
rlRun -s "setcap - test-file-0 < input"
rlAssertGrep "Please" $rlRun_LOG
rlRun -s "getcap test-file-0"
rlAssertGrep "cap_net_admin,cap_net_raw[+=]p" $rlRun_LOG -E
rlRun "rm -f test-file-0"
rlPhaseEnd
rlPhaseStartTest "Should set capabilities quietly via stdin"
rlRun "touch test-file-0"
rlRun "echo -e 'cap_net_raw+p' > input"
rlRun -s "setcap -q - test-file-0 < input"
rlAssertNotGrep "Please" $rlRun_LOG
rlRun -s "getcap test-file-0"
rlAssertGrep "cap_net_raw[+=]p" $rlRun_LOG -E
rlRun "rm -f test-file-0"
rlPhaseEnd
rlPhaseStartTest "Should remove capabilities"
rlRun "touch test-file-0"
rlRun "setcap cap_net_admin+p test-file-0"
rlRun "setcap -r test-file-0"
rlRun -s "getcap test-file-0"
rlAssertNotGrep "cap_net_admin" $rlRun_LOG
rlRun "rm -f test-file-0"
rlPhaseEnd
rlPhaseStartTest "Should list capabilities recursively"
rlRun "touch test-file-0"
rlRun "mkdir test-dir-1"
rlRun "touch test-dir-1/test-file-1"
rlRun "setcap cap_net_admin+p test-file-0 cap_net_raw+ei test-dir-1/test-file-1"
rlRun -s "getcap -r *"
rlAssertGrep "^test-file-0.*cap_net_admin[+=]p\$" $rlRun_LOG -E
rlAssertGrep "^test-dir-1/test-file-1.*cap_net_raw[+=]ei\$" $rlRun_LOG -E
rlRun "rm -f test-file-0"
rlRun "rm -rf test-dir-1"
rlPhaseEnd
rlPhaseStartTest "listing capabilities verbosely"
rlRun "touch test-file-0"
rlRun "mkdir test-dir-1"
rlRun "touch test-dir-1/test-file-1"
rlRun "touch test-dir-1/test-file-2"
rlRun "setcap cap_net_admin+p test-file-0 cap_net_raw+ei test-dir-1/test-file-1"
rlRun -s "getcap -v -r *"
rlAssertGrep "^test-file-0.*cap_net_admin[+=]p\$" $rlRun_LOG -E
rlAssertGrep "^test-dir-1/test-file-1.*cap_net_raw[+=]ei\$" $rlRun_LOG -E
rlAssertGrep "^test-dir-1/test-file-2\$" $rlRun_LOG -E
rlRun "rm -f test-file-0"
rlRun "rm -rf test-dir-1"
rlPhaseEnd
rlPhaseStartTest "Should setcap print help"
rlRun -s "setcap -h"
rlAssertGrep "usage" $rlRun_LOG
rlPhaseEnd
rlPhaseStartTest "Should getcap print help"
rlRun -s "getcap -h"
rlAssertGrep "usage" $rlRun_LOG
rlPhaseEnd
rlPhaseStartTest "setcap should exit with 1 on invalid arguments"
rlRun -s "setcap foo bar" 1
rlAssertGrep "Invalid" $rlRun_LOG -i
rlPhaseEnd
rlPhaseStartTest "getcap should exit with 1 on invalid arguments"
rlRun -s "getcap -f oo" 1
rlAssertGrep "Invalid" $rlRun_LOG -i
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalEnd

View file

@ -0,0 +1,2 @@
summary: libcap-devel tests
description: tests libcap-devel functionality

View file

@ -0,0 +1,52 @@
/*
# SPDX-License-Identifier: LGPL-2.1+
# ~~~
# Description: libcap tests
#
# Author: Susant Sahani <susant@redhat.com>
# Copyright (c) 2018 Red Hat, Inc.
# ~~~
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#include <setjmp.h>
#include <inttypes.h>
#include <cmocka.h>
#include <sys/capability.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <errno.h>
#include <unistd.h>
void drop_cap(cap_value_t capflag) {
cap_t d;
d = cap_get_proc();
assert_non_null(d);
assert_return_code(cap_set_flag(d, CAP_EFFECTIVE, 1, &capflag, CAP_CLEAR), 0);
assert_return_code(cap_set_flag(d, CAP_PERMITTED, 1, &capflag, CAP_CLEAR), 0);
assert_return_code(cap_set_proc(d), 0);
}
void test_drop_cap_net_raw(void **state) {
int s;
assert_true((s = socket(AF_INET, SOCK_RAW, IPPROTO_UDP)) >= 0);
close(s);
drop_cap(CAP_NET_RAW);
assert_false((s = socket(PF_INET, SOCK_RAW, IPPROTO_UDP)) >= 0);
}
int main(int argc, char *argv[]) {
const struct CMUnitTest libcap_tests[] = {
cmocka_unit_test(test_drop_cap_net_raw),
};
return cmocka_run_group_tests(libcap_tests, NULL, NULL);
}

17
tests/libcap-devel/test.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
rlRun "gcc -lcap -lcmocka -Wall -g3 -o test-libcap test-libcap.c"
rlPhaseEnd
rlPhaseStartTest
rlRun "./test-libcap"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "rm test-libcap"
rlPhaseEnd
rlJournalEnd

9
tests/main.fmf Normal file
View file

@ -0,0 +1,9 @@
test: ./test.sh
framework: beakerlib
require:
- libcap
- libcap-devel
- libcmocka
- libcmocka-devel
- gcc
- iputils

2
tests/manpages/main.fmf Normal file
View file

@ -0,0 +1,2 @@
summary: man pages install smoke tests
description: verify that the man pages are installed correctly

26
tests/manpages/test.sh Executable file
View file

@ -0,0 +1,26 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1
expected_manpages=(
'capsh(1)'
'libcap(3)' # there are many more but if these are present then it verifies it because of the glob install
'libpsx(3)'
'capability.conf(5)'
'getcap(8)'
'getpcaps(8)'
'setcap(8)'
'pam_cap(8)'
)
rlJournalStart
for page in "${expected_manpages[@]}"; do
rlPhaseStartTest "test ${page}"
rlRun "man --pager=cat '${page}'"
rlPhaseEnd
done
if rpm --eval '%{golang_arches}' | tr ' ' '\n' | grep -q -e "$(rpm --eval '%{_arch}')"; then
rlPhaseStartTest 'test captree(8)'
rlRun "man --pager=cat 'captree(8)'"
rlPhaseEnd
fi
rlJournalEnd

2
tests/pam_cap/main.fmf Normal file
View file

@ -0,0 +1,2 @@
summary: pam_cap.so tests
description: tests pam_cap.so functionality

32
tests/pam_cap/test.sh Executable file
View file

@ -0,0 +1,32 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlRun "useradd -m pam_cap_user"
rlRun "useradd -m pam_cap_user2"
rlFileBackup /etc/pam.d/su
[ -f /etc/security/capability.conf ] && rlFileBackup /etc/security/capability.conf
rlRun "echo -e 'cap_net_raw pam_cap_user\nnone *' > /etc/security/capability.conf"
rlRun "sed '1 s/^/auth required pam_cap.so/' -i /etc/pam.d/su" 0 "Configure pam_cap.so in /etc/pam.d/su"
rlPhaseEnd
rlPhaseStartTest "Should given pam_cap_user the cap_net_raw capability"
rlRun -s "su - pam_cap_user -c 'getpcaps \$\$'"
rlAssertGrep ".*cap_net_raw[+=].*" $rlRun_LOG -E
rlPhaseEnd
rlPhaseStartTest "The user pam_cap_user2 should not have the cap_net_raw capability"
rlRun -s "su - pam_cap_user2 -c 'getpcaps \$\$'"
rlAssertNotGrep "cap_net_raw" $rlRun_LOG
rlPhaseEnd
rlPhaseStartCleanup
rlRun "userdel -r pam_cap_user"
rlRun "userdel -r pam_cap_user2"
rlFileRestore
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalEnd

View file

@ -0,0 +1,2 @@
summary: validates pkg-configs presence.
description: ensures libcap.pc and libpsx.pc are installed

44
tests/pkg-configs/test.sh Executable file
View file

@ -0,0 +1,44 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlPhaseEnd
rlPhaseStartTest "libcap pkg-config should be present and valid"
rlRun "rpm -ql libcap-devel | grep libcap.pc" 0 "There must be libcap.pc"
if [ $? -eq 0 ]; then
PCFILE=$(rpm -ql libcap-devel | grep libcap.pc)
rlRun "pkg-config --libs libcap | grep -- '-lcap'"
VER=$(awk '/Version:/ { print $2 }' $PCFILE | tail -1)
rlRun "pkg-config --modversion libcap | grep $VER"
rlRun -s "pkg-config --print-variables libcap"
rlAssertGrep "^prefix" $rlRun_LOG
rlAssertGrep "^exec_prefix" $rlRun_LOG
rlAssertGrep "^libdir" $rlRun_LOG
rlAssertGrep "^includedir" $rlRun_LOG
fi
rlPhaseEnd
rlPhaseStartTest "libcap pkg-config should be present and valid"
rlRun "rpm -ql libcap-devel | grep libpsx.pc" 0 "There must be libpsx.pc"
if [ $? -eq 0 ]; then
PCFILE=$(rpm -ql libcap-devel | grep libpsx.pc)
rlRun "pkg-config --libs libpsx | grep -- '-lpsx'"
VER=$(awk '/Version:/ { print $2 }' $PCFILE | tail -1)
rlRun "pkg-config --modversion libpsx | grep $VER"
rlRun -s "pkg-config --print-variables libpsx"
rlAssertGrep "^prefix" $rlRun_LOG
rlAssertGrep "^exec_prefix" $rlRun_LOG
rlAssertGrep "^libdir" $rlRun_LOG
rlAssertGrep "^includedir" $rlRun_LOG
fi
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalEnd