summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenedikt Boehm <hollow@gentoo.org>2008-10-28 12:17:34 +0000
committerBenedikt Boehm <hollow@gentoo.org>2008-10-28 12:17:34 +0000
commitdbf1271ed2d87818b4ed58722e499c7f4fb4e28b (patch)
treed3e835ad096de1a5c17fcbf1ce51c9121cffc703 /app-portage/porticron
parentFix highlighting on activity, bug 242636 (diff)
downloadgentoo-2-dbf1271ed2d87818b4ed58722e499c7f4fb4e28b.tar.gz
gentoo-2-dbf1271ed2d87818b4ed58722e499c7f4fb4e28b.tar.bz2
gentoo-2-dbf1271ed2d87818b4ed58722e499c7f4fb4e28b.zip
initial version
(Portage version: 2.1.4.5)
Diffstat (limited to 'app-portage/porticron')
-rw-r--r--app-portage/porticron/ChangeLog10
-rw-r--r--app-portage/porticron/Manifest4
-rwxr-xr-xapp-portage/porticron/files/porticron-0.155
-rw-r--r--app-portage/porticron/metadata.xml7
-rw-r--r--app-portage/porticron/porticron-0.1.ebuild19
5 files changed, 95 insertions, 0 deletions
diff --git a/app-portage/porticron/ChangeLog b/app-portage/porticron/ChangeLog
new file mode 100644
index 000000000000..d8b96b4e0850
--- /dev/null
+++ b/app-portage/porticron/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for app-portage/porticron
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-portage/porticron/ChangeLog,v 1.1 2008/10/28 12:17:34 hollow Exp $
+
+*porticron-0.1 (28 Oct 2008)
+
+ 28 Oct 2008; Benedikt Böhm <hollow@gentoo.org> +files/porticron-0.1,
+ +metadata.xml, +porticron-0.1.ebuild:
+ initial version
+
diff --git a/app-portage/porticron/Manifest b/app-portage/porticron/Manifest
new file mode 100644
index 000000000000..4287f081ab6c
--- /dev/null
+++ b/app-portage/porticron/Manifest
@@ -0,0 +1,4 @@
+AUX porticron-0.1 1287 RMD160 cd9d285c303184d053cf71238499a2725d80236c SHA1 daca9b5c56024a340b2c2e5673008c4fae3a1b08 SHA256 32f58d1855fc4721575ae5403a36619298bd98615a9ffc50766e30f96cb8e605
+EBUILD porticron-0.1.ebuild 428 RMD160 b84b35a84d314c2491f19b405bb070661c1f0546 SHA1 89c35418b9ea8e45d6d4ed70d0828fb125f1f306 SHA256 bda24ba234c827d5c27c9e39d4f2c615a576c34e812248e702240bedcf1fa0a9
+MISC ChangeLog 283 RMD160 5c7a1c3134b73fc4e354e4843af0932dfdb640aa SHA1 e935b4345de2d7b422cbc89f180650b34f3ca6b6 SHA256 e28e3fbf24bf92e0a0a17eddff20b7ae77b9b5c7c2f1345a66ea45ccb274572c
+MISC metadata.xml 203 RMD160 3e084fe2d2456cf5385b1893d42cae081cb6d66b SHA1 8b11531445faec8884c51199a4f0c6b6a6603b05 SHA256 d008cb5048614a596655d76b72a60e947d66eb1d88c7ef39ce85568e801a9a66
diff --git a/app-portage/porticron/files/porticron-0.1 b/app-portage/porticron/files/porticron-0.1
new file mode 100755
index 000000000000..ab16f6e989c2
--- /dev/null
+++ b/app-portage/porticron/files/porticron-0.1
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+SCRIPT_NAME=$(basename $0)
+FQDN=$(hostname --fqdn)
+IP=$(dig +short ${FQDN})
+DATE=$(date -R)
+PORTDIR=$(portageq portdir)
+
+# only sync portage if PORTDIR is mounted read-write
+if touch "${PORTDIR}"/.read_only_check &>/dev/null; then
+ rm -f "${PORTDIR}"/.read_only_check
+ /usr/bin/emerge --sync --quiet &>/dev/null
+fi
+
+PACKAGES=$(/usr/bin/emerge --pretend --changelog --update --deep --newuse --quiet --usepkg world 2>/dev/null)
+
+if [[ -z ${PACKAGES} ]]; then
+ exit 0
+fi
+
+cat <<EOF | sendmail -t
+To: root@${FQDN}
+From: root@${FQDN}
+Subject: Gentoo package updates on ${FQDN}
+Date: ${DATE}
+
+porticron report [${DATE}]
+========================================================================
+
+${SCRIPT_NAME} has detected that some packages need upgrading on:
+
+ ${FQDN}
+ [ ${IP} ]
+
+The following packages are currently pending an upgrade:
+
+$(echo "${PACKAGES}" | sed 's/^\[/ [/')
+
+========================================================================
+
+You can perform the upgrade by issuing the command:
+
+ emerge -NDuk world
+
+as root on ${FQDN}
+
+It is recommended that you pretend the upgrade first to confirm that
+the actions that would be taken are reasonable. The upgrade may be
+pretended by issuing the command:
+
+ emerge -NDuvpk world
+
+--
+${SCRIPT_NAME}
+EOF
diff --git a/app-portage/porticron/metadata.xml b/app-portage/porticron/metadata.xml
new file mode 100644
index 000000000000..578a86386696
--- /dev/null
+++ b/app-portage/porticron/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>hollow@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-portage/porticron/porticron-0.1.ebuild b/app-portage/porticron/porticron-0.1.ebuild
new file mode 100644
index 000000000000..0cf085e11370
--- /dev/null
+++ b/app-portage/porticron/porticron-0.1.ebuild
@@ -0,0 +1,19 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-portage/porticron/porticron-0.1.ebuild,v 1.1 2008/10/28 12:17:34 hollow Exp $
+
+DESCRIPTION="porticron is a cron script to sync portage and send update mails to root"
+HOMEPAGE="http://www.gentoo.org"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="net-dns/bind-tools"
+
+src_install() {
+ insinto /etc/cron.daily
+ newins "${FILESDIR}"/porticron-0.1 porticron
+}