pesign/pesign.spec

169 lines
5.5 KiB
RPMSpec
Raw Normal View History

2019-12-03 11:21:29 +08:00
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
Name: pesign
Summary: Signing utility for UEFI binaries
2023-05-04 16:58:54 +08:00
Version: 116
Release: 5
2019-12-03 11:21:29 +08:00
License: GPLv2
2022-11-08 10:47:19 +08:00
URL: https://github.com/rhboot/pesign
2023-05-04 16:58:54 +08:00
Source0: https://github.com/rhboot/pesign/archive/refs/tags/116.tar.gz
2019-12-03 11:21:29 +08:00
Source1: certs.tar.xz
Source2: pesign.py
Source3: euleros-certs.tar.bz2
Obsoletes: pesign-rh-test-certs <= 0.111-7
Requires: nspr nss nss-util popt rpm
Requires(pre): shadow-utils
BuildRequires: nspr nss nss-util popt-devel nss-tools nspr-devel >= 4.9.2-1
BuildRequires: nss-devel >= 3.13.6-1 efivar-devel >= 31-1 libuuid-devel tar xz
2022-11-08 10:47:19 +08:00
BuildRequires: python3-rpm-macros python3 systemd python3-devel gcc mandoc
2020-08-05 17:46:44 +08:00
2022-11-11 12:57:18 +08:00
Patch0001: Bugfix-cms_common-fix-cert-match-check.patch
2023-05-04 16:58:54 +08:00
Patch0002: 0001-cms_common-Fixed-Segmentation-fault.patch
Patch0003: 0002-revert-a-dose-not-work-feature-12f1671.patch
Patch9000: Feature-pesign-support-SM3-digest-algorithm.patch
Patch9001: Feature-pesign-support-SM2-signature-algorithm.patch
2022-11-08 10:47:19 +08:00
Patch9002: Fix-build-error-of-gcc-version-too-low.patch
Patch9004: Remove-unused-i-option-in-authvar.patch
2019-12-03 11:21:29 +08:00
%description
pesign is a command line tool for manipulating signatures and
cryptographic digests of UEFI applications.
%package help
Summary: This package contains help documents
Requires: %{name} = %{version}-%{release}
%description help
Files for help with pesign.
%prep
2022-11-08 10:47:19 +08:00
%autosetup -n %{name}-%{version} -p1 -T -b 0 -D -c -a 1
2019-12-03 11:21:29 +08:00
tar -jxf %{SOURCE3}
%build
make PREFIX=%{_prefix} LIBDIR=%{_libdir}
%install
mkdir -p %{buildroot}/%{_libdir}
make PREFIX=%{_prefix} LIBDIR=%{_libdir} INSTALLROOT=%{buildroot} install
make PREFIX=%{_prefix} LIBDIR=%{_libdir} INSTALLROOT=%{buildroot} install_systemd
install -D etc/pki/pesign/* %{buildroot}%{_sysconfdir}/pki/pesign/
install -D etc/pki/pesign-rh-test/* %{buildroot}%{_sysconfdir}/pki/pesign-rh-test/
mv euleros-certs/etc/pki/pesign/euleros-pesign-db %{buildroot}/etc/pki/pesign/
if [ %{macrosdir} != %{_sysconfdir}/rpm ]; then
mkdir -p %{buildroot}%{macrosdir}
mv %{buildroot}%{_sysconfdir}/rpm/macros.pesign %{buildroot}%{macrosdir}
rmdir %{buildroot}%{_sysconfdir}/rpm
fi
2022-11-08 10:47:19 +08:00
rm -vf %{buildroot}/usr/share/doc/pesign-%{version}/COPYING
2019-12-03 11:21:29 +08:00
install -d -m 0755 %{buildroot}%{python3_sitelib}/mockbuild/plugins/
install -m 0755 %{SOURCE2} %{buildroot}%{python3_sitelib}/mockbuild/plugins/
%pre
getent group pesign >/dev/null || groupadd -r pesign
getent passwd pesign >/dev/null || \
useradd -r -g pesign -d /var/run/pesign -s /sbin/nologin \
-c "Group for the pesign signing daemon" pesign
exit 0
%post
%systemd_post pesign.service
%preun
%systemd_preun pesign.service
%postun
%systemd_postun_with_restart pesign.service
%files
%doc COPYING
%{_bindir}/*
%dir %{_libexecdir}/pesign/
%dir %attr(0770,pesign,pesign) %{_sysconfdir}/pki/pesign/
%config(noreplace) %attr(0660,pesign,pesign) %{_sysconfdir}/pki/pesign/*
%dir %attr(0775,pesign,pesign) %{_sysconfdir}/pki/pesign-rh-test/
%config(noreplace) %attr(0664,pesign,pesign) %{_sysconfdir}/pki/pesign-rh-test/*
%{_libexecdir}/pesign/pesign-authorize
2022-11-08 10:47:19 +08:00
%{_libexecdir}/pesign/pesign-rpmbuild-helper
2019-12-03 11:21:29 +08:00
%config(noreplace)/%{_sysconfdir}/pesign/*
%{_sysconfdir}/popt.d/pesign.popt
%{macrosdir}/macros.pesign
%ghost %attr(0660, -, -) %{_localstatedir}/run/%{name}/socket
%ghost %attr(0660, -, -) %{_localstatedir}/run/%{name}/pesign.pid
%{_tmpfilesdir}/pesign.conf
%{_unitdir}/pesign.service
%{python3_sitelib}/mockbuild/plugins/*/pesign.*
%{python3_sitelib}/mockbuild/plugins/pesign.*
%exclude %{_sysconfdir}/rpm
%files help
2023-05-04 16:58:54 +08:00
%doc README.md TODO
2019-12-03 11:21:29 +08:00
%{_mandir}/man*/*
%changelog
* Fri Dec 06 2024 Ge Wang <wang__ge@126.com> - 116-5
- Revert a dose not work feature 12f1671
* Tue May 07 2024 xu_ping <707078654@qq.com> - 116-4
- Remove unused i option in authvar
* Wed Apr 24 2024 xu_ping <707078654@qq.com> - 116-3
- Modify permissions for macros.pesign.
* Mon Sep 11 2023 jinlun <jinlun@huawei.com> - 116-2
- fix the algorithm flag for sm2,sm3
2023-05-04 16:58:54 +08:00
* Thu May 04 2023 chenchen <chen_aka_jan@163.com> - 116-1
- Update to 116
2023-02-15 14:12:40 +08:00
* Tue Feb 14 2023 luopihui <luopihui@ncti-gba.cn> - 115-4
- Fix CVE-2022-3560
* Mon Dec 19 2022 Chenxi Mao <chenxi.mao@suse.com> - 115-3
- Free resources if certification cannot be found.
2022-11-11 12:57:18 +08:00
* Sat Nov 12 2022 luhuaxin <luhuaxin1@huawei.com> - 115-2
- fix certificate chain bug
2022-11-08 10:47:19 +08:00
* Mon Nov 7 2022 jinlun <jinlun@huawei.com> - 115-1
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:update to 115
2022-10-26 20:31:05 +08:00
* Mon Oct 31 2022 luhuaxin <luhuaxin1@huawei.com> - 0.113-7
- fix the algorithm flag for sm2,sm3
* Mon Oct 10 2022 godcansee <liu332084460@foxmail.com> - 0.113-6
- add feature to support for sm2,sm3
2022-11-08 10:47:19 +08:00
* Sat Jul 31 2021 Shenmei Tu <tushenmei@huawei.com> - 0.113-5
2021-07-31 17:22:52 +08:00
- remove-superfluous-type-settings.patch
2021-05-31 16:57:49 +08:00
* Mon May 31 2021 huanghaitao <huanghaitao8@huawei.com> - 0.113-4
- Completing build dependencies
2020-09-14 14:04:33 +08:00
* Thu Sep 10 2020 baizhonggui <baizhonggui@huawei.com> - 0.113-3
- Modify source0 and replace package
2020-08-05 17:46:44 +08:00
* Wed Aug 05 2020 lingsheng <lingsheng@huawei.com> - 0.113-2
- Fix the build with nss 3.44
2020-01-14 00:11:55 +08:00
* Mon Jan 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.113-1
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:update to 0.113
2019-12-03 11:21:29 +08:00
* Tue Dec 3 2019 gulining<gulining1@huawei.com> - 0.112-28
- rewrite spec
* Mon Dec 2 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.112.27
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:roll back to the 0.112-24
2019-12-03 11:38:58 +08:00
* Sat Nov 30 2019 gulining<gulining1@huawei.com> - 0.112-26
2019-12-03 11:21:29 +08:00
- Pakcage init