From 5fd06031bba3b01138ca3f2c210937b06fbadd20 Mon Sep 17 00:00:00 2001 From: Benedikt Böhm Date: Tue, 9 Dec 2008 14:18:35 +0100 Subject: add LICENSE, README and release script --- LICENSE | 25 +++++++++++++++++++++ README | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ bin/porticron | 26 ---------------------- mkrelease.sh | 17 ++++++++++++++ 4 files changed, 113 insertions(+), 26 deletions(-) create mode 100644 LICENSE create mode 100644 README create mode 100755 mkrelease.sh diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..766f87b --- /dev/null +++ b/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2008 Benedikt Böhm +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README b/README new file mode 100644 index 0000000..effb162 --- /dev/null +++ b/README @@ -0,0 +1,71 @@ +========= +porticron +========= + +:Author: `Benedikt Böhm `_ +:Version: 0.2.1 +:Web: http://bb.xnull.de/projects/porticron/ +:Source: http://git.xnull.de/gitweb/?p=porticron.git +:Download: http://bb.xnull.de/projects/porticron/dist/ + +porticron is a simple shell script for portage similar to apticron for debian. +It is called from cron to sync your portage tree and send any pending upgrade +via email. + +Installation +============ + +porticron is available via portage: +:: + + emerge porticron + +Configuration +============= + +The configuration for porticron is located at ``/etc/porticron.conf``. You can set the following options: + +SYNC_CMD + The command porticron should use to synchronize your portage tree. Defaults to ``/usr/bin/emerge --sync``. Set this to ``/bin/true`` if your portage tree is mounted read-only (e.g. via nfs). + +UPGRADE_OPTS + Command-line options that should be passed to emerge while scanning for pending upgrades. Defaults to ``--deep --update``. + +RCPT + Recipient of notification mails. Defaults to ``root@$(hostname -f)`` + +SENDMAIL + Path to sendmail binary. Defaults to ``/usr/sbin/sendmail`` + +Example +======= + +An sample of an upgrade notification looks like this: +:: + + porticron report [Tue, 09 Dec 2008 05:07:06 +0100] + ======================================================================== + + porticron has detected that some packages need upgrading: + + [ebuild U ] sys-libs/timezone-data-2008i [2008g-r1] + [ebuild U ] sys-apps/man-pages-3.14 [3.12] + [ebuild U ] sys-process/htop-0.8.1-r1 [0.8.1] + [ebuild U ] sys-apps/util-linux-2.14.1 [2.13.1.1] + [ebuild U ] app-portage/elogv-0.7.2 [0.7.1] + [ebuild U ] sys-apps/busybox-1.11.3 [1.11.1] + [ebuild U ] app-admin/eselect-1.0.11-r1 [1.0.10] + + ======================================================================== + + You can perform the upgrade by issuing the command: + + emerge --deep --update world + + as root on foo.example.com + + 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 --deep --update --pretend world diff --git a/bin/porticron b/bin/porticron index 5781a02..a8c8047 100755 --- a/bin/porticron +++ b/bin/porticron @@ -1,31 +1,5 @@ #!/bin/bash # vim: set fileencoding=utf-8 ts=4 sw=4 noexpandtab -# -# Copyright (c) 2008 Benedikt Böhm -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. The name of the author may not be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # load config : ${PORTICRON_CONF:-/etc/porticron.conf} diff --git a/mkrelease.sh b/mkrelease.sh new file mode 100755 index 0000000..ec35c74 --- /dev/null +++ b/mkrelease.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +source /etc/init.d/functions.sh + +PROJECT=porticron +VERSION=$(sed 's/^:Version: \(.*\)/\1/;t;d' README) + +mkdir -p ~/public_html/projects/${PROJECT}/dist + +ebegin "Creating release tarball" +git-archive --format=tar --prefix=${PROJECT}-${VERSION}/ HEAD | \ +bzip2 > ~/public_html/projects/${PROJECT}/dist/${PROJECT}-${VERSION}.tar.bz2 +eend $? + +ebegin "Generating project page" +rst2html.py < README > ~/public_html/projects/${PROJECT}/index.html +eend $? -- cgit v1.2.3-65-gdbad