From c7c88a763990ce240c0b657567931b1443851b79 Mon Sep 17 00:00:00 2001 From: Kent Yoder Date: Wed, 19 Dec 2007 16:37:25 +0000 Subject: [PATCH] Initial add of trousers-0.3.1-5.src.rpm --- .cvsignore | 1 + sources | 1 + ...sers-0.3.1-remove-group-install-code.patch | 148 ++++++++++++++++++ trousers.spec | 144 +++++++++++++++++ 4 files changed, 294 insertions(+) create mode 100644 trousers-0.3.1-remove-group-install-code.patch create mode 100644 trousers.spec diff --git a/.cvsignore b/.cvsignore index e69de29..c643b73 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +trousers-0.3.1.tar.gz diff --git a/sources b/sources index e69de29..e186953 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +9d3a07380a0c5d2f0074a9ef79ea218a trousers-0.3.1.tar.gz diff --git a/trousers-0.3.1-remove-group-install-code.patch b/trousers-0.3.1-remove-group-install-code.patch new file mode 100644 index 0000000..78d6ace --- /dev/null +++ b/trousers-0.3.1-remove-group-install-code.patch @@ -0,0 +1,148 @@ +diff -pburN trousers-0.3.1.vanilla/dist/Makefile.in trousers-0.3.1-newtest.build/dist/Makefile.in +--- trousers-0.3.1.vanilla/dist/Makefile.in 2007-11-02 16:59:43.000000000 -0500 ++++ trousers-0.3.1-newtest.build/dist/Makefile.in 2007-12-12 13:34:38.000000000 -0600 +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.9.5 from Makefile.am. ++# Makefile.in generated by automake 1.9.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -13,6 +13,7 @@ + # PARTICULAR PURPOSE. + + @SET_MAKE@ ++ + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ +@@ -47,6 +48,15 @@ mkinstalldirs = $(install_sh) -d + CONFIG_CLEAN_FILES = tcsd.conf trousers.spec + SOURCES = + DIST_SOURCES = ++am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; ++am__vpath_adj = case $$p in \ ++ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ ++ *) f=$$p;; \ ++ esac; ++am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; ++am__installdirs = "$(DESTDIR)$(sysconfdir)" ++sysconfDATA_INSTALL = $(INSTALL_DATA) ++DATA = $(sysconf_DATA) + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + ACLOCAL = @ACLOCAL@ + AMDEP_FALSE = @AMDEP_FALSE@ +@@ -106,6 +116,7 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ + PKG_CONFIG = @PKG_CONFIG@ + RANLIB = @RANLIB@ + RPC = @RPC@ ++SED = @SED@ + SET_MAKE = @SET_MAKE@ + SHELL = @SHELL@ + STRIP = @STRIP@ +@@ -213,6 +224,7 @@ ac_ct_CXX = @ac_ct_CXX@ + ac_ct_F77 = @ac_ct_F77@ + ac_ct_RANLIB = @ac_ct_RANLIB@ + ac_ct_STRIP = @ac_ct_STRIP@ ++ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ + am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ + am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ + am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +@@ -254,6 +266,7 @@ target_alias = @target_alias@ + target_cpu = @target_cpu@ + target_os = @target_os@ + target_vendor = @target_vendor@ ++sysconf_DATA = tcsd.conf + all: all-am + + .SUFFIXES: +@@ -300,6 +313,23 @@ clean-libtool: + distclean-libtool: + -rm -f libtool + uninstall-info-am: ++install-sysconfDATA: $(sysconf_DATA) ++ @$(NORMAL_INSTALL) ++ test -z "$(sysconfdir)" || $(mkdir_p) "$(DESTDIR)$(sysconfdir)" ++ @list='$(sysconf_DATA)'; for p in $$list; do \ ++ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ++ f=$(am__strip_dir) \ ++ echo " $(sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \ ++ $(sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \ ++ done ++ ++uninstall-sysconfDATA: ++ @$(NORMAL_UNINSTALL) ++ @list='$(sysconf_DATA)'; for p in $$list; do \ ++ f=$(am__strip_dir) \ ++ echo " rm -f '$(DESTDIR)$(sysconfdir)/$$f'"; \ ++ rm -f "$(DESTDIR)$(sysconfdir)/$$f"; \ ++ done + tags: TAGS + TAGS: + +@@ -336,8 +366,12 @@ distdir: $(DISTFILES) + done + check-am: all-am + check: check-am +-all-am: Makefile ++all-am: Makefile $(DATA) + installdirs: ++ for dir in "$(DESTDIR)$(sysconfdir)"; do \ ++ test -z "$$dir" || $(mkdir_p) "$$dir"; \ ++ done ++install: install-am + install-exec: install-exec-am + install-data: install-data-am + uninstall: uninstall-am +@@ -381,9 +415,7 @@ info-am: + + install-data-am: + +-install-exec-am: +- @$(NORMAL_INSTALL) +- $(MAKE) $(AM_MAKEFLAGS) install-exec-hook ++install-exec-am: install-sysconfDATA + + install-info: install-info-am + +@@ -407,37 +439,18 @@ ps: ps-am + + ps-am: + +-uninstall-am: uninstall-info-am +- @$(NORMAL_INSTALL) +- $(MAKE) $(AM_MAKEFLAGS) uninstall-hook ++uninstall-am: uninstall-info-am uninstall-sysconfDATA + + .PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ +- install-exec-hook install-info install-info-am install-man \ +- install-strip installcheck installcheck-am installdirs \ ++ install-info install-info-am install-man install-strip \ ++ install-sysconfDATA installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ +- uninstall uninstall-am uninstall-hook uninstall-info-am +- ++ uninstall uninstall-am uninstall-info-am uninstall-sysconfDATA + +-install: install-exec-hook +- if test ! -e ${DESTDIR}/@sysconfdir@/tcsd.conf; then mkdir -p ${DESTDIR}/@sysconfdir@ && cp tcsd.conf ${DESTDIR}/@sysconfdir@; fi +- /bin/chown tss:tss ${DESTDIR}/@sysconfdir@/tcsd.conf +- /bin/chmod 0600 ${DESTDIR}/@sysconfdir@/tcsd.conf +- +-install-exec-hook: +- /usr/sbin/groupadd tss || true +- /usr/sbin/useradd -r tss -g tss || true +- /bin/chown tss:tss ${DESTDIR}/@sbindir@/tcsd +- /bin/sh -c 'if [ ! -e ${DESTDIR}/@localstatedir@/lib/tpm ];then mkdir -p ${DESTDIR}/@localstatedir@/lib/tpm; fi' +- /bin/chown tss:tss ${DESTDIR}/@localstatedir@/lib/tpm +- /bin/chmod 0700 ${DESTDIR}/@localstatedir@/lib/tpm +- +-uninstall-hook: +- /usr/sbin/userdel tss +- /usr/sbin/groupdel tss + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/trousers.spec b/trousers.spec new file mode 100644 index 0000000..85e1f2c --- /dev/null +++ b/trousers.spec @@ -0,0 +1,144 @@ + +# RPM specfile for the trousers project on Fedora + +%define name trousers +%define version 0.3.1 +%define release 5 + +Name: %{name} +Summary: Implementation of the TCG's Software Stack v1.2 Specification +Version: %{version} +Release: %{release}%{?dist} +License: CPL +Group: System Environment/Libraries +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Url: http://trousers.sourceforge.net +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: libtool, gtk2-devel, openssl-devel +Requires(pre): shadow-utils +Requires(post): /sbin/ldconfig +Requires(post): /sbin/chkconfig +Requires(postun): /sbin/ldconfig +Requires(postun): /sbin/service +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +Patch0: trousers-0.3.1-remove-group-install-code.patch + +%description +TrouSerS is an implementation of the Trusted Computing Group's Software Stack +(TSS) specification. You can use TrouSerS to write applications that make use +of your TPM hardware. TPM hardware can create, store and use RSA keys +securely (without ever being exposed in memory), verify a platform's software +state using cryptographic hashes and more. + +%package static +Summary: TrouSerS TCG Device Driver Library +Group: Development/Libraries + +%description static +The TCG Device Driver Library (TDDL) used by the TrouSerS tcsd as the +interface to the TPM's device driver. For more information about writing +applications to the TDDL interface, see the latest TSS spec at +https://www.trustedcomputinggroup.org/specs/TSS. + +%package devel +Summary: TrouSerS header files and documentation +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +Header files and man pages for use in creating Trusted Computing enabled +applications. + +%prep +%setup -q +%patch0 -p1 + +%build +%configure +make %{?_smp_mflags} + +%install +mkdir -p ${RPM_BUILD_ROOT} +mkdir -p ${RPM_BUILD_ROOT}/%{_localstatedir}/lib/tpm +mkdir -p ${RPM_BUILD_ROOT}/%{_initrddir} +cp -p dist/fedora/fedora.initrd.tcsd ${RPM_BUILD_ROOT}/%{_initrddir}/tcsd +make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="install -p" +rm -f ${RPM_BUILD_ROOT}/%{_libdir}/libtspi.la + +%clean +rm -rf ${RPM_BUILD_ROOT} + +%pre +getent group tss >/dev/null || groupadd -r tss +getent passwd tss >/dev/null || \ +useradd -r -g tss -d /dev/null -s /sbin/nologin \ + -c "Account used by the trousers package to sandbox the tcsd daemon" tss +exit 0 + +%post +/sbin/ldconfig +/sbin/chkconfig --add tcsd + +%preun +if [ $1 = 0 ]; then + /sbin/service tcsd stop &> /dev/null + /sbin/chkconfig --del tcsd +fi + +%postun +/sbin/ldconfig +if [ $1 -gt 1 ]; then + /sbin/service tcsd condrestart &>/dev/null +fi + +%files +%doc README AUTHORS LICENSE ChangeLog +%defattr(-, root, root, -) +%attr(755, tss, tss) %{_sbindir}/tcsd +%{_libdir}/libtspi.so.? +%{_libdir}/libtspi.so.?.?.? +%config(noreplace) %attr(600, tss, tss) %{_sysconfdir}/tcsd.conf +%attr(644, root, root) %{_mandir}/man5/* +%attr(644, root, root) %{_mandir}/man8/* +%{_initrddir}/tcsd +%{_localstatedir}/lib/tpm/ + +%files devel +# The files to be used by developers, 'trousers-devel' +%defattr(-, root, root, -) +%attr(755, root, root) %{_libdir}/libtspi.so +%{_includedir}/tss/ +%{_includedir}/trousers/ +%{_mandir}/man3/Tspi_* + +%files static +# The only static library shipped by trousers, the TDDL +%{_libdir}/libtddl.a + +%changelog +* Mon Dec 17 2007 Kent Yoder - 0.3.1-5 +- Updated static rpm's comment line (too long) + +* Thu Dec 13 2007 Kent Yoder - 0.3.1-4 +- Updated specfile for RHBZ#323441 comment #28 + +* Wed Dec 12 2007 Kent Yoder - 0.3.1-3 +- Updated specfile for RHBZ#323441 comment #22 + +* Wed Nov 28 2007 Kent Yoder - 0.3.1-2 +- Updated to include the include dirs in the devel package; +added the no-install-hooks patch + +* Wed Nov 28 2007 Kent Yoder - 0.3.1-1 +- Updated specfile for RHBZ#323441 comment #13 + +* Mon Nov 12 2007 Kent Yoder - 0.3.1 +- Updated specfile for comments in RHBZ#323441 + +* Wed Jun 07 2006 Kent Yoder - 0.2.6-1 +- Updated build section to use smp_mflags +- Removed .la file from installed dest and files section + +* Tue Jun 06 2006 Kent Yoder - 0.2.6-1 +- Initial add of changelog tag for trousers CVS