diff --git a/proftpd.spec b/proftpd.spec index 74491c9..3c6e24c 100644 --- a/proftpd.spec +++ b/proftpd.spec @@ -81,36 +81,36 @@ Module to add PostgreSQL support to the ProFTPD FTP server. %setup -q -n %{name}-%{version}%{?prever} -a 10 -a 11 # Copy mod_vroot source and documentation into place -%{__cp} -p mod_vroot/mod_vroot.c contrib/ -%{__cp} -p mod_vroot/mod_vroot.html doc/contrib/ +cp -p mod_vroot/mod_vroot.c contrib/ +cp -p mod_vroot/mod_vroot.html doc/contrib/ # Copy mod_geoip source and documentation into place -%{__cp} -p mod_geoip/mod_geoip.c contrib/ -%{__cp} -p mod_geoip/mod_geoip.html doc/contrib/ +cp -p mod_geoip/mod_geoip.c contrib/ +cp -p mod_geoip/mod_geoip.html doc/contrib/ # Don't strip binaries - needed for useful debuginfo %patch0 -p1 -b .nostrip # Avoid documentation name conflicts -%{__mv} contrib/README contrib/README.contrib +mv contrib/README contrib/README.contrib # Set up directory names in config file -%{__sed} -e 's#@PKIDIR@#%{pkidir}#g' \ +sed -e 's#@PKIDIR@#%{pkidir}#g' \ %{SOURCE1} > proftpd.conf # Avoid docfile dependencies -%{__chmod} -x contrib/xferstats.holger-preiss +chmod -x contrib/xferstats.holger-preiss # Copy in LDAP schema/LDIF -%{__cp} -p %{SOURCE7} 70proftpd-quota.ldif -%{__cp} -p %{SOURCE8} proftpd-quota.schema +cp -p %{SOURCE7} 70proftpd-quota.ldif +cp -p %{SOURCE8} proftpd-quota.schema # PAM Configuration: # Default PAM configuration file uses password-auth common config; # revert to system-auth if password-auth is not available -%{__cp} -p %{SOURCE6} . +cp -p %{SOURCE6} . if [ ! -f /etc/pam.d/password-auth ]; then - %{__sed} -i -e s/password-auth/system-auth/ proftpd.pam + sed -i -e s/password-auth/system-auth/ proftpd.pam fi # The "include" syntax used in our PAM configuration file was introduced in # PAM 0.78 and is therefore supported in FC-5 and EL-5 onwards; older @@ -120,14 +120,14 @@ fi # instead check for the absence of the file /etc/pam.d/config-util, which is # present in all PAM packages from 0.80 onwards and acts as a useful # indicator of the need to fall back to pam_stack. -[ ! -f /etc/pam.d/config-util ] && %{__sed} -i -e \ +[ ! -f /etc/pam.d/config-util ] && sed -i -e \ 's/include[[:space:]]*system-auth/required'\ \ \ \ \ 'pam_stack.so service=system-auth/' \ proftpd.pam # Fix character encoding in docs for f in ChangeLog; do - /usr/bin/iconv -f iso-8859-1 -t utf-8 < ${f} > ${f}.utf-8 - %{__mv} -f ${f}.utf-8 ${f} + iconv -f iso-8859-1 -t utf-8 < ${f} > ${f}.utf-8 + mv -f ${f}.utf-8 ${f} done %build @@ -155,41 +155,41 @@ SMOD6=mod_sftp:mod_sftp_pam:mod_sftp_sql:mod_tls_shmcache --with-modules=mod_readme:mod_auth_pam:mod_tls:mod_vroot \ --with-shared=${SMOD1}:${SMOD2}:${SMOD3}:${SMOD4}:${SMOD5}:${SMOD6}:mod_ifsession -%{__make} %{?_smp_mflags} +make %{?_smp_mflags} %install -%{__rm} -rf %{buildroot} -%{__make} install DESTDIR=%{buildroot} \ +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} \ rundir="%{_localstatedir}/run/proftpd" \ - INSTALL_USER=`%{__id} -un` \ - INSTALL_GROUP=`%{__id} -gn` -%{__install} -D -p -m 640 proftpd.conf %{buildroot}%{_sysconfdir}/proftpd.conf -%{__install} -D -p -m 644 proftpd.pam %{buildroot}%{_sysconfdir}/pam.d/proftpd -%{__install} -D -p -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/rc.d/init.d/proftpd -%{__install} -D -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/xinetd.d/xproftpd -%{__install} -D -p -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/proftpd -%{__install} -D -p -m 644 %{SOURCE5} %{buildroot}%{_localstatedir}/ftp/welcome.msg -%{__install} -D -p -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/sysconfig/proftpd -%{__mkdir_p} %{buildroot}%{_localstatedir}/{ftp/{pub,uploads},log/proftpd} -/bin/touch %{buildroot}%{_sysconfdir}/ftpusers + INSTALL_USER=`id -un` \ + INSTALL_GROUP=`id -gn` +install -D -p -m 640 proftpd.conf %{buildroot}%{_sysconfdir}/proftpd.conf +install -D -p -m 644 proftpd.pam %{buildroot}%{_sysconfdir}/pam.d/proftpd +install -D -p -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/rc.d/init.d/proftpd +install -D -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/xinetd.d/xproftpd +install -D -p -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/proftpd +install -D -p -m 644 %{SOURCE5} %{buildroot}%{_localstatedir}/ftp/welcome.msg +install -D -p -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/sysconfig/proftpd +mkdir -p %{buildroot}%{_localstatedir}/{ftp/{pub,uploads},log/proftpd} +touch %{buildroot}%{_sysconfdir}/ftpusers # Make sure /var/run/proftpd exists at boot time for systems # with /var/run on tmpfs (#656675) %if 0%{?fedora} > 14 -%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/tmpfiles.d -%{__install} -p -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/tmpfiles.d/proftpd.conf +install -d -m 755 %{buildroot}%{_sysconfdir}/tmpfiles.d +install -p -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/tmpfiles.d/proftpd.conf %endif # Find translations %find_lang proftpd %clean -%{__rm} -rf %{buildroot} +rm -rf %{buildroot} %post if [ $1 -eq 1 ]; then /sbin/chkconfig --add proftpd - IFS=":"; %{__cat} /etc/passwd | \ + IFS=":"; cat /etc/passwd | \ while { read username nu nu gid nu nu nu nu; }; do \ if [ $gid -lt 100 -a "$username" != "ftp" ]; then echo $username >> %{_sysconfdir}/ftpusers @@ -202,8 +202,8 @@ if [ $1 -eq 0 ]; then /sbin/service proftpd stop &>/dev/null || : /sbin/chkconfig --del proftpd || : /sbin/service xinetd reload &>/dev/null || : - /usr/bin/find %{_localstatedir}/run/proftpd -depth -mindepth 1 | - /usr/bin/xargs %{__rm} -rf &>/dev/null || : + find %{_localstatedir}/run/proftpd -depth -mindepth 1 | + xargs rm -rf &>/dev/null || : fi %postun @@ -330,6 +330,7 @@ fi - Proftpd is eating CPU when reparsing configuration file on SIGHUP (bug 3610) - Incorrect generation of DSA signature for SSH sessions (bug 3634) - Fix typo in initscript +- Nobody else likes macros for commands * Mon Dec 20 2010 Paul Howarth 1.3.3d-1 - Update to 1.3.3d