summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-09-27 10:13:58 +0000
committerRoy Marples <uberlord@gentoo.org>2006-09-27 10:13:58 +0000
commit96d4f87beb1e2d11d96afab48d486da3e7055d28 (patch)
treead4356846e74dea6b0fcc057895d9aed4f345081 /net-ftp/ftpbase
parentVersion bump. (diff)
downloadhistorical-96d4f87beb1e2d11d96afab48d486da3e7055d28.tar.gz
historical-96d4f87beb1e2d11d96afab48d486da3e7055d28.tar.bz2
historical-96d4f87beb1e2d11d96afab48d486da3e7055d28.zip
Give a newly created home dir sane ownership (root:ftp), #148748 thanks
to Sergey Borodich. Package-Manager: portage-2.1.2_pre1-r3
Diffstat (limited to 'net-ftp/ftpbase')
-rw-r--r--net-ftp/ftpbase/ChangeLog6
-rw-r--r--net-ftp/ftpbase/Manifest26
-rw-r--r--net-ftp/ftpbase/ftpbase-0.00.ebuild37
3 files changed, 29 insertions, 40 deletions
diff --git a/net-ftp/ftpbase/ChangeLog b/net-ftp/ftpbase/ChangeLog
index 29a10221f628..20ad5b6b0f28 100644
--- a/net-ftp/ftpbase/ChangeLog
+++ b/net-ftp/ftpbase/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-ftp/ftpbase
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/ftpbase/ChangeLog,v 1.11 2006/04/13 07:26:11 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/ftpbase/ChangeLog,v 1.12 2006/09/27 10:13:58 uberlord Exp $
+
+ 27 Sep 2006; Roy Marples <uberlord@gentoo.org> ftpbase-0.00.ebuild:
+ Give a newly created home dir sane ownership (root:ftp), #148748 thanks
+ to Sergey Borodich.
13 Apr 2006; Roy Marples <uberlord@gentoo.org> ftpbase-0.00.ebuild:
Fixed up some quoting issues and remove eindent command, #129774.
diff --git a/net-ftp/ftpbase/Manifest b/net-ftp/ftpbase/Manifest
index 2f83ab21868e..72754cd178bb 100644
--- a/net-ftp/ftpbase/Manifest
+++ b/net-ftp/ftpbase/Manifest
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
AUX ftp-pamd 807 RMD160 1dce921bb3045aca3f4d57f4bc70f804f49d91cb SHA1 f793dda67863e70ae943a1dc56dc094b9423cb93 SHA256 c378eaaa16ca300bb828256d68807cf6f84751ae3ef9192186cf16bef89076dc
MD5 7be20c7c1b62bb7e65994bd7a686695e files/ftp-pamd 807
RMD160 1dce921bb3045aca3f4d57f4bc70f804f49d91cb files/ftp-pamd 807
@@ -13,14 +10,14 @@ AUX ftpusers 407 RMD160 46a48b5ab2c51b4062b62a424bd88a244bb08445 SHA1 d814dedf06
MD5 bd59faca8d7138ac67e99d94507b04f9 files/ftpusers 407
RMD160 46a48b5ab2c51b4062b62a424bd88a244bb08445 files/ftpusers 407
SHA256 34360cd3a4700e8c03aa08d1a5c3f217bb58b5e935950e14868f5ff8d32e52bc files/ftpusers 407
-EBUILD ftpbase-0.00.ebuild 2420 RMD160 bf0ae9e8338fc3ab8a6fb683df47573e1c40dd4e SHA1 97a7417dfbdf8d788f11c952570ce469c9d92e60 SHA256 67fa27cae03c2d0c22ee8615b7fd20127a22b255c9f1948ae1bb4cd7dc8bc935
-MD5 8203df81be3def5f808a8fe865f9edef ftpbase-0.00.ebuild 2420
-RMD160 bf0ae9e8338fc3ab8a6fb683df47573e1c40dd4e ftpbase-0.00.ebuild 2420
-SHA256 67fa27cae03c2d0c22ee8615b7fd20127a22b255c9f1948ae1bb4cd7dc8bc935 ftpbase-0.00.ebuild 2420
-MISC ChangeLog 1844 RMD160 084ad637fcc6983e07e34f1d1957c825b886911f SHA1 85b17e4d411e893538541ac0740a576dd7432af6 SHA256 85b8f58a9a31bd62ad2acb065cedc4e5b1d6226aa6baaeca083124855b0311ef
-MD5 f738fef4ac5d4ed492c6aee11ab346eb ChangeLog 1844
-RMD160 084ad637fcc6983e07e34f1d1957c825b886911f ChangeLog 1844
-SHA256 85b8f58a9a31bd62ad2acb065cedc4e5b1d6226aa6baaeca083124855b0311ef ChangeLog 1844
+EBUILD ftpbase-0.00.ebuild 2289 RMD160 0b7db9aea358eeee2f5afc36b0e2cf6040e379fd SHA1 f6371e867620dcc21cf2d675233e3fd85d30b17b SHA256 bad90a77cd2da835d5f276dfc0c7b5e65cc98c518738b1ea5cd31e505bf0091b
+MD5 a81404bbb4bedb5500c0e34c8434d3f4 ftpbase-0.00.ebuild 2289
+RMD160 0b7db9aea358eeee2f5afc36b0e2cf6040e379fd ftpbase-0.00.ebuild 2289
+SHA256 bad90a77cd2da835d5f276dfc0c7b5e65cc98c518738b1ea5cd31e505bf0091b ftpbase-0.00.ebuild 2289
+MISC ChangeLog 2011 RMD160 955c3cc132e4d444e7387cb939536d348369e7a9 SHA1 1b3120403576a2ced89ece2e67b6c287f516584b SHA256 b4254fafbbddaa08a30706d8d5a256046e4e7b7dae0c168659f44fb116f349c9
+MD5 edef428b85492da66fa0fba4a6ce5748 ChangeLog 2011
+RMD160 955c3cc132e4d444e7387cb939536d348369e7a9 ChangeLog 2011
+SHA256 b4254fafbbddaa08a30706d8d5a256046e4e7b7dae0c168659f44fb116f349c9 ChangeLog 2011
MISC metadata.xml 285 RMD160 9fa8650f53cc524dcc1763c7c630aca84040d9f1 SHA1 af9cfb1ce026b1c33e58aaa2cf515865a50fffb9 SHA256 92e92b69d385b8b3157739ea7a426bcdf0210b4e48244da661656e3f89fd4241
MD5 f545d2bcdb5641a7863b64be435382e2 metadata.xml 285
RMD160 9fa8650f53cc524dcc1763c7c630aca84040d9f1 metadata.xml 285
@@ -28,10 +25,3 @@ SHA256 92e92b69d385b8b3157739ea7a426bcdf0210b4e48244da661656e3f89fd4241 metadata
MD5 68b329da9893e34099c7d8ad5cb9c940 files/digest-ftpbase-0.00 1
RMD160 c0da025038ed83c687ddc430da9846ecb97f3998 files/digest-ftpbase-0.00 1
SHA256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b files/digest-ftpbase-0.00 1
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.5 (GNU/Linux)
-
-iD8DBQFFDspXamhnQswr0vIRAs96AJ4+cbju8jI7ofOLWChzX31C88H3qACfTnTk
-WtDHYlpkID2d38nn7T4ojS4=
-=hkuQ
------END PGP SIGNATURE-----
diff --git a/net-ftp/ftpbase/ftpbase-0.00.ebuild b/net-ftp/ftpbase/ftpbase-0.00.ebuild
index ae470e29fa5e..54205f8b5224 100644
--- a/net-ftp/ftpbase/ftpbase-0.00.ebuild
+++ b/net-ftp/ftpbase/ftpbase-0.00.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 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.15 2006/09/18 16:32:54 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-ftp/ftpbase/ftpbase-0.00.ebuild,v 1.16 2006/09/27 10:13:58 uberlord Exp $
inherit eutils pam
@@ -21,9 +21,9 @@ DEPEND="pam? ( || ( virtual/pam sys-libs/pam ) )
S=${WORKDIR}
check_collision() {
- [[ ! -e "$1" ]] && return 0
+ [[ ! -e $1 ]] && return 0
- [[ $( head -n 1 "$1" ) == "$( head -n 1 "$2" )" ]] && return 0
+ [[ $(head -n 1 "$1") == $(head -n 1 "$2") ]] && return 0
eerror " $1 exists and was not provided by ${P}"
return 1
@@ -33,10 +33,10 @@ pkg_setup() {
ebegin "Checking for possible file collisions..."
local collide=false
- check_collision /etc/ftpusers "${FILESDIR}/ftpusers" || collide=true
+ check_collision "${ROOT}etc/ftpusers" "${FILESDIR}/ftpusers" || collide=true
if use pam ; then
- check_collision /etc/pam.d/ftp "${FILESDIR}/ftp-pamd" || collide=true
+ check_collision "${ROOT}etc/pam.d/ftp" "${FILESDIR}/ftp-pamd" || collide=true
fi
if ${collide} ; then
@@ -46,16 +46,26 @@ pkg_setup() {
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" )"
+ einfo "$(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() {
@@ -75,18 +85,3 @@ src_install() {
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=$(egethome ftp)
- if [[ ! -d ${homedir} ]]; then
- einfo "Creating home directory for ftp user"
- einfo " ${homedir}"
- install -d "${homedir}" \
- || ewarn " can't create ${homedir}"
- fi
-}