diff --git a/proftpd.changes b/proftpd.changes index 34c7d08..63007a0 100644 --- a/proftpd.changes +++ b/proftpd.changes @@ -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 diff --git a/proftpd.service b/proftpd.service new file mode 100644 index 0000000..7412fa7 --- /dev/null +++ b/proftpd.service @@ -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 diff --git a/proftpd.spec b/proftpd.spec index aeb0002..f61af66 100644 --- a/proftpd.spec +++ b/proftpd.spec @@ -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 Source11: %{name}.init Source12: %{name}.passwd +Source13: %{name}.service #PATCH-FIX-openSUSE: pam, logrotate, xinet Patch100: %{name}-1.3.4a-dist.patch #PATCH-FIX-openSUSE: provide a useful default config @@ -60,6 +61,12 @@ Requires: logrotate Recommends: %{name}-lang %endif +%if 0%{?suse_version} >= 1210 +BuildRequires: systemd +%{?systemd_requires} +%define has_systemd 1 +%endif + %description ProFTPD is a highly configurable FTP daemon for Unix and Unix-like operating systems. See the README.ports file for more details about @@ -134,9 +141,9 @@ Here are Documentation for ProFTPD %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|:$||')" -export CFLAGS="$RPM_OPT_FLAGS -DLDAP_DEPRECATED" +export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -DLDAP_DEPRECATED" export CXXFLAGS="$CFLAGS" -%configure \ +%configure --disable-static --with-pic \ --bindir=%{_sbindir} \ --libexecdir=%{_libdir}/%{name} \ --sysconfdir=%{_sysconfdir}/%{name} \ @@ -150,7 +157,9 @@ export CXXFLAGS="$CFLAGS" --enable-openssl \ --with-lastlog \ --with-includes="%{_includedir}/mysql:%{_includedir}/pgsql" \ - --with-shared="${PROFTPD_SHARED_MODS}" + --with-shared="${PROFTPD_SHARED_MODS}" \ + --disable-ident \ + --disable-strip # --enable-memcache \ %{__make} %{?_smp_mflags} @@ -173,17 +182,28 @@ export CXXFLAGS="$CFLAGS" %{__install} -m 0644 %{S:12} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/auth/passwd %{__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} %pre # on `rpm -ivh` PARAM is 1 # on `rpm -Uvh` PARAM is 2 #if [ "$1" = "1" ]; then +%if 0%{?has_systemd} +%service_add_pre %{name}.service +%endif %preun # on `rpm -e` PARAM is 0 %stop_on_removal proftpd +%if 0%{?has_systemd} +%service_del_preun %{name}.service +%endif + %post # on `rpm -ivh` PARAM is 1 # on `rpm -Uvh` PARAM is 2 @@ -193,6 +213,10 @@ export CXXFLAGS="$CFLAGS" #fi %{fillup_and_insserv -f proftpd} +%if 0%{?has_systemd} +%service_add_post %{name}.service +%endif + %postun # on `rpm -e` PARAM is 0 if [ "$1" = "0" ]; then @@ -200,6 +224,10 @@ if [ "$1" = "0" ]; then fi %restart_on_update proftpd +%if 0%{?has_systemd} +%service_del_postun %{name}.service +%endif + %clean %{__rm} -rf %{buildroot} @@ -247,6 +275,9 @@ fi %exclude %{_libdir}/%{name}/mod_sql_postgres.so %exclude %{_libdir}/%{name}/mod_radius.so %exclude %{_libdir}/%{name}/mod_sql_sqlite.so +%if 0%{?has_systemd} +%{_unitdir}/%{name}.service +%endif %files devel %defattr(-,root,root,-)