[61772] trunk/dports/net
ryandesign at macports.org
ryandesign at macports.org
Sun Dec 20 23:38:59 PST 2009
Revision: 61772
http://trac.macports.org/changeset/61772
Author: ryandesign at macports.org
Date: 2009-12-20 23:38:57 -0800 (Sun, 20 Dec 2009)
Log Message:
-----------
pure-ftpd: new port based on pureftpd, update to 1.0.27, new description, new instructions, new layout, new language and postgresql variants, new startup script, new maintainer; see #22920
pureftpd: replaced_by pure-ftpd
Modified Paths:
--------------
trunk/dports/net/pure-ftpd/Portfile
trunk/dports/net/pureftpd/Portfile
Added Paths:
-----------
trunk/dports/net/pure-ftpd/
trunk/dports/net/pure-ftpd/files/org.pure-ftpd.ftpd.plist.basic.sample.in
trunk/dports/net/pure-ftpd/files/pure-ftpd.pam.sample
Removed Paths:
-------------
trunk/dports/net/pure-ftpd/files/patch-pam_pureftpd.diff
Modified: trunk/dports/net/pure-ftpd/Portfile
===================================================================
--- trunk/dports/net/pureftpd/Portfile 2009-12-21 05:14:02 UTC (rev 61769)
+++ trunk/dports/net/pure-ftpd/Portfile 2009-12-21 07:38:57 UTC (rev 61772)
@@ -1,108 +1,171 @@
# $Id$
-PortSystem 1.0
+PortSystem 1.0
-name pureftpd
-version 1.0.21
-categories net
-platforms darwin
-maintainers nomaintainer
+name pure-ftpd
+set pretty_name Pure-FTPd
+version 1.0.27
-homepage http://pureftpd.org/
-description A fast and standard-conformant FTP server
+categories net
+platforms darwin
+maintainers hostwizard.com:scott
+license BSD
-long_description "Pure-FTPd is a fast, production-quality, standard-conformant FTP server, \
- based upon Troll-FTPd. \
- Unlike other popular FTP servers, it's designed to be secure in default \
- configuration, has no known buffer overflow, it is really trivial to set \
- up and it is especially designed for modern kernels. \
- Features include chroot()ed and/or virtual chroot()ed home directories, \
- virtual domains, built-in 'ls', anti-warez system, bounded ports for \
- passive downloads, FXP protocol, bandwidth throttling, ratios, \
- LDAP / MySQL / PostgreSQL-based authentication, fortune files, Apache-like \
- log files, fast standalone mode, text / HTML / XML real-time status report, \
- virtual users, virtual quotas and more."
+homepage http://pureftpd.org/
+description ${pretty_name} is a fast, production-quality, standard-conformant FTP (SSL/TLS) \
+ server, based upon Troll-FTPd.
-master_sites ftp://ftp.pureftpd.org/pure-ftpd/releases/ \
- ftp://ftp.fr.pureftpd.org/pure-ftpd/releases/
+long_description ${pretty_name} has been designed to be secure in default configuration\; it has no\
+ known vulnerabilities. Features include: virtual domains, built-in 'ls', \
+ anti-warez system, configurable ports for passive downloads, FXP protocol, \
+ bandwidth throttling, ratios, LDAP / MySQL / PostgreSQL-based authentication,\
+ fortune files, Apache-like log files, text / HTML / XML real-time status report,\
+ virtual users, virtual quotas, privilege separation, SSL/TLS and more.
-distname pure-ftpd-${version}
-use_bzip2 yes
+master_sites ftp://ftp.pureftpd.org/pure-ftpd/releases/ \
+ ftp://ftp.fr.pureftpd.org/pure-ftpd/releases/
-checksums md5 ca8a8dbec0cd9c8ea92fc4c37ea9c410 \
- sha1 1405ff2b9b9c3616c4e390eb99779884173a3347 \
- rmd160 1ad61243c1f8a8d1055ee839eec0d9117681cf20
+use_bzip2 yes
-patchfiles patch-pam_pureftpd.diff
+checksums md5 7d18544384aa1649d483ba86518ed34e \
+ sha1 f4c3fcc68bea3b2dad9ff76624e23f072acd9c2e \
+ rmd160 2e6f2501e1d6da6c5caf32b802e7c2d481e2e6ee
+
+livecheck.type regex
+livecheck.url http://download.pureftpd.org/pub/${name}/releases/
+livecheck.regex ${name}-(\[0-9.\]+)\\.tar
-configure.args --with-everything \
- --with-virtualchroot \
- --with-paranoidmsg \
- --with-pam \
- --with-rendezvous \
- --without-capabilities \
- --mandir=${prefix}/share/man \
- --infodir=${prefix}/share/info
+configure.args --with-everything \
+ --with-pam \
+ --with-virtualchroot \
+ --with-paranoidmsg \
+ --with-bonjour \
+ --without-inetd \
+ --mandir=${prefix}/share/man \
+ --infodir=${prefix}/share/info \
+ --sysconfdir=${prefix}/etc/${name}/conf \
+ --localstatedir=${prefix}/var
-destroot.destdir prefix=${destroot}${prefix} \
- mandir=${destroot}${prefix}/share/man
+destroot.destdir prefix=${destroot}${prefix} \
+ mandir=${destroot}${prefix}/share/man
-post-destroot { \
+destroot.keepdirs ${destroot}${prefix}/etc/${name}/ssl \
+ ${destroot}${prefix}/etc/${name}/conf \
+ ${destroot}${prefix}/var/log/${name}
+
+post-destroot {
+ file mkdir ${destroot}${prefix}/etc/${name}/ssl
+ file mkdir ${destroot}${prefix}/etc/${name}/conf
+ file mkdir ${destroot}${prefix}/var/log/${name}
file mkdir ${destroot}${prefix}/share/doc/${name}
- xinstall -m 644 -v -W ${worksrcpath} \
- AUTHORS CONTACT FAQ HISTORY NEWS README \
- README.Authentication-Modules README.Configuration-File \
- README.LDAP README.MacOS-X README.MySQL README.PGSQL \
- README.TLS README.Virtual-Users pureftpd-ldap.conf \
- pureftpd-mysql.conf pureftpd-pgsql.conf THANKS \
- ${destroot}${prefix}/share/doc/${name}
- file copy ${worksrcpath}/pam/pure-ftpd \
- ${destroot}${prefix}/share/doc/${name}
+
+ # Install the notes and readme files
+ xinstall -m 644 -W ${worksrcpath} \
+ AUTHORS ChangeLog CONTACT COPYING FAQ HISTORY INSTALL NEWS README \
+ pureftpd-ldap.conf pureftpd-mysql.conf pureftpd-pgsql.conf pureftpd.schema \
+ README.Authentication-Modules README.Configuration-File \
+ README README.Authentication-Modules README.Configuration-File README.Contrib \
+ README.iPhone README.Donations README.LDAP README.MacOS-X README.PGSQL README.TLS \
+ README.MySQL README.Virtual-Users README.MySQL README.PGSQL README.TLS README.Virtual-Users \
+ THANKS \
+ ${destroot}${prefix}/share/doc/${name}
+
+ # Copy in the sample launchd plists item
+ file copy ${filespath}/org.pure-ftpd.ftpd.plist.basic.sample.in ${destroot}${prefix}/share/doc/${name}/org.pure-ftpd.ftpd.plist.basic.sample
+ reinplace "s|@PREFIX@|${prefix}|g" ${destroot}${prefix}/share/doc/${name}/org.pure-ftpd.ftpd.plist.basic.sample
+
+ # Copy in the sample pure-ftpd pam file
+ file copy ${filespath}/pure-ftpd.pam.sample ${destroot}${prefix}/share/doc/${name}/pure-ftpd.pam.sample
}
-# Notify the user how to launch the ftpd
-post-install {
- ui_msg "\nYou can now start PureFTPd in 3 ways,"
- ui_msg "either via xinetd, in standalone mode, or"
- ui_msg "if you're using Mac OS X 10.4 / Darwin 8.x"
- ui_msg "via launchd(8).\n"
- ui_msg "If you're under Mac OS X 10.3 or Mac OS X 10.4,"
- ui_msg "you have to copy ${prefix}/share/doc/${name}/pure-ftpd"
- ui_msg "to /etc/pam.d and use the '-lpam' flag when"
- ui_msg "launching pure-ftpd to have PAM working.\n"
-}
-
-# Langugage variants, should only be able to choose one.
-variant brazilian description "Use Bazilian language for server messages" { configure.args-append --with-language=brazilian }
-variant czech description "Use Czech language for server messages" { configure.args-append --with-language=czech }
-variant danish description "Use Danish language for server messages" { configure.args-append --with-language=danish }
-variant dutch description "Use Dutch language for server messages" { configure.args-append --with-language=dutch }
-variant french description "Use French language for server messages" { configure.args-append --with-language=french }
-variant french_funny description "Use French funny language for server messages" { configure.args-append --with-language=french-funny }
-variant german description "Use German language for server messages" { configure.args-append --with-language=german }
-variant italian description "Use Italian language for server messages" { configure.args-append --with-language=italian }
-variant korean description "Use Korean language for server messages" { configure.args-append --with-language=korean }
-variant norwegian description "Use Norwegian language for server messages" { configure.args-append --with-language=norwegian }
-variant polish description "Use Polish language for server messages" { configure.args-append --with-language=polish }
-variant romanian description "Use Romanian language for server messages" { configure.args-append --with-language=romanian }
-variant russian description "Use Russian language for server messages" { configure.args-append --with-language=russian }
-variant simplified_chinese description "Use simplified Chinese for server messages" { configure.args-append --with-language=simplified-chinese }
-variant slovak description "Use Slovak language for server messages" { configure.args-append --with-language=slovak }
-variant spanish description "Use Spanish language for server messages" { configure.args-append --with-language=spanish }
-variant swedish description "Use Swedish language for server messages" { configure.args-append --with-language=swedish }
-variant traditional_chinese description "Use traditional Chinese language for server messages" { configure.args-append --with-language=traditional-chinese }
-
-variant mysql5 description "Use the native MySQL support for users database." {
+# Variants
+variant mysql5 conflicts postgresql description "Use native MySQL support for privileges database." {
depends_lib-append path:bin/mysql_config5:mysql5
configure.args-append --with-mysql
configure.cflags-append "-I${prefix}/include/mysql5/mysql"
configure.ldflags-append "-L${prefix}/lib/mysql5/mysql"
}
-variant nobanner description "Don't display the initial banner" { configure.args-append --without-banner }
+variant postgresql conflicts mysql5 description "Use native postgreSQL support for privileges database." {
+ depends_lib-append port:postgresql83
+ configure.args-append --with-pgsql
+}
-variant tls description "Encryption of the control channel using SSL/TLS" {
- depends_lib lib:libssl.dylib:openssl
+variant tls description "Encryption of ftp control and data channels using SSL/TLS" {
+ depends_lib-append port:openssl
configure.args-append --with-tls \
- --with-certfile=${prefix}/etc/ssl/private/pure-ftpd.pem
+ --with-certfile=${prefix}/etc/${name}/ssl/pure-ftpd.pem
}
+
+# Language variants, should only be able to choose one.
+set variants {
+ lang_brazilian
+ lang_czech
+ lang_danish
+ lang_dutch
+ lang_french
+ lang_french_funny
+ lang_german
+ lang_italian
+ lang_korean
+ lang_norwegian
+ lang_polish
+ lang_romanian
+ lang_russian
+ lang_simplified_chinese
+ lang_slovak
+ lang_spanish
+ lang_swedish
+ lang_trad_chinese
+}
+
+foreach variant_name $variants {
+ # Quick way to remove the working variant from the list
+ set the_conflicts [lsearch -all -inline -not -exact $variants $variant_name]
+ # String replace away the lang_ part, as that is not part of the name used for the compile args
+ set variant_configure_name [string map {"lang_" ""} $variant_name]
+ set variant_line "variant $variant_name conflicts $the_conflicts description \"Use $variant_name for server messages\" {
+ configure.args-append --with-language=$variant_configure_name }"
+ eval $variant_line
+
+}
+
+# Notify the user how to launch the ftpd
+post-activate {
+ ui_msg "========================================================================"
+ ui_msg "${pretty_name} documentation is located in: ${prefix}/share/doc/${name}"
+ ui_msg ""
+
+ ui_msg "You can start ${pretty_name} from the command line with:"
+ ui_msg " sudo ${prefix}/sbin/${name} &"
+
+ ui_msg "A future release of ${pretty_name} will no longer support"
+ ui_msg "xinetd, and has been removed from this version. If you are using that"
+ ui_msg "method to start ${pretty_name} now, please switch to using launchd(8)."
+ ui_msg ""
+
+ ui_msg "A sample launchd plist has been created to get you started."
+ ui_msg " 1) org.pure-ftpd.ftpd.plist.basic.sample"
+ ui_msg " Basic but secure chrooted ftp server"
+ ui_msg ""
+
+ ui_msg "To install the launchd item, issue the following commands:"
+ ui_msg "cd ${prefix}/share/doc/${name}/"
+ ui_msg "sudo cp org.pure-ftpd.ftpd.plist.basic.sample /Library/LaunchDaemons/org.pure-ftpd.ftpd.plist"
+ ui_msg " - and then load the launchd item - "
+ ui_msg "sudo launchctl load -w /Library/LaunchDaemons/org.pure-ftpd.ftpd.plist"
+ ui_msg ""
+
+ ui_msg "If you intend to use pure-FTPd with PAM, meaning you want to authenticate against Mac OS X"
+ ui_msg "user accounts, please copy the pure-ftpd.pam.sample file to /etc/pam.d/pure-ftpd"
+ ui_msg "cd ${prefix}/share/doc/${name}/"
+ ui_msg "sudo cp pure-ftpd.pam.sample /etc/pam.d/pure-ftpd"
+
+ ui_msg "You can now test the server with:"
+ ui_msg " ftp localhost"
+ ui_msg "You should see a Welcome to ${pretty_name} message."
+ ui_msg ""
+
+ ui_msg "See ${homepage} for more information."
+ ui_msg "========================================================================"
+}
Added: trunk/dports/net/pure-ftpd/files/org.pure-ftpd.ftpd.plist.basic.sample.in
===================================================================
--- trunk/dports/net/pure-ftpd/files/org.pure-ftpd.ftpd.plist.basic.sample.in (rev 0)
+++ trunk/dports/net/pure-ftpd/files/org.pure-ftpd.ftpd.plist.basic.sample.in 2009-12-21 07:38:57 UTC (rev 61772)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>KeepAlive</key>
+ <true/>
+ <key>Label</key>
+ <string>org.pure-ftpd.ftpd</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string>@PREFIX@/sbin/pure-ftpd</string>
+ <string>--chrooteveryone</string>
+ <string>--displaydotfiles</string>
+ <string>--noanonymous</string>
+ <string>--createhomedir</string>
+ <string>--maxdiskusagepct=80</string>
+ <string>--allowdotfiles</string>
+ <string>--minuid=1</string>
+ <string>--umask=133:022</string>
+ <string>--maxclientsperip=5</string>
+ <string>--maxidletime=10</string>
+ <string>--altlog=stats:@PREFIX@/var/log/pure-ftpd/ftp_xfer.log</string>
+ <string>--login=puredb:@PREFIX@/etc/pure-ftpd/pdb/pureftpd.pdb</string>
+ <string>--dontresolve</string>
+ <string>--customerproof</string>
+ <string>--pidfile=@PREFIX@/var/run/pure-ftpd.pid</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+</dict>
+</plist>
Deleted: trunk/dports/net/pure-ftpd/files/patch-pam_pureftpd.diff
===================================================================
--- trunk/dports/net/pureftpd/files/patch-pam_pureftpd.diff 2009-12-21 05:14:02 UTC (rev 61769)
+++ trunk/dports/net/pure-ftpd/files/patch-pam_pureftpd.diff 2009-12-21 07:38:57 UTC (rev 61772)
@@ -1,27 +0,0 @@
---- pam/pure-ftpd Mon Nov 24 11:14:35 2003
-+++ pam/pure-ftpd Sun Dec 21 17:26:03 2003
-@@ -1,16 +1,8 @@
--#%PAM-1.0
--
--# Sample PAM configuration file for Pure-FTPd.
--# Install it in /etc/pam.d/pure-ftpd or add to /etc/pam.conf
--
--auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
--auth required pam_stack.so service=system-auth
--auth required pam_shells.so
--auth required pam_nologin.so
--
--account required pam_stack.so service=system-auth
--
--password required pam_stack.so service=system-auth
--
--session required pam_stack.so service=system-auth
--
-+# pure-ftpd: auth account password session
-+auth required pam_nologin.so
-+auth sufficient pam_securityserver.so
-+auth sufficient pam_unix.so
-+auth required pam_deny.so
-+account required pam_permit.so
-+password required pam_deny.so
-+session required pam_uwtmp.so
Added: trunk/dports/net/pure-ftpd/files/pure-ftpd.pam.sample
===================================================================
--- trunk/dports/net/pure-ftpd/files/pure-ftpd.pam.sample (rev 0)
+++ trunk/dports/net/pure-ftpd/files/pure-ftpd.pam.sample 2009-12-21 07:38:57 UTC (rev 61772)
@@ -0,0 +1,8 @@
+# pure-ftpd: auth account password session for PAM
+# Copy this file to /etc/pam.d/pure-ftpd
+# This file created by MacPorts, but installed by the user
+auth sufficient pam_securityserver.so
+auth required pam_deny.so
+account required pam_permit.so
+password required pam_deny.so
+session required pam_permit.so
Modified: trunk/dports/net/pureftpd/Portfile
===================================================================
--- trunk/dports/net/pureftpd/Portfile 2009-12-21 06:26:03 UTC (rev 61771)
+++ trunk/dports/net/pureftpd/Portfile 2009-12-21 07:38:57 UTC (rev 61772)
@@ -3,7 +3,8 @@
PortSystem 1.0
name pureftpd
-version 1.0.21
+replaced_by pure-ftpd
+version 1.0.27
categories net
platforms darwin
maintainers nomaintainer
@@ -23,86 +24,8 @@
log files, fast standalone mode, text / HTML / XML real-time status report, \
virtual users, virtual quotas and more."
-master_sites ftp://ftp.pureftpd.org/pure-ftpd/releases/ \
- ftp://ftp.fr.pureftpd.org/pure-ftpd/releases/
+distfiles
-distname pure-ftpd-${version}
-use_bzip2 yes
-
-checksums md5 ca8a8dbec0cd9c8ea92fc4c37ea9c410 \
- sha1 1405ff2b9b9c3616c4e390eb99779884173a3347 \
- rmd160 1ad61243c1f8a8d1055ee839eec0d9117681cf20
-
-patchfiles patch-pam_pureftpd.diff
-
-configure.args --with-everything \
- --with-virtualchroot \
- --with-paranoidmsg \
- --with-pam \
- --with-rendezvous \
- --without-capabilities \
- --mandir=${prefix}/share/man \
- --infodir=${prefix}/share/info
-
-destroot.destdir prefix=${destroot}${prefix} \
- mandir=${destroot}${prefix}/share/man
-
-post-destroot { \
- file mkdir ${destroot}${prefix}/share/doc/${name}
- xinstall -m 644 -v -W ${worksrcpath} \
- AUTHORS CONTACT FAQ HISTORY NEWS README \
- README.Authentication-Modules README.Configuration-File \
- README.LDAP README.MacOS-X README.MySQL README.PGSQL \
- README.TLS README.Virtual-Users pureftpd-ldap.conf \
- pureftpd-mysql.conf pureftpd-pgsql.conf THANKS \
- ${destroot}${prefix}/share/doc/${name}
- file copy ${worksrcpath}/pam/pure-ftpd \
- ${destroot}${prefix}/share/doc/${name}
+pre-configure {
+ return -code error "pureftpd has been renamed to pure-ftpd; please install pure-ftpd instead"
}
-
-# Notify the user how to launch the ftpd
-post-install {
- ui_msg "\nYou can now start PureFTPd in 3 ways,"
- ui_msg "either via xinetd, in standalone mode, or"
- ui_msg "if you're using Mac OS X 10.4 / Darwin 8.x"
- ui_msg "via launchd(8).\n"
- ui_msg "If you're under Mac OS X 10.3 or Mac OS X 10.4,"
- ui_msg "you have to copy ${prefix}/share/doc/${name}/pure-ftpd"
- ui_msg "to /etc/pam.d and use the '-lpam' flag when"
- ui_msg "launching pure-ftpd to have PAM working.\n"
-}
-
-# Langugage variants, should only be able to choose one.
-variant brazilian description "Use Bazilian language for server messages" { configure.args-append --with-language=brazilian }
-variant czech description "Use Czech language for server messages" { configure.args-append --with-language=czech }
-variant danish description "Use Danish language for server messages" { configure.args-append --with-language=danish }
-variant dutch description "Use Dutch language for server messages" { configure.args-append --with-language=dutch }
-variant french description "Use French language for server messages" { configure.args-append --with-language=french }
-variant french_funny description "Use French funny language for server messages" { configure.args-append --with-language=french-funny }
-variant german description "Use German language for server messages" { configure.args-append --with-language=german }
-variant italian description "Use Italian language for server messages" { configure.args-append --with-language=italian }
-variant korean description "Use Korean language for server messages" { configure.args-append --with-language=korean }
-variant norwegian description "Use Norwegian language for server messages" { configure.args-append --with-language=norwegian }
-variant polish description "Use Polish language for server messages" { configure.args-append --with-language=polish }
-variant romanian description "Use Romanian language for server messages" { configure.args-append --with-language=romanian }
-variant russian description "Use Russian language for server messages" { configure.args-append --with-language=russian }
-variant simplified_chinese description "Use simplified Chinese for server messages" { configure.args-append --with-language=simplified-chinese }
-variant slovak description "Use Slovak language for server messages" { configure.args-append --with-language=slovak }
-variant spanish description "Use Spanish language for server messages" { configure.args-append --with-language=spanish }
-variant swedish description "Use Swedish language for server messages" { configure.args-append --with-language=swedish }
-variant traditional_chinese description "Use traditional Chinese language for server messages" { configure.args-append --with-language=traditional-chinese }
-
-variant mysql5 description "Use the native MySQL support for users database." {
- depends_lib-append path:bin/mysql_config5:mysql5
- configure.args-append --with-mysql
- configure.cflags-append "-I${prefix}/include/mysql5/mysql"
- configure.ldflags-append "-L${prefix}/lib/mysql5/mysql"
-}
-
-variant nobanner description "Don't display the initial banner" { configure.args-append --without-banner }
-
-variant tls description "Encryption of the control channel using SSL/TLS" {
- depends_lib lib:libssl.dylib:openssl
- configure.args-append --with-tls \
- --with-certfile=${prefix}/etc/ssl/private/pure-ftpd.pem
-}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091220/a96e852d/attachment-0001.html>
More information about the macports-changes
mailing list