Use egetent to set --with-root{name,group} configure options, bug #107374.
authorAaron Walker <ka0ttic@gentoo.org>
Tue, 27 Sep 2005 14:17:21 +0000 (14:17 +0000)
committerAaron Walker <ka0ttic@gentoo.org>
Tue, 27 Sep 2005 14:17:21 +0000 (14:17 +0000)
Package-Manager: portage-2.0.52-r1

sys-process/fcron/ChangeLog
sys-process/fcron/Manifest
sys-process/fcron/fcron-3.0.0.ebuild

index 1daf34c544dd3b28dae0ea8a0ba1e8cc498dce3a..9656ceedb23374901e7fb6feda9f7cb5284753e2 100644 (file)
@@ -1,6 +1,9 @@
 # ChangeLog for sys-process/fcron
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/ChangeLog,v 1.8 2005/09/25 15:54:52 ka0ttic Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/ChangeLog,v 1.9 2005/09/27 14:17:21 ka0ttic Exp $
+
+  27 Sep 2005; Aaron Walker <ka0ttic@gentoo.org> fcron-3.0.0.ebuild:
+  Use egetent to set --with-root{name,group} configure options, bug #107374.
 
   25 Sep 2005; Aaron Walker <ka0ttic@gentoo.org>
   files/fcron-2.0.0-configure.diff, fcron-3.0.0.ebuild:
index 000de82ce48ff31701da196e9ab43613dd9017ce..b567aa01918d2ed4eb7a467274614ca86d14b94a 100644 (file)
@@ -1,10 +1,10 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-MD5 e683aa2d43df1ac25b58b95ee94f7243 fcron-3.0.0.ebuild 3236
+MD5 3ae92a45aa047bc2b918dbf7e03320d0 fcron-3.0.0.ebuild 3552
 MD5 c1d0a2ed938718f4afbebd7581e4dbf4 fcron-2.0.2.ebuild 3132
 MD5 013d69a3c71c5685c3c5cb79262dea8d fcron-2.9.5.1.ebuild 3402
-MD5 5025c6a6abc77624e86be083fb5e9619 ChangeLog 9304
+MD5 73274fcaae180550890b5502fab5e725 ChangeLog 9451
 MD5 bd1deeb53b2b8e05397238a5479c74cc metadata.xml 251
 MD5 c5be641f3ac32d16043211c7f2d39af3 fcron-2.9.7.ebuild 2924
 MD5 92d3b4a42f3e88041e50bb552b9104fd files/crontab 832
@@ -18,7 +18,7 @@ MD5 e87691832e6f48a5aed1c6cf3b681bce files/fcron-2.9.5.1-fix-mail-output.diff 41
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.2 (GNU/Linux)
 
-iD8DBQFDNsh/EZCkKN40op4RAn1FAJ4kOHrB0YWWWEBH7K6jDIPYslWTWgCglXpU
-euYRUQrB4s1+QQzlegfFNkc=
-=RboR
+iD8DBQFDOVSMEZCkKN40op4RAnlXAJ0fZiK4lCo573ZyQ+iBEWAf/GFHyACffLil
++xVEEqZd2/aYQ89PSNsXTaM=
+=rNJl
 -----END PGP SIGNATURE-----
index ae32372a4b511d6bf1d1d980ddfbf76120b6d693..1ee81ddfc8ca11c3dfdff555b763b4bf13afe528 100644 (file)
@@ -1,8 +1,8 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/fcron-3.0.0.ebuild,v 1.2 2005/09/25 15:54:52 ka0ttic Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/fcron-3.0.0.ebuild,v 1.3 2005/09/27 14:17:21 ka0ttic Exp $
 
-inherit cron pam
+inherit cron pam eutils
 
 DESCRIPTION="A command scheduler with extended capabilities over cron and anacron"
 HOMEPAGE="http://fcron.free.fr/"
@@ -27,6 +27,9 @@ pkg_setup() {
                [[ -x "${EDITOR}" ]] || \
                        die "Please set the EDITOR env variable to the path of a valid executable."
        fi
+
+       ROOTUSER=$(egetent passwd 0 | cut -d':' -f1)
+       ROOTGROUP=$(egetent group 0 | cut -d':' -f1)
 }
 
 src_unpack() {
@@ -39,11 +42,15 @@ src_unpack() {
 
 src_compile() {
        local myconf
-       use doc && \
-               myconf="--with-dsssl-dir=/usr/share/sgml/stylesheets/dsssl/docbook"
 
        autoconf || die "autoconf failed"
 
+       use doc && \
+               myconf="${myconf} --with-dsssl-dir=/usr/share/sgml/stylesheets/dsssl/docbook"
+
+       [[ -n "${ROOTUSER}" ]] && myconf="${myconf} --with-rootname=${ROOTUSER}"
+       [[ -n "${ROOTGROUP}" ]] && myconf="${myconf} --with-rootgroup=${ROOTGROUP}"
+
        # QA security notice fix; see "[gentoo-core] Heads up changes in suid
        # handing with portage >=51_pre21" for more details.
        append-ldflags -Wl,-z,now
@@ -70,16 +77,16 @@ src_compile() {
 
 src_install() {
        docrondir /var/spool/cron/fcrontabs -m0770 -o cron -g cron
-       docron fcron -m0110 -o root -g root
+       docron fcron -m0110 -o ${ROOTUSER:-root} -g ${ROOTGROUP:-root}
        docrontab fcrontab -m6110 -o cron -g cron
 
        insinto /usr/bin
-       insopts -o root -g cron -m6110 ; doins fcronsighup
+       insopts -o ${ROOTUSER:-root} -g cron -m6110 ; doins fcronsighup
        insopts -o cron -g cron -m6110 ; doins fcrondyn
 
        # /etc stuff
        insinto /etc/fcron
-       insopts -m 640 -o root -g cron
+       insopts -m 640 -o ${ROOTUSER:-root} -g cron
        doins files/fcron.{allow,deny,conf}
        dosed 's:^\(fcrontabs.*=.*\)$:\1/fcrontabs:' /etc/fcron/fcron.conf \
                || die "dosed fcron.conf failed"