From bf87538b50f4391682031d547f34ed0c06093a38 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Apr 06 2011 15:08:14 +0000 Subject: Remove macros for system commands --- diff --git a/proftpd.spec b/proftpd.spec index 6a183c7..5a17157 100644 --- a/proftpd.spec +++ b/proftpd.spec @@ -125,18 +125,18 @@ Module to add PostgreSQL support to the ProFTPD FTP server. %setup -q -n %{name}-%{version}%{?prever} -a 10 -a 11 -a 13 # Copy mod_vroot source, documentation and tests into place -%{__cp} -p mod_vroot/mod_vroot.c contrib/ -%{__cp} -p mod_vroot/mod_vroot.html doc/contrib/ -%{__cp} -p mod_vroot/t/lib/ProFTPD/Tests/Modules/mod_vroot.pm \ +cp -p mod_vroot/mod_vroot.c contrib/ +cp -p mod_vroot/mod_vroot.html doc/contrib/ +cp -p mod_vroot/t/lib/ProFTPD/Tests/Modules/mod_vroot.pm \ tests/t/lib/ProFTPD/Tests/Modules/ -%{__cp} -p mod_vroot/t/modules/mod_vroot.t tests/t/modules/ +cp -p mod_vroot/t/modules/mod_vroot.t tests/t/modules/ # Patch mod_geoip for internal regex API change %patch3 -p1 -b .regex # 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 @@ -148,10 +148,10 @@ Module to add PostgreSQL support to the ProFTPD FTP server. %patch4 -p1 -b .test_vroot # 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 # If we don't have libmemcached support, remove the mod_tls_memcache @@ -161,18 +161,18 @@ Module to add PostgreSQL support to the ProFTPD FTP server. %endif # 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 @@ -182,18 +182,18 @@ 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 # Remove bogus exec permissions from source files -%{__chmod} -c -x include/tpl.h lib/tpl.c +chmod -c -x include/tpl.h lib/tpl.c %build @@ -223,29 +223,29 @@ SMOD6=mod_sftp:mod_sftp_pam:mod_sftp_sql:mod_tls_shmcache%{?have_libmemcached::m --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 @@ -258,10 +258,10 @@ SMOD6=mod_sftp:mod_sftp_pam:mod_sftp_sql:mod_tls_shmcache%{?have_libmemcached::m export PERL5LIB=$(pwd)/Test-Unit-0.14/lib export PROFTPD_TEST_DIR=$(pwd)/tests ln ftpdctl ftpwho tests/ -%{__make} check +make check %else # API tests should always be OK -if ! %{__make} -C tests api-tests; then +if ! make -C tests api-tests; then # Diagnostics to report upstream cat tests/api-tests.log ./proftpd -V @@ -271,12 +271,12 @@ fi %endif %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 @@ -289,8 +289,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 @@ -333,8 +333,8 @@ fi %{_sbindir}/ftpshut %{_sbindir}/in.proftpd %{_sbindir}/proftpd -%{_mandir}/man1/ftpcount.1* %{_mandir}/man1/ftpasswd.1* +%{_mandir}/man1/ftpcount.1* %{_mandir}/man1/ftpmail.1* %{_mandir}/man1/ftpquota.1* %{_mandir}/man1/ftptop.1* @@ -430,6 +430,7 @@ fi (http://bugs.proftpd.org/3595, CVE-2010-4051, CVE-2010-4052, #673040) - We need libmemcached 0.41 or later for memcached support - We need pcre 7.0 or later for pcre regexp support +- Nobody else likes macros for commands * Tue Mar 22 2011 Paul Howarth 1.3.4-0.4.rc1 - Rebuilt for new MySQL client library in Rawhide