# HG changeset patch # User Matthias Förste # Date 1557480996 -7200 # Node ID 475f93aa63cb0d72ef2b72b1b7fd0513c589e454 # Parent 51b2226ad231af4beef89ac96e083cc5c59d86b2 moved to git diff -r 51b2226ad231 -r 475f93aa63cb 99iusupgrade --- a/99iusupgrade Thu Oct 25 09:03:59 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -DPkg { - Pre-Invoke { - "wc -l < /var/log/apt/history.log > /tmp/lines_count.dat || true"; - }; - Post-Invoke { - "test -x /usr/sbin/apt-feed-logbuch && /usr/sbin/apt-feed-logbuch $(echo $PPID) || true"; - }; -}; diff -r 51b2226ad231 -r 475f93aa63cb Makefile --- a/Makefile Thu Oct 25 09:03:59 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -SCRIPTS = apt-feed-logbuch ius.upgrade -APTCONFDIR = /etc/apt/apt.conf.d -DEFAULTCONFDIR = /etc/default -CLEANFILES = ${SCRIPTS} -DESTDIR = -prefix = /usr -sbindir = ${prefix}/sbin - -.PHONY: all clean install - -all: $(SCRIPTS) - -clean: - -rm -f ${CLEANFILES} - -install: all - install -d -m 0755 ${DESTDIR}/${sbindir} - install -m 0755 $(SCRIPTS) ${DESTDIR}/${sbindir}/ - install -m 0644 99iusupgrade ${DESTDIR}/${APTCONFDIR}/ - install -m 0644 ius.upgrade.conf ${DESTDIR}/${DEFAULTCONFDIR}/ - -%: %.sh - @cp -f $< $@ - @chmod a-w+x $@ diff -r 51b2226ad231 -r 475f93aa63cb README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Fri May 10 11:36:36 2019 +0200 @@ -0,0 +1,1 @@ +Moved to git diff -r 51b2226ad231 -r 475f93aa63cb apt-feed-logbuch.sh --- a/apt-feed-logbuch.sh Thu Oct 25 09:03:59 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -#! /bin/sh -# -# automaticly update logbuch -# if using apt-get or aptitude command -# -# (C) 2012 by Christian Arnold - Schlittermann internet & unix support - -set -e - -unset LC_ALL -export LANG=C -export LC_CTYPE=en_US.UTF-8 - -APT_LOG="/var/log/apt/history.log" -LINES_COUNT="/tmp/lines_count.dat" -LOGBUCH_OPT="" - -if test -f /etc/default/ius.upgrade.conf; then - . /etc/default/ius.upgrade.conf -fi - -if ! test -f "$LINES_COUNT"; then - echo "$0: $LINES_COUNT is missing" >&2 - exit 0 -fi - -if ! test -s "$LINES_COUNT"; then - echo "$0: $LINES_COUNT is empty" >&2 - exit 0 -fi - -APT_CMD=$(ps -p $1 -o args=) - -# skip download-only from logbuch -if echo $APT_CMD | grep -q "[[:space:]]\+-d\|-dy\|-yd\|--download-only"; then - exit 0 -fi - -APT_TMP="/tmp/$$.tmp" -APT_OUT="/tmp/$$.out" - -if [ $APT_LOG -nt $LINES_COUNT ]; then - BEFOR=$(cat $LINES_COUNT) - AFTER=$(wc -l < $APT_LOG) - LINES=$(($AFTER - $BEFOR - 1)) - echo APT: $APT_CMD > $APT_OUT - tail -n $LINES $APT_LOG | sed -e '/^Start-Date:/d;/^Commandline:/d;/^End-Date:/d' >> $APT_TMP - perl -ne 'chomp; ($action, $packages) = split " ", $_, 2; print map { "- $action $_\n" } $packages =~ /\S+\s\(.*?\)/g' $APT_TMP >> $APT_OUT - logbuch $LOGBUCH_OPT --message=@$APT_OUT - # cleanup - rm -f $APT_TMP $LINES_COUNT $APT_OUT -fi diff -r 51b2226ad231 -r 475f93aa63cb debian/changelog --- a/debian/changelog Thu Oct 25 09:03:59 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -ius.upgrade (1.2-1.1) squeeze; urgency=low - - * Non-maintainer upload. - * optimize no logbuch entries on (apt-get|aptitude) download-only - - -- Christian Arnold Thu, 25 Oct 2012 09:01:01 +0200 - -ius.upgrade (1.2-1) squeeze; urgency=low - - * no logbuch entries on (apt-get|aptitude) download-only - - -- Christian Arnold Wed, 24 Oct 2012 13:22:29 +0200 - -ius.upgrade (1.1-0) squeeze; urgency=low - - * new upstream, fixed exits on missing history or line count file - - -- Heiko Schlittermann Wed, 08 Jun 2011 15:59:58 +0200 - -ius.upgrade (1.0-3) squeeze; urgency=low - - * works only on squeeze systems - - -- Christian Arnold Fri, 29 Apr 2011 16:24:34 +0200 - -ius.upgrade (1.0-2) stable; urgency=low - - * fixing missing /var/log/apt/history.log bug - - -- Christian Arnold Fri, 29 Apr 2011 15:49:27 +0200 - -ius.upgrade (1.0-1) stable; urgency=low - - * automaticly update logbuch if using apt-get or aptitude - - -- Christian Arnold Thu, 28 Apr 2011 11:03:48 +0200 - -ius.upgrade (0.9-1) stable; urgency=low - - * new upstream - - -- Christian Arnold Tue, 24 Mar 2009 12:31:30 +0100 - -ius.upgrade (0.8-1) stable; urgency=low - - * new upstream - - -- Marcus Obst Wed, 21 Jan 2009 12:06:44 +0100 - -ius.upgrade (0.7-1) stable; urgency=low - - * new upstream - - -- Marcus Obst Wed, 21 Jan 2009 12:06:44 +0100 - -ius.upgrade (0.6-1) stable; urgency=low - - * new upstream - - -- Heiko Schlittermann Wed, 16 Aug 2006 23:59:10 +0200 - -ius.upgrade (0.5-1) stable; urgency=low - - * new upstream - - -- Heiko Schlittermann Wed, 16 Aug 2006 23:59:10 +0200 - -ius.upgrade (0.4-1) stable; urgency=low - - * new upstream - - -- Heiko Schlittermann Wed, 3 Aug 2006 08:06:20 +0000 - -ius.upgrade (0.3-1) stable; urgency=low - - * new upstream - - -- Heiko Schlittermann Wed, 2 Aug 2006 08:06:20 +0000 - -ius.upgrade (0.2-1) stable; urgency=low - - * bug fixed - - -- Heiko Schlittermann Wed, 2 Aug 2006 08:06:20 +0000 - -ius.upgrade (0.1-1) stable; urgency=low - - * Initial Release. - - -- Heiko Schlittermann Wed, 2 Aug 2006 07:06:20 +0000 - diff -r 51b2226ad231 -r 475f93aa63cb debian/compat --- a/debian/compat Thu Oct 25 09:03:59 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -7 diff -r 51b2226ad231 -r 475f93aa63cb debian/control --- a/debian/control Thu Oct 25 09:03:59 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -Source: ius.upgrade -Section: admin -Priority: optional -Maintainer: Heiko Schlittermann -Build-Depends: debhelper (>= 7.0.50~) -Standards-Version: 3.9.1 - -Package: ius.upgrade -Architecture: all -Depends: logbuch (>= 0.17), apt (>= 0.8.10.3) -Description: short script for logging apt-get/aptitude actions to logbuch - logging all apt-get/aptitude actions automatically to logbuch diff -r 51b2226ad231 -r 475f93aa63cb debian/copyright --- a/debian/copyright Thu Oct 25 09:03:59 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -This work was packaged for Debian by: - - Christian Arnold on Tue, 28 Apr 2011 11:02:49 +0200 - -It was downloaded from: - - https://keller.schlittermann.de/hg/ius/ius.upgrade/ - -Upstream Author(s): - - Christian Arnold - -Copyright: - - Copyright (C) 2011 Schlittermann internet & unix support - -License: - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -On Debian systems, the complete text of the GNU General -Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". - -The Debian packaging is: - - Copyright (C) 2011 Christian Arnold - -and is licensed under the GPL version 3, see above. diff -r 51b2226ad231 -r 475f93aa63cb debian/dirs --- a/debian/dirs Thu Oct 25 09:03:59 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -usr/bin -usr/sbin -etc/apt/apt.conf.d -etc/default diff -r 51b2226ad231 -r 475f93aa63cb debian/docs diff -r 51b2226ad231 -r 475f93aa63cb debian/rules --- a/debian/rules Thu Oct 25 09:03:59 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -%: - dh $@ diff -r 51b2226ad231 -r 475f93aa63cb ius.upgrade.conf --- a/ius.upgrade.conf Thu Oct 25 09:03:59 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -APT_LOG="/var/log/apt/history.log" -LINES_COUNT="/tmp/lines_count.dat" -#LOGBUCH_OPT="--nomail --nodb" diff -r 51b2226ad231 -r 475f93aa63cb ius.upgrade.sh --- a/ius.upgrade.sh Thu Oct 25 09:03:59 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -#! /bin/sh - -echo "###############################################################################" -echo "# You don't need ius.upgrade to add apt-get/aptitude informations to logbuch. #" -echo "# All apt-get/aptitude actions will be logged automatically. #" -echo "###############################################################################"