Accepting request 294718 from security

- Cleanup spec file with spec-cleaner
- Remove tpm-tools-rpmlintrc
- Use automake and autoconf as recomended by upstream
- Split library, devel adn pkcs11 package (forwarded request 294158 from pluskalm)

OBS-URL: https://build.opensuse.org/request/show/294718
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tpm-tools?expand=0&rev=28
This commit is contained in:
Dominique Leuenberger 2015-04-10 07:51:01 +00:00 committed by Git OBS Bridge
commit ed95d15d94
3 changed files with 93 additions and 32 deletions

View File

@ -1,4 +0,0 @@
# we only use the shared library in this tool itself
# no need for 2 more RPMs really.
addFilter("devel-file-in-non-devel-package")
addFilter("shlib-policy-name-error")

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Apr 2 12:31:34 UTC 2015 - mpluskal@suse.com
- Cleanup spec file with spec-cleaner
- Remove tpm-tools-rpmlintrc
- Use automake and autoconf as recomended by upstream
- Split library, devel adn pkcs11 package
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 2 21:52:42 UTC 2014 - crrodriguez@opensuse.org Thu Oct 2 21:52:42 UTC 2014 - crrodriguez@opensuse.org

View File

@ -1,7 +1,7 @@
# #
# spec file for package tpm-tools # spec file for package tpm-tools
# #
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,21 +16,22 @@
# #
BuildRequires: openCryptoki-devel %define lib_name libtpm_unseal1
BuildRequires: openssl-devel
BuildRequires: trousers-devel
Name: tpm-tools Name: tpm-tools
Url: http://trousers.sourceforge.net/
Version: 1.3.8 Version: 1.3.8
Release: 0 Release: 0
Summary: Trusted Platform Module (TPM) administration tools Summary: Trusted Platform Module (TPM) administration tools
License: IPL-1.0 License: IPL-1.0
Group: Productivity/Security Group: Productivity/Security
Source0: http://downloads.sourceforge.net/project/trousers/tpm-tools/1.3.7/tpm-tools-%version.tar.gz Url: http://trousers.sourceforge.net/
Source1: %name-rpmlintrc Source0: http://downloads.sourceforge.net/project/trousers/tpm-tools/1.3.7/tpm-tools-%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: openCryptoki-devel
BuildRequires: openssl-devel
BuildRequires: trousers-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %install_info_prereq
%description %description
Trusted Computing is a set of specifications published by the Trusted Trusted Computing is a set of specifications published by the Trusted
@ -40,45 +41,101 @@ provides tools for enablement and configuration of the TPM and
associated interfaces. Also look inside the trousers package for more associated interfaces. Also look inside the trousers package for more
software for TC. software for TC.
%package pkcs11
Summary: Management tools using PKCS#11 for the TPM hardware
Group: Applications/System
%description pkcs11
Trusted Computing is a set of specifications published by the Trusted
Computing Group (TCG). The Trusted Platform Module (TPM) is the
hardware component for Trusted Computing. The tpm-tools package
provides tools for enablement and configuration of the TPM and
associated interfaces. Also look inside the trousers package for more
software for TC.
Authors: This package contains group of tools that use the TPM PKCS#11 token. All data
-------- contained in the PKCS#11 data store is protected by the TPM (keys,
IBM Corp. certificates, etc.). You can import keys and certificates, list out the
objects in the data store, and protect data.
%package -n %{lib_name}
Summary: Management tools for the TPM hardware (library)
Group: System/Libraries
%description -n %{lib_name}
Trusted Computing is a set of specifications published by the Trusted
Computing Group (TCG). The Trusted Platform Module (TPM) is the
hardware component for Trusted Computing. The tpm-tools package
provides tools for enablement and configuration of the TPM and
associated interfaces. Also look inside the trousers package for more
software for TC.
This package contains shared libraries
%package devel
Summary: Files to use the library routines supplied with tpm-tools
Group: Development/Libraries
Requires: %{lib_name} = %{version}
%description devel
Trusted Computing is a set of specifications published by the Trusted
Computing Group (TCG). The Trusted Platform Module (TPM) is the
hardware component for Trusted Computing. The tpm-tools package
provides tools for enablement and configuration of the TPM and
associated interfaces. Also look inside the trousers package for more
software for TC.
This package contains the libraries and headers necessary for developing
tpm-tools applications.
%prep %prep
%setup -q %setup -q
autoreconf -fi
%build %build
# Disable unused-but-set warnings with gcc >= 4.6 # Disable unused-but-set warnings with gcc >= 4.6
%if 0%{?suse_version} >= 1200 %if 0%{?suse_version} >= 1200
export CFLAGS="%{optflags} -Wno-unused-but-set-variable" export CFLAGS="%{optflags} -Wno-unused-but-set-variable"
%endif %endif
%configure --disable-static %configure \
make --disable-static
make %{?_smp_mflags}
%check %check
make check make %{?_smp_mflags} check
%post -p /sbin/ldconfig %post -n %{lib_name} -p /sbin/ldconfig
%postun -p /sbin/ldconfig %postun -n %{lib_name} -p /sbin/ldconfig
%install %install
rm -rf $RPM_BUILD_ROOT make DESTDIR=%{buildroot} install %{?_smp_mflags}
mkdir $RPM_BUILD_ROOT find %{buildroot} -type f -name "*.la" -delete -print
make DESTDIR=$RPM_BUILD_ROOT install cp include/*.h %{buildroot}%{_includedir}/tpm_tools
rm $RPM_BUILD_ROOT/usr/%_lib/*.la
cp include/*.h $RPM_BUILD_ROOT/usr/include/tpm_tools
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc README LICENSE %doc README LICENSE
%{_mandir}/man*/* %{_mandir}/man1/tpm_*
/usr/sbin/* %{_mandir}/man8/tpm_*
/usr/bin/* %{_sbindir}/tpm_*
/usr/%{_lib}/*.so %{_bindir}/tpm_*
/usr/%{_lib}/*.so.*
/usr/include/tpm_tools %files -n %{lib_name}
%defattr(-,root,root,-)
%doc LICENSE
%{_libdir}/*.so.*
%files pkcs11
%defattr(-,root,root,-)
%doc LICENSE
%{_bindir}/tpmtoken_*
%{_mandir}/man1/tpmtoken_*
%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_includedir}/tpm_tools
%{_mandir}/man3/tpmUnseal*
%changelog %changelog