SHA256
1
0
forked from pool/proftpd

Accepting request 132211 from network

- Disable ident lookups, this protocol is totally obsolete
 and dangerous. (add --disable-ident)
- Fix debug info generation ( add --disable-strip) 

- Add systemd unit (forwarded request 132101 from elvigia)

OBS-URL: https://build.opensuse.org/request/show/132211
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/proftpd?expand=0&rev=10
This commit is contained in:
Ismail Dönmez 2012-09-01 19:58:19 +00:00 committed by Git OBS Bridge
commit e1c64de732
3 changed files with 56 additions and 3 deletions

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu Aug 30 17:33:30 UTC 2012 - crrodriguez@opensuse.org
- Disable ident lookups, this protocol is totally obsolete
and dangerous. (add --disable-ident)
- Fix debug info generation ( add --disable-strip)
-------------------------------------------------------------------
Wed Aug 29 21:51:49 UTC 2012 - crrodriguez@opensuse.org
- Add systemd unit
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Aug 14 11:11:28 UTC 2012 - chris@computersalat.de Tue Aug 14 11:11:28 UTC 2012 - chris@computersalat.de

10
proftpd.service Normal file
View File

@ -0,0 +1,10 @@
[Unit]
Description=ProFTPd FTP server
After=network.target remote-fs.target
[Service]
ExecStart=/usr/sbin/proftpd --nodaemon
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target

View File

@ -29,6 +29,7 @@ Source0: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.gz
Source1: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.gz.asc Source1: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.gz.asc
Source11: %{name}.init Source11: %{name}.init
Source12: %{name}.passwd Source12: %{name}.passwd
Source13: %{name}.service
#PATCH-FIX-openSUSE: pam, logrotate, xinet #PATCH-FIX-openSUSE: pam, logrotate, xinet
Patch100: %{name}-1.3.4a-dist.patch Patch100: %{name}-1.3.4a-dist.patch
#PATCH-FIX-openSUSE: provide a useful default config #PATCH-FIX-openSUSE: provide a useful default config
@ -60,6 +61,12 @@ Requires: logrotate
Recommends: %{name}-lang Recommends: %{name}-lang
%endif %endif
%if 0%{?suse_version} >= 1210
BuildRequires: systemd
%{?systemd_requires}
%define has_systemd 1
%endif
%description %description
ProFTPD is a highly configurable FTP daemon for Unix and Unix-like ProFTPD is a highly configurable FTP daemon for Unix and Unix-like
operating systems. See the README.ports file for more details about operating systems. See the README.ports file for more details about
@ -134,9 +141,9 @@ Here are Documentation for ProFTPD
%build %build
PROFTPD_SHARED_MODS="$(for spec_mod in $(find contrib -name mod_\*.c); do echo "$(basename ${spec_mod%%.c})"; done | tr '\n' ':' | sed -e 's|:$||')" PROFTPD_SHARED_MODS="$(for spec_mod in $(find contrib -name mod_\*.c); do echo "$(basename ${spec_mod%%.c})"; done | tr '\n' ':' | sed -e 's|:$||')"
export CFLAGS="$RPM_OPT_FLAGS -DLDAP_DEPRECATED" export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -DLDAP_DEPRECATED"
export CXXFLAGS="$CFLAGS" export CXXFLAGS="$CFLAGS"
%configure \ %configure --disable-static --with-pic \
--bindir=%{_sbindir} \ --bindir=%{_sbindir} \
--libexecdir=%{_libdir}/%{name} \ --libexecdir=%{_libdir}/%{name} \
--sysconfdir=%{_sysconfdir}/%{name} \ --sysconfdir=%{_sysconfdir}/%{name} \
@ -150,7 +157,9 @@ export CXXFLAGS="$CFLAGS"
--enable-openssl \ --enable-openssl \
--with-lastlog \ --with-lastlog \
--with-includes="%{_includedir}/mysql:%{_includedir}/pgsql" \ --with-includes="%{_includedir}/mysql:%{_includedir}/pgsql" \
--with-shared="${PROFTPD_SHARED_MODS}" --with-shared="${PROFTPD_SHARED_MODS}" \
--disable-ident \
--disable-strip
# --enable-memcache \ # --enable-memcache \
%{__make} %{?_smp_mflags} %{__make} %{?_smp_mflags}
@ -173,17 +182,28 @@ export CXXFLAGS="$CFLAGS"
%{__install} -m 0644 %{S:12} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/auth/passwd %{__install} -m 0644 %{S:12} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/auth/passwd
%{__install} -d -m 0750 $RPM_BUILD_ROOT/var/log/%{name} %{__install} -d -m 0750 $RPM_BUILD_ROOT/var/log/%{name}
%if 0%{?has_systemd}
%{__install} -D -m 0644 %{S:13} %{buildroot}%{_unitdir}/%{name}.service
%endif
%find_lang %{name} %find_lang %{name}
%pre %pre
# on `rpm -ivh` PARAM is 1 # on `rpm -ivh` PARAM is 1
# on `rpm -Uvh` PARAM is 2 # on `rpm -Uvh` PARAM is 2
#if [ "$1" = "1" ]; then #if [ "$1" = "1" ]; then
%if 0%{?has_systemd}
%service_add_pre %{name}.service
%endif
%preun %preun
# on `rpm -e` PARAM is 0 # on `rpm -e` PARAM is 0
%stop_on_removal proftpd %stop_on_removal proftpd
%if 0%{?has_systemd}
%service_del_preun %{name}.service
%endif
%post %post
# on `rpm -ivh` PARAM is 1 # on `rpm -ivh` PARAM is 1
# on `rpm -Uvh` PARAM is 2 # on `rpm -Uvh` PARAM is 2
@ -193,6 +213,10 @@ export CXXFLAGS="$CFLAGS"
#fi #fi
%{fillup_and_insserv -f proftpd} %{fillup_and_insserv -f proftpd}
%if 0%{?has_systemd}
%service_add_post %{name}.service
%endif
%postun %postun
# on `rpm -e` PARAM is 0 # on `rpm -e` PARAM is 0
if [ "$1" = "0" ]; then if [ "$1" = "0" ]; then
@ -200,6 +224,10 @@ if [ "$1" = "0" ]; then
fi fi
%restart_on_update proftpd %restart_on_update proftpd
%if 0%{?has_systemd}
%service_del_postun %{name}.service
%endif
%clean %clean
%{__rm} -rf %{buildroot} %{__rm} -rf %{buildroot}
@ -247,6 +275,9 @@ fi
%exclude %{_libdir}/%{name}/mod_sql_postgres.so %exclude %{_libdir}/%{name}/mod_sql_postgres.so
%exclude %{_libdir}/%{name}/mod_radius.so %exclude %{_libdir}/%{name}/mod_radius.so
%exclude %{_libdir}/%{name}/mod_sql_sqlite.so %exclude %{_libdir}/%{name}/mod_sql_sqlite.so
%if 0%{?has_systemd}
%{_unitdir}/%{name}.service
%endif
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)