Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
a198e1c170
!39 【轻量级 PR】:add code check in tpm2-abrmd
From: @jinlun123123 
Reviewed-by: @huangzq6 
Signed-off-by: @huangzq6
2023-01-13 03:35:30 +00:00
jinlun
9b5f6cc2fb
add code check in tpm2-abrmd
https://gitee.com/src-openeuler/tpm2-abrmd/issues/I6A5SR

Signed-off-by: jinlun <jinlun@huawei.com>
2023-01-12 08:02:53 +00:00
openeuler-ci-bot
4e230bbb91
!31 update version to 2.4.1
From: @jinlun123123 
Reviewed-by: @huangzq6 
Signed-off-by: @huangzq6
2022-11-04 09:17:58 +00:00
jinlun
208a5f6950 update version to 2.4.1 2022-11-03 20:24:07 +08:00
openeuler-ci-bot
7deaad242c
!25 fix the problem that pointers access invalid addresses
From: @gys66 
Reviewed-by: @huangzq6 
Signed-off-by: @huangzq6
2022-10-25 09:30:05 +00:00
gaoyusong
5608dae7c6 fix problem that pointers access invalid address
Signed-off-by: gaoyusong <gaoyusong2@huawei.com>
2022-10-25 11:03:09 +08:00
openeuler-ci-bot
c9e39c62c9 !18 update to 2.4.0
Merge pull request !18 from panxh_purple/openEuler-22.03-LTS-Next
2021-12-15 08:22:24 +00:00
panxiaohe
0492021e2f update to 2.4.0 2021-12-14 19:37:41 +08:00
openeuler-ci-bot
079c068cb2 !14 master: fix the SELinux label missing issue
From: @hugel
Reviewed-by: @zhujianwei001
Signed-off-by: @zhujianwei001
2021-05-25 18:39:25 +08:00
Hugel
c4ed0d9b3a fix the SELinux label missing issue 2021-05-25 17:34:32 +08:00
3 changed files with 48 additions and 19 deletions

Binary file not shown.

BIN
tpm2-abrmd-2.4.1.tar.gz Normal file

Binary file not shown.

View File

@ -1,20 +1,20 @@
%global selinuxtype targeted
Name: tpm2-abrmd
Version: 2.3.3
Release: 1
Version: 2.4.1
Release: 2
Summary: A system daemon implementing the TPM2 access broker (TAB) & Resource Manager (RM) spec from the TCG
License: BSD
URL: https://github.com/tpm2-software/tpm2-abrmd
Source0: https://github.com/tpm2-software/tpm2-abrmd/releases/download/%{version}/%{name}-%{version}.tar.gz
BuildRequires: systemd pkgconfig(cmocka) pkgconfig(dbus-1) pkgconfig(gio-unix-2.0) pkgconfig(tss2-mu) pkgconfig(tss2-sys)
BuildRequires: tpm2-tss-devel libtool autoconf-archive libgcrypt libgcrypt-devel
BuildRequires: tpm2-tss-devel >= 2.4.0 libtool autoconf-archive libgcrypt libgcrypt-devel
BuildRequires: chrpath
BuildRequires: selinux-policy-devel pkgconfig(systemd)
# tpm2-abrmd depends on the package that contains itsSELinux policy module
Requires: (%{name}-selinux >= 2.0.0-1 if selinux-policy-%{selinuxtype})
Requires: (%{name}-selinux >= 2.3.3-2 if selinux-policy)
%description
This is a system daemon implementing the TPM2 access broker (TAB) & Resource Manager (RM) spec from the TCG.
@ -23,7 +23,7 @@ The daemon (tpm2-abrmd) is implemented using Glib and the GObject system.
%package devel
Summary: Files necessary to develop applications with tpm2-abrmd
Requires: %{name}%{_isa} = %{version}-%{release}
Requires: tpm2-tss-devel
Requires: tpm2-tss-devel >= 2.4.0
%description devel
@ -35,7 +35,7 @@ This package contains development library files, headers and config files of tpm
BuildArch: noarch
Summary: SELinux policies for tpm2-abrmd
Requires: selinux-policy >= 0.0.1
Requires(post): selinux-policy-base >= 0.0.1
Requires(post): selinux-policy-%{selinuxtype}
Requires(post): libselinux-utils
Requires(post): policycoreutils
Requires(post): policycoreutils-python-utils
@ -45,13 +45,16 @@ This package contains SELinux policies for tpm2-abrmd
%prep
%autosetup -p1 -n %{name}-%{version}
autoreconf --install
%build
export GDBUS_CODEGEN="/usr/bin/gdbus-codegen"
%configure --disable-static --disable-silent-rules \
--with-systemdsystemunitdir=%{_unitdir} \
--with-systemdpresetdir=%{_presetdir} \
--with-sepolicy
--with-sepolicy \
--with-dbuspolicydir=%{_datadir}/dbus-1/system.d/ \
--enable-unit
%make_build
%install
@ -72,35 +75,31 @@ mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
echo "/usr/lib64/" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%check
make test
make check
%pre
%pre selinux
%selinux_relabel_pre -s targeted
#add a user to sandbox the tpm2-abrmd daemon
getent group tss >/dev/null || groupadd -g 59 -r tss
getent passwd tss >/dev/null || \
useradd -r -u 59 -g tss -d /dev/null -s /sbin/nologin \
-c "Account used by the tpm2-abrmd package to sandbox the tpm2-abrmd daemon" tss
exit 0
%preun
%systemd_preun tpm2-abrmd.service
%post
/sbin/ldconfig
%systemd_post tpm2-abrmd.service
%post selinux
%selinux_modules_install -s targeted %{_datadir}/selinux/packages/tabrmd.pp.bz2
%postun
/sbin/ldconfig
%systemd_postun tpm2-abrmd.service
%postun selinux
if [ $1 -eq 0 ]; then
%selinux_modules_uninstall -s targeted tabrmd
fi
%posttrans
%posttrans selinux
%selinux_relabel_post -s targeted
%files
@ -112,7 +111,7 @@ fi
%{_unitdir}/tpm2-abrmd.service
%{_presetdir}/tpm2-abrmd.preset
%{_datadir}/dbus-1/system-services/com.intel.tss2.Tabrmd.service
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/tpm2-abrmd.conf
%{_datadir}/dbus-1/system.d/tpm2-abrmd.conf
%config(noreplace) /etc/ld.so.conf.d/*
%files devel
@ -133,6 +132,36 @@ fi
%{_datadir}/selinux/packages/tabrmd.pp.bz2
%changelog
* Tue Jan 10 2023 jinlun <jinlun@huawei.com> - 2.4.1-2
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: add code check in tpm2-abrmd
* Thu Nov 3 2022 jinlun<jinlun@huawei.com> - 2.4.1-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: update to 2.4.1
* Tue Oct 25 2022 gaoyusong<gaoyusong2@huawei.com> - 2.4.0-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix problem that pointers access invalid address
* Tue Dec 14 2021 panxiaohe<panxiaohe@huawei.com> - 2.4.0-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: update to 2.4.0
* Tue May 25 2021 Hugel<gengqihu1@huawei.com> - 2.3.3-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: fix the SELinux label missing issue
* Mon Aug 31 2020 Hugel<gengqihu1@huawei.com> - 2.3.3-1
- Type:enhancement
- ID:NA