summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2008-05-14 22:10:30 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2008-05-14 22:10:30 +0000
commitabd5cb371828d9920ac2c4ef96ad6bc257728d19 (patch)
tree1de2142493fd5546c2aa4b033271cc29d055380f /net-ftp/ftpbase
parentVersion bump (#221171). (diff)
downloadgentoo-2-abd5cb371828d9920ac2c4ef96ad6bc257728d19.tar.gz
gentoo-2-abd5cb371828d9920ac2c4ef96ad6bc257728d19.tar.bz2
gentoo-2-abd5cb371828d9920ac2c4ef96ad6bc257728d19.zip
add a new version that drops support for pam_stack configuration files and just depends on virtual/pam.
(Portage version: 2.1.5_rc10)
Diffstat (limited to 'net-ftp/ftpbase')
-rw-r--r--net-ftp/ftpbase/ChangeLog11
-rw-r--r--net-ftp/ftpbase/ftpbase-0.01-r1.ebuild81
2 files changed, 90 insertions, 2 deletions
diff --git a/net-ftp/ftpbase/ChangeLog b/net-ftp/ftpbase/ChangeLog
index 718df3ac630c..0158cfc39c4c 100644
--- a/net-ftp/ftpbase/ChangeLog
+++ b/net-ftp/ftpbase/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-ftp/ftpbase
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/ftpbase/ChangeLog,v 1.16 2007/12/25 16:20:28 phreak Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/ftpbase/ChangeLog,v 1.17 2008/05/14 22:10:30 flameeyes Exp $
+
+*ftpbase-0.01-r1 (14 May 2008)
+
+ 14 May 2008; Diego Pettenò <flameeyes@gentoo.org>
+ +ftpbase-0.01-r1.ebuild:
+ add a new version that drops support for pam_stack configuration files and
+ just depends on virtual/pam.
25 Dec 2007; Christian Heim <phreak@gentoo.org> metadata.xml:
Removing uberlord from metadata.xml as per #199318. Assigning to
diff --git a/net-ftp/ftpbase/ftpbase-0.01-r1.ebuild b/net-ftp/ftpbase/ftpbase-0.01-r1.ebuild
new file mode 100644
index 000000000000..0e9ec448dd11
--- /dev/null
+++ b/net-ftp/ftpbase/ftpbase-0.01-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/ftpbase/ftpbase-0.01-r1.ebuild,v 1.1 2008/05/14 22:10:30 flameeyes Exp $
+
+inherit eutils pam
+
+DESCRIPTION="FTP layout package"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="pam"
+
+DEPEND="pam? ( virtual/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..."
+
+ local collide=false
+ check_collision "${ROOT}etc/ftpusers" "${FILESDIR}/ftpusers" || collide=true
+
+ if use pam ; then
+ check_collision "${ROOT}etc/pam.d/ftp" "${FILESDIR}/ftp-pamd" || collide=true
+ fi
+
+ if ${collide} ; then
+ eerror
+ eerror "Those files listed above have to be removed in order to"
+ eerror "install this version of ftpbase."
+ eerror
+ eerror "If you edited them, remember to backup and when restoring make"
+ eerror " sure the first line in each file is:"
+ eerror "$(head -n 1 "${FILESDIR}/ftpusers")"
+ eend 1
+ die "Can't be installed, files will collide"
+ fi
+
+ eend 0
+
+ # Check if home exists
+ local exists=false
+ [[ -d "${ROOT}home/ftp" ]] && exists=true
+
+ # Add our default ftp user
+ enewgroup ftp 21
+ enewuser ftp 21 -1 /home/ftp ftp
+
+ # If home did not exist and does now then we created it in the enewuser
+ # command. Now we have to change it's permissions to something sane.
+ if [[ ${exists} == "false" && -d "${ROOT}home/ftp" ]] ; then
+ chown root:ftp "${ROOT}"home/ftp
+ fi
+}
+
+src_install() {
+ # The ftpusers file is a list of people who are NOT allowed
+ # to use the ftp service.
+ insinto /etc
+ doins "${FILESDIR}/ftpusers" || die
+
+ # 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()
+
+ newpamd "${FILESDIR}/ftp-pamd-include" ftp
+}