Compare commits

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

21 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
6 changed files with 90 additions and 12 deletions

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

View file

@ -4,7 +4,6 @@ product_versions:
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional}
- !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}
@ -14,7 +13,6 @@ product_versions:
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional}
- !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}

View file

@ -1,6 +1,6 @@
Name: libcap
Version: 2.69
Release: 4%{?dist}
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
@ -8,6 +8,7 @@ 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
@ -15,7 +16,14 @@ BuildRequires: glibc-static
BuildRequires: gnupg2
%ifarch %{golang_arches}
BuildRequires: golang >= 1.11
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
@ -62,15 +70,15 @@ gzip -cd %{SOURCE0} | %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1
%build
%make_build prefix=%{_prefix} lib=%{_lib} GO_BUILD_FLAGS="-ldflags=-linkmode=external" all
%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} GO_BUILD_FLAGS="-ldflags=-linkmode=external"
%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,8}
mkdir -p %{buildroot}/%{_mandir}/man{2,3,5,8}
mv -f doc/*.3 %{buildroot}/%{_mandir}/man3/
chmod +x %{buildroot}/%{_libdir}/*.so.*
@ -84,7 +92,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.*
%{_libdir}/libpsx.so.2{,.*}
%{_sbindir}/{capsh,getcap,getpcaps,setcap}
%{_mandir}/man1/capsh.1*
%{_mandir}/man8/{getcap,getpcaps,setcap}.8*
%{_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*
@ -112,6 +122,61 @@ chmod +x %{buildroot}/%{_libdir}/*.so.*
%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

View file

@ -1,2 +1,2 @@
SHA512 (libcap-2.69.tar.gz) = 75ee0fe8e1ac835f29cb76d233f731dcf126b73eed5229a130bbe4308a42441934d4e9cefeaaab45f774de2ed6859c752fbbfb9908e792f2f9f3d0f841e01aee
SHA512 (libcap-2.69.tar.sign) = 00f323444463b020c999f6fab255a61bd719f8d0ec1b619352e4f1b13407acee9a8e176861e5b408f64a871dc4095c6a26af541c3a0d4efca364c2d4b3679d30
SHA512 (libcap-2.77.tar.gz) = e5471afc4f149a8330e6df07effe58cac44d8a773b1fff0686e7039c41888e33402e1942fe5271a142e159a6088abbdbb7a82133389b3a9351749c2bf797b6b8
SHA512 (libcap-2.77.tar.sign) = c362eefb80bbc110b7d7c676cc2b37e04bd3dab1b8b4577d62a0774b6300258743156c57102e8dc11c35d2ea876053dc57eae44197137273413b959df33ef0c0

View file

@ -5,9 +5,11 @@ 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

View file

@ -26,7 +26,7 @@ rlJournalStart
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 -lpthread -Wl,-wrap,pthread_create'"
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"