# # spec file for package pam_mount (Version 2.8) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: pam_mount BuildRequires: perl-XML-Parser perl-XML-Writer BuildRequires: libtool pam-devel >= 0.99 pkg-config >= 0.19 BuildRequires: libxml2-devel >= 2.6 openssl-devel >= 0.9.7 BuildRequires: libHX-devel >= 3.6 BuildRequires: libcryptsetup-devel >= 1.1.2 Requires: device-mapper >= 1.02.48 BuildRequires: linux-kernel-headers >= 2.6 Summary: A PAM Module that can Mount Volumes for a User Session Version: 2.8 Release: 1 # for fd0ssh and ofl: Recommends: hxtools >= 20090116 Recommends: cifs-mount # for mount: Requires: util-linux License: LGPLv2.1+ Prefix: /usr Group: System/Libraries Source: %{name}-%{version}.tar.xz BuildRequires: xz Source1: convert_pam_mount_conf.pl Source2: convert_keyhash.pl Source3: mount.crypt Source4: mount.encfs13 Source5: baselibs.conf Patch1: pam_mount-0.47-enable-logout-kill.dif Patch2: 29d23c4-fix-log-message.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: http://pam-mount.sf.net/ Requires(post): coreutils, perl-XML-Writer, perl-XML-Parser %description This module is aimed at environments with central file servers that a user wishes to mount on login and unmount on logout, such as (semi-)diskless stations where many users can logon. The module also supports mounting local filesystems of any kind the normal mount utility supports, with extra code to make sure certain volumes are set up properly because often they need more than just a mount call, such as encrypted volumes. This includes SMB/CIFS, FUSE, dm-crypt and LUKS. %prep %setup -q %patch1 -p1 %patch2 -p1 %build %configure --with-slibdir=/%{_lib} %{?_with_selinux:--with-selinux} %{__make} %{?_smp_mflags} %install make install DESTDIR=${RPM_BUILD_ROOT} # Remove static and libtool version rm -f ${RPM_BUILD_ROOT}/%{_lib}/security/pam_mount.{a,la} #install the docs mkdir -p ${RPM_BUILD_ROOT}/%_docdir/%{name}/examples cp doc/bugs.txt doc/changelog.txt LICENSE* doc/faq.txt doc/todo.txt doc/options.txt doc/pam_mount.txt ${RPM_BUILD_ROOT}/%_docdir/%name/ install -m 755 %{SOURCE1} ${RPM_BUILD_ROOT}/%_docdir/%{name}/examples/ install -m 755 %{SOURCE2} ${RPM_BUILD_ROOT}/%_docdir/%{name}/examples/ # # move /sbin/mount.crypt to /usr/sbin/mount.crypt and put a wrapper script to /sbin/mount.crypt # The same for mount.encfs13 # mkdir -p ${RPM_BUILD_ROOT}/usr/sbin/ mv ${RPM_BUILD_ROOT}/sbin/mount.crypt ${RPM_BUILD_ROOT}/usr/sbin/ mv ${RPM_BUILD_ROOT}/sbin/mount.encfs13 ${RPM_BUILD_ROOT}/usr/sbin/ ln -s /usr/sbin/mount.crypt ${RPM_BUILD_ROOT}/usr/sbin/umount.crypt ln -s /usr/sbin/mount.encfs13 ${RPM_BUILD_ROOT}/usr/sbin/umount.encfs13 install -m755 %{SOURCE3} ${RPM_BUILD_ROOT}/sbin/ install -m755 %{SOURCE4} ${RPM_BUILD_ROOT}/sbin/ %post if [ -e etc/security/pam_mount.conf ] then cp etc/security/pam_mount.conf.xml %_docdir/%{name}/examples/ %_docdir/%{name}/examples/convert_pam_mount_conf.pl \ -i etc/security/pam_mount.conf -o etc/security/pam_mount.conf.xml fi if [ $1 -gt 1 ] then for v in `rpm -q --queryformat "%{VERSION} " %{name}`; do if echo "$v" | grep -E "^0\." - ; then %_docdir/%{name}/examples/convert_keyhash.pl \ -i etc/security/pam_mount.conf.xml break; fi done fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root) %docdir %_docdir/%name %_docdir/%name /%{_lib}/security/pam_mount*.so %{_bindir}/pmt-fd0ssh %{_bindir}/pmt-ofl /sbin/mount.crypt* /sbin/umount.crypt* /sbin/mount.encfs13 %{_sbindir}/mount.crypt %{_sbindir}/umount.crypt %{_sbindir}/mount.encfs13 %{_sbindir}/umount.encfs13 %{_sbindir}/pmvarrun %{_sbindir}/pmt-ehd %config(noreplace) %{_sysconfdir}/security/pam_mount.conf.xml %doc %{_mandir}/man1/pmt-fd0ssh.1.gz %doc %{_mandir}/man5/pam_mount.conf.5.gz %doc %{_mandir}/man8/*.8.gz %if 0%{?_with_selinux:1} %policy %_sysconfdir/selinux/strict/src/policy/macros/%{name}_macros.te %policy %_sysconfdir/selinux/strict/src/policy/file_contexts/misc/%name.fc %endif %changelog