summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2005-06-28 14:52:26 +0000
committerRoy Marples <uberlord@gentoo.org>2005-06-28 14:52:26 +0000
commitb90b41637f65d20fb19566080063b2cc6c1e2f3c (patch)
tree98192892c82a390439fe7ef1dd7ce317618262b8 /net-ftp/ftpbase
parentAdded NOCONFIGURE=1 to avoid running configure during bootstrap. (diff)
downloadgentoo-2-b90b41637f65d20fb19566080063b2cc6c1e2f3c.tar.gz
gentoo-2-b90b41637f65d20fb19566080063b2cc6c1e2f3c.tar.bz2
gentoo-2-b90b41637f65d20fb19566080063b2cc6c1e2f3c.zip
Initial import of net-ftp/ftpbase
(Portage version: 2.0.51.19)
Diffstat (limited to 'net-ftp/ftpbase')
-rw-r--r--net-ftp/ftpbase/ChangeLog15
-rw-r--r--net-ftp/ftpbase/Manifest6
-rw-r--r--net-ftp/ftpbase/files/digest-ftpbase-0.000
-rw-r--r--net-ftp/ftpbase/files/ftp-pamd18
-rw-r--r--net-ftp/ftpbase/files/ftp-pamd-include18
-rw-r--r--net-ftp/ftpbase/files/ftpusers37
-rw-r--r--net-ftp/ftpbase/ftpbase-0.00.ebuild93
-rw-r--r--net-ftp/ftpbase/metadata.xml9
8 files changed, 196 insertions, 0 deletions
diff --git a/net-ftp/ftpbase/ChangeLog b/net-ftp/ftpbase/ChangeLog
new file mode 100644
index 000000000000..418ccf3400c3
--- /dev/null
+++ b/net-ftp/ftpbase/ChangeLog
@@ -0,0 +1,15 @@
+# ChangeLog for net-ftp/ftpbase
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/ftpbase/ChangeLog,v 1.1 2005/06/28 14:52:26 uberlord Exp $
+
+*ftpbase-0.00 (28 Jun 2005)
+
+ 28 Jun 2005; Roy Marples <uberlord@gentoo.org> +files/ftp-pamd,
+ +files/ftp-pamd-include, +files/ftpusers, +metadata.xml,
+ +ftpbase-0.00.ebuild:
+ Initial ftpbase ebuild.
+ This is a meta-ebuild for vsftpd, proftpd and pureftp - possibly others too.
+ It provides a /etc/ftpusers, installs the ftp:ftp user and creates the
+ home directory.
+ Optionally it provides /etc/pam.d/ftp
+
diff --git a/net-ftp/ftpbase/Manifest b/net-ftp/ftpbase/Manifest
new file mode 100644
index 000000000000..430e91bf5207
--- /dev/null
+++ b/net-ftp/ftpbase/Manifest
@@ -0,0 +1,6 @@
+MD5 43a528db1a05d9c7851bced09e09733d ftpbase-0.00.ebuild 2459
+MD5 f545d2bcdb5641a7863b64be435382e2 metadata.xml 285
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-ftpbase-0.00 0
+MD5 8c22475496892f4825aa5cc70c53d5d9 files/ftp-pamd 713
+MD5 586c6fcf7c8876dfec3d51209be7382c files/ftp-pamd-include 645
+MD5 4a06897598c9343a62a4af84d75c049f files/ftpusers 313
diff --git a/net-ftp/ftpbase/files/digest-ftpbase-0.00 b/net-ftp/ftpbase/files/digest-ftpbase-0.00
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/net-ftp/ftpbase/files/digest-ftpbase-0.00
diff --git a/net-ftp/ftpbase/files/ftp-pamd b/net-ftp/ftpbase/files/ftp-pamd
new file mode 100644
index 000000000000..0b152322ac30
--- /dev/null
+++ b/net-ftp/ftpbase/files/ftp-pamd
@@ -0,0 +1,18 @@
+# Provided by ftpbase (dont remove this line!)
+# Standard pam.d file for ftp service packages.
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/ftpbase/files/ftp-pamd,v 1.1 2005/06/28 14:52:26 uberlord Exp $
+
+auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
+auth required pam_stack.so service=system-auth
+
+# If this is enabled, anonymous logins will fail because the 'ftp' user does
+# not have a "valid" shell, as listed in /etc/shells.
+#
+# If you enable this, it is recommended that you do *not* give the 'ftp'
+# user a real shell. Instead, give the 'ftp' user /bin/false for a shell and
+# add /bin/false to /etc/shells.
+# auth required pam_shells.so
+
+account required pam_stack.so service=system-auth
+
+session required pam_stack.so service=system-auth
diff --git a/net-ftp/ftpbase/files/ftp-pamd-include b/net-ftp/ftpbase/files/ftp-pamd-include
new file mode 100644
index 000000000000..540844bad5ff
--- /dev/null
+++ b/net-ftp/ftpbase/files/ftp-pamd-include
@@ -0,0 +1,18 @@
+# Provided by ftpbase (dont remove this line!)
+# Standard pam.d file for ftp service packages.
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/ftpbase/files/ftp-pamd-include,v 1.1 2005/06/28 14:52:26 uberlord Exp $
+
+auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
+auth include system-auth
+
+# If this is enabled, anonymous logins will fail because the 'ftp' user does
+# not have a "valid" shell, as listed in /etc/shells.
+#
+# If you enable this, it is recommended that you do *not* give the 'ftp'
+# user a real shell. Instead, give the 'ftp' user /bin/false for a shell and
+# add /bin/false to /etc/shells.
+# auth required pam_shells.so
+
+account include system-auth
+
+session include system-auth
diff --git a/net-ftp/ftpbase/files/ftpusers b/net-ftp/ftpbase/files/ftpusers
new file mode 100644
index 000000000000..4bc8872dc0af
--- /dev/null
+++ b/net-ftp/ftpbase/files/ftpusers
@@ -0,0 +1,37 @@
+# Provided by ftpbase (dont remove this line!)
+# /etc/ftpusers: list of users disallowed FTP access
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/ftpbase/files/ftpusers,v 1.1 2005/06/28 14:52:26 uberlord Exp $
+
+halt
+operator
+root
+shutdown
+sync
+bin
+daemon
+adm
+lp
+mail
+postmaster
+news
+uucp
+man
+games
+at
+cron
+www
+named
+squid
+gdm
+mysql
+postgres
+guest
+nobody
+alias
+qmaild
+qmaill
+qmailp
+qmailq
+qmailr
+qmails
+postfix
diff --git a/net-ftp/ftpbase/ftpbase-0.00.ebuild b/net-ftp/ftpbase/ftpbase-0.00.ebuild
new file mode 100644
index 000000000000..dff3bb07a108
--- /dev/null
+++ b/net-ftp/ftpbase/ftpbase-0.00.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/ftpbase/ftpbase-0.00.ebuild,v 1.1 2005/06/28 14:52:26 uberlord Exp $
+
+inherit eutils pam
+
+DESCRIPTION="FTP layout package"
+SRC_URI=""
+HOMEPAGE="http://www.gentoo.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="pam"
+
+DEPEND="pam? ( || ( virtual/pam sys-libs/pam ) )
+ !<net-ftp/proftpd-1.2.10-r6
+ !<net-ftp/pure-ftpd-1.0.20-r2
+ !<net-ftp/vsftpd-2.0.3-r1"
+
+S="${WORKDIR}"
+
+check_collision() {
+ [[ ! -e ${1} ]] && return 0
+
+ [[ $( head -n 1 "${1}" ) == $( head -n 1 "${2}" ) ]] && return 0
+
+ eerror "${1} exists and was not provided by ${P}"
+ return 1
+}
+
+pkg_setup() {
+ ebegin "Checking for possible file collisions..."
+ eindent
+
+ local collide=false
+ check_collision /etc/ftpusers "${FILESDIR}/ftpusers" || collide=true
+
+ if use pam ; then
+ check_collision /etc/pam.d/ftp "${FILESDIR}/ftp-pamd" || collide=true
+ fi
+
+ if ${collide} ; then
+ echo
+ einfo "Those files listed above have to be removed in order to"
+ einfo "install this version of ftpbase."
+ echo
+ ewarn "If you edited them, remember to backup and when restoring make"
+ ewarn " sure the first line in each file is:"
+ einfo $( head -n 1 "${FILESDIR}/ftpusers" )
+ eend 1
+ die "Can't be installed, files will collide"
+ fi
+
+ eend 0
+}
+
+src_install() {
+ # Add our default ftp user
+ enewgroup ftp 21
+ enewuser ftp 21 /bin/false /home/ftp ftp
+
+ # The ftpusers file is a list of people who are NOT allowed
+ # to use the ftp service.
+ insinto /etc
+ doins "${FILESDIR}/ftpusers"
+
+ # Ideally we would create the home directory here with a dodir.
+ # But we cannot until bug #9849 is solved - so we kludge in pkg_postinst()
+
+ if use pam ; then
+ if has_version "<sys-libs/pam-0.78" ; then
+ newpamd "${FILESDIR}/ftp-pamd" ftp
+ else
+ newpamd "${FILESDIR}/ftp-pamd-include" ftp
+ fi
+ fi
+}
+
+pkg_postinst() {
+ # Create our home directory if it doesn't exist and give a warning if we
+ # cannot.
+ # Install manually using install -d until bug #9849 is solved.
+ # This means that the home directory will not be removed when we uninstall
+ # if it's empty.
+ local homedir="${ROOT}$( egetent passwd ftp | cut -d: -f6 )"
+ if [[ ! -d ${homedir} ]]; then
+ einfo "Creating home directory for ftp user"
+ einfo " ${homedir}"
+ install -d "${homedir}" \
+ || ewarn " can't create ${homedir}"
+ fi
+}
diff --git a/net-ftp/ftpbase/metadata.xml b/net-ftp/ftpbase/metadata.xml
new file mode 100644
index 000000000000..5aa5417c2063
--- /dev/null
+++ b/net-ftp/ftpbase/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>uberlord@gentoo.org</email>
+ <name>Roy Marples</name>
+ </maintainer>
+ <longdescription>FTP base package</longdescription>
+</pkgmetadata>