]> TLD Linux GIT Repositories - packages/pure-ftpd.git/commitdiff
- migrated configuration to /etc/pure-ftpd
authorMarcin Krol <hawk@tld-linux.org>
Wed, 30 Jan 2019 14:32:48 +0000 (15:32 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Wed, 30 Jan 2019 14:32:48 +0000 (15:32 +0100)
pure-ftpd-config.patch
pure-ftpd.init
pure-ftpd.pamd
pure-ftpd.spec
pure-ftpd.sysconfig

index 0ad2991c84a71827f97ab5121901d78c6af9d940..275adf862897dea51a7aa07fc571a185b345b7b8 100644 (file)
@@ -5,7 +5,7 @@
  # following command :
  #
 -# @prefix@/sbin/pure-ftpd @sysconfdir@/etc/pure-ftpd.conf
-+# @prefix@/sbin/pure-ftpd @sysconfdir@/etc/ftpd/pure-ftpd.conf
++# @prefix@/sbin/pure-ftpd @sysconfdir@/etc/pure-ftpd/pure-ftpd.conf
  #
  # Online documentation:
  # https://www.pureftpd.org/project/pure-ftpd/doc
  # LDAP configuration file (see README.LDAP)
  
 -# LDAPConfigFile               /etc/pureftpd-ldap.conf
-+# LDAPConfigFile               /etc/ftpd/pureftpd-ldap.conf
++# LDAPConfigFile               /etc/pure-ftpd/pureftpd-ldap.conf
  
  
  
  # MySQL configuration file (see README.MySQL)
  
 -# MySQLConfigFile              /etc/pureftpd-mysql.conf
-+# MySQLConfigFile              /etc/ftpd/pureftpd-mysql.conf
++# MySQLConfigFile              /etc/pure-ftpd/pureftpd-mysql.conf
  
  
  # PostgreSQL configuration file (see README.PGSQL)
  
 -# PGSQLConfigFile              /etc/pureftpd-pgsql.conf
-+# PGSQLConfigFile              /etc/ftpd/pureftpd-pgsql.conf
++# PGSQLConfigFile              /etc/pure-ftpd/pureftpd-pgsql.conf
  
  
  # PureDB user database (see README.Virtual-Users)
  
 -# PureDB                       /etc/pureftpd.pdb
-+# PureDB                       /etc/ftpd/pureftpd.pdb
++# PureDB                       /etc/pure-ftpd/pureftpd.pdb
  
  
  # Path to pure-authd socket (see README.Authentication-Modules)
@@ -59,7 +59,7 @@
  # Certificate file, for TLS
  
 -# CertFile                     /etc/ssl/private/pure-ftpd.pem
-+# CertFile                     /etc/ftpd/ssl/private/pure-ftpd.pem
++# CertFile                     /etc/pure-ftpd/ssl/private/pure-ftpd.pem
  
  
  
index a50433a3a95756df0fe0a6d99638c0b771cc1731..b6f1b97ba99050ec4e5e5f81f49b4f3358e33e30 100644 (file)
@@ -12,7 +12,7 @@
 # Get network config
 . /etc/sysconfig/network
 
-PURE_AUTH_SCRIPT=/etc/ftpd/auth.script
+PURE_AUTH_SCRIPT=/etc/pure-ftpd/auth.script
 PURE_AUTH_SOCKET=/var/run/pure-authd/socket
 
 # Get service config
@@ -51,7 +51,7 @@ start() {
                        msg_starting pure-ftpd
                        rm -f /var/run/pure-ftpd/client*
                        modprobe -s capability > /dev/null 2>&1
-                       daemon /usr/sbin/pure-ftpd /etc/ftpd/pureftpd.conf \
+                       daemon /usr/sbin/pure-ftpd /etc/pure-ftpd/pureftpd.conf \
                                $([ "$PURE_AUTH" = "yes" ] && echo "-lextauth:$PURE_AUTH_SOCKET") \
                                --daemonize
                        RETVAL=$?
index 046a26f6e106a95a7969620dc47b907c5b5e4697..86be36d47250ea7328257250ded52e5b52d28353 100644 (file)
@@ -1,5 +1,5 @@
 #%PAM-1.0
-auth           required        pam_listfile.so item=user sense=deny file=/etc/ftpd/ftpusers onerr=succeed
+auth           required        pam_listfile.so item=user sense=deny file=/etc/pure-ftpd/ftpusers onerr=succeed
 auth           include         system-auth
 account                required        pam_nologin.so
 account                required        pam_shells.so
index 4abfc33f7a09a98b93a94315d2775dd6a708fca4..86f578c00d7b52bbdec5459dc5b984d114c06671 100644 (file)
@@ -1,4 +1,3 @@
-#
 # Conditional build:
 %bcond_with    extra           # with additional, maybe useful, but unmaintained features
 %bcond_without ldap            # disable LDAP auth
@@ -9,7 +8,7 @@
 %bcond_without tls             # disable SSL/TLS support
 %bcond_without cap             # disable capabilities
 
-%define        rel     5
+%define        rel     6
 Summary:       Small, fast and secure FTP server
 Summary(pl.UTF-8):     Mały, szybki i bezpieczny serwer FTP
 Name:          pure-ftpd
@@ -32,10 +31,9 @@ Patch2:              %{name}-pure-pw_passwd.patch
 Patch3:                %{name}-mysql_config.patch
 # from Fedora
 Patch4:                0003-Allow-having-both-options-and-config-file-on-command.patch
-
-Patch7:                audit_cap.patch
-Patch8:                %{name}-apparmor.patch
-Patch9:                %{name}-mysql-utf8.patch
+Patch5:                audit_cap.patch
+Patch6:                %{name}-apparmor.patch
+Patch7:                %{name}-mysql-utf8.patch
 URL:           http://www.pureftpd.org/
 %{?with_extra:BuildRequires:   autoconf}
 %{?with_extra:BuildRequires:   automake}
@@ -65,7 +63,7 @@ Provides:     group(ftpauth)
 Conflicts:     man-pages < 1.51
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _sysconfdir     /etc/ftpd
+%define                _sysconfdir     /etc/pure-ftpd
 %define                _ftpdir         /home/services/ftp
 %define                schemadir       /usr/share/openldap/schema
 
@@ -111,10 +109,9 @@ Ten pakiet zawiera schemat Pure-FTPd pureftpd.schema dla openldapa.
 %patch1 -p1
 %patch3 -p1
 %patch4 -p1
-
+%patch5 -p1
+%patch6 -p1
 %patch7 -p1
-%patch8 -p1
-%patch9 -p1
 
 %{?with_extra:%patch2 -p1}
 
@@ -230,6 +227,26 @@ fi
 sed -i -e 's#SSLCertFile#CertFile#gi' $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd.conf
 exit 0
 
+%triggerun -- %{name} < 1.0.47-6
+if [ $1 -le 1 ]; then
+        exit 0
+fi
+[ -d /etc/pure-ftpd ] || mkdir /etc/pure-ftpd 2>/dev/null || :
+for f in /etc/ftpd/{ftpusers,pureftpd{,-ldap,-mysql,-pgsql}.conf,pureftpd-dir-aliases}; do
+        f=${f##*/}
+        [ -f "/etc/ftpd/$f" ] && mv "/etc/ftpd/$f" /etc/pure-ftpd 2>/dev/null || :
+done
+[ -h /etc/ftpd/pure-ftpd ] && mv /etc/ftpd/pure-ftpd /etc/pure-ftpd 2>/dev/null || :
+[ -d /etc/ftpd/vhosts ] && mv /etc/ftpd/vhosts /etc/pure-ftpd 2>/dev/null || :
+find /etc/pure-ftpd -type f 2>/dev/null | xargs sed -i -e 's|/etc/ftpd|/etc/pure-ftpd|g' 2>/dev/null
+[ -n "$(find /etc/ftpd/conf.d -type d -empty 2>/dev/null)" ] && rmdir /etc/ftpd 2>/dev/null || :
+[ -n "$(find /etc/ftpd -type d -empty 2>/dev/null)" ] && rmdir /etc/ftpd 2>/dev/null || :
+
+%triggerpostun -- %{name} < 1.0.47-6
+echo
+echo "Warning! Configuration has been migrated to /etc/pure-ftpd."
+echo
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog CONTACT COPYING FAQ HISTORY NEWS README* THANKS pure*.conf pureftpd.schema
index ada2fda4f43310810cea7e9d15c5927f4c79607b..798c5eebce48cc8e420b812873d277dc8aa9b10a 100644 (file)
@@ -1,7 +1,7 @@
 # Customized settings for pure-ftpd
 
 # Own authorization script, see README.Authentication-Modules
-# PURE_AUTH_SCRIPT=/etc/ftpd/auth.script
+# PURE_AUTH_SCRIPT=/etc/pure-ftpd/auth.script
 
 # If it is set and 'CallUploadScript' option is used in configuration file
 # this script is called after successfull file upload.