diff options
author | Thilo Bangert <bangert@gentoo.org> | 2010-08-09 09:41:21 +0000 |
---|---|---|
committer | Thilo Bangert <bangert@gentoo.org> | 2010-08-09 09:41:21 +0000 |
commit | a7fc4242446d8b10cfa0329a3677a201ee87d189 (patch) | |
tree | 0adcdd55fb0f39156f03ec94a6b5e0735fe696b5 /sys-process | |
parent | x86 stable, bug 322791 (diff) | |
download | gentoo-2-a7fc4242446d8b10cfa0329a3677a201ee87d189.tar.gz gentoo-2-a7fc4242446d8b10cfa0329a3677a201ee87d189.tar.bz2 gentoo-2-a7fc4242446d8b10cfa0329a3677a201ee87d189.zip |
fix socket permissions (#328013) - thanks Pavel Labushev
(Portage version: 2.2_rc67/cvs/Linux i686)
Diffstat (limited to 'sys-process')
-rw-r--r-- | sys-process/bcron/ChangeLog | 8 | ||||
-rw-r--r-- | sys-process/bcron/bcron-0.09-r2.ebuild | 118 | ||||
-rw-r--r-- | sys-process/bcron/files/bcron-0.09-fix-socket-permissions.patch | 10 |
3 files changed, 135 insertions, 1 deletions
diff --git a/sys-process/bcron/ChangeLog b/sys-process/bcron/ChangeLog index 047c8cbeaeb0..6daa4782c828 100644 --- a/sys-process/bcron/ChangeLog +++ b/sys-process/bcron/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-process/bcron # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/bcron/ChangeLog,v 1.14 2010/01/14 18:26:42 bangert Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-process/bcron/ChangeLog,v 1.15 2010/08/09 09:41:21 bangert Exp $ + +*bcron-0.09-r2 (09 Aug 2010) + + 09 Aug 2010; Thilo Bangert <bangert@gentoo.org> +bcron-0.09-r2.ebuild, + +files/bcron-0.09-fix-socket-permissions.patch: + fix socket permissions (#328013) *bcron-0.09-r1 (14 Jan 2010) diff --git a/sys-process/bcron/bcron-0.09-r2.ebuild b/sys-process/bcron/bcron-0.09-r2.ebuild new file mode 100644 index 000000000000..311413e65169 --- /dev/null +++ b/sys-process/bcron/bcron-0.09-r2.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/bcron/bcron-0.09-r2.ebuild,v 1.1 2010/08/09 09:41:21 bangert Exp $ + +EAPI="2" + +inherit cron eutils toolchain-funcs multilib +DESCRIPTION="A new cron system designed with secure operations in mind by Bruce Guenter" + +HOMEPAGE="http://untroubled.org/bcron/" +SRC_URI="http://untroubled.org/bcron/archive/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=dev-libs/bglibs-1.106" +RDEPEND="!virtual/cron + >=sys-process/cronbase-0.3.2 + virtual/mta + sys-apps/ucspi-unix + sys-process/daemontools" +PROVIDE="virtual/cron" + +CRON_SYSTEM_CRONTAB="yes" + +src_prepare() { + epatch "${FILESDIR}/bcron-0.09-fix-parallel-build.patch" + epatch "${FILESDIR}/bcron-0.09-fix-socket-permissions.patch" +} + +src_configure() { + echo "/usr/include/bglibs" > conf-bgincs + echo "/usr/$(get_libdir)/bglibs" > conf-bglibs + echo "${D}/usr/bin" > conf-bin + echo "$(tc-getCC) ${CFLAGS}" > conf-cc + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld +} + +src_install() { + einstall || die + + #fix permissions of crontab + fperms o-rwx /usr/bin/bcrontab + fowners root:cron /usr/bin/bcrontab + + doman bcrontab.1 crontab.5 bcron-update.8 bcron-start.8 + doman bcron-spool.8 bcron-sched.8 bcron-exec.8 + + dodoc ANNOUNCEMENT NEWS README TODO + + keepdir /etc/cron.d + + keepdir /var/spool/cron/crontabs + keepdir /var/spool/cron/tmp + + for i in crontabs tmp; + do + fowners cron:cron /var/spool/cron/$i + fperms go-rwx /var/spool/cron/$i + done + + dodir /etc/bcron + + insinto /etc + doins "${FILESDIR}"/crontab + + insinto /var/lib/supervise/bcron + doins bcron-sched.run + + insinto /var/lib/supervise/bcron/log + doins bcron-sched-log.run + + insinto /var/lib/supervise/bcron-spool + doins bcron-spool.run + + insinto /var/lib/supervise/bcron-update + doins bcron-update.run +} + +pkg_config() { + cd "${ROOT}"var/lib/supervise/bcron + [ -e run ] && cp run bcron-sched.run.`date +%Y%m%d%H%M%S` + cp bcron-sched.run run + chmod u+x run + + cd "${ROOT}"/var/lib/supervise/bcron/log + [ -e run ] && cp run bcron-sched-log.run.`date +%Y%m%d%H%M%S` + cp bcron-sched-log.run run + chmod u+x run + + cd "${ROOT}"/var/lib/supervise/bcron-spool + [ -e run ] && cp run bcron-spool.run.`date +%Y%m%d%H%M%S` + cp bcron-spool.run run + chmod u+x run + + cd "${ROOT}"/var/lib/supervise/bcron-update + [ -e run ] && cp run bcron-update.run.`date +%Y%m%d%H%M%S` + cp bcron-update.run run + chmod u+x run + + [ ! -e "${ROOT}"/var/spool/cron/trigger ] && mkfifo "${ROOT}"var/spool/cron/trigger + chown cron:cron /var/spool/cron/trigger + chmod go-rwx /var/spool/cron/trigger +} + +pkg_postinst() { + echo + elog "Run " + elog "emerge --config =${PF}" + elog "to create or update your run files (backups are created) in" + elog " /var/lib/supervise/bcron (bcron daemon) and" + elog " /var/lib/supervise/bcron-spool (crontab receiver) and" + elog " /var/lib/supervise/bcron-update (system crontab updater)" + + cron_pkg_postinst +} diff --git a/sys-process/bcron/files/bcron-0.09-fix-socket-permissions.patch b/sys-process/bcron/files/bcron-0.09-fix-socket-permissions.patch new file mode 100644 index 000000000000..a8b13038e608 --- /dev/null +++ b/sys-process/bcron/files/bcron-0.09-fix-socket-permissions.patch @@ -0,0 +1,10 @@ +--- a/bcron-spool.run 2005-06-09 04:14:42.000000000 +0400 ++++ b/bcron-spool/run 2010-07-12 01:29:24.000000000 +0400 +@@ -5,6 +5,6 @@ + envuidgid cron \ + sh -c ' + exec \ +-unixserver -U ${BCRON_SOCKET:-/var/run/bcron-spool} \ ++unixserver -U ${BCRON_SOCKET:-/var/run/bcron-spool} -r 16 -p 0660 \ + bcron-spool + ' |