Mailinglist Archive: zypp-commit (223 mails)

< Previous Next >
[zypp-commit] r10615 - in /trunk/tools/patch2mail: README patch2mail patch2mail.changes patch2mail.spec patch2mail_10.3
  • From: cboltz@xxxxxxxxxxxxxxxx
  • Date: Sun, 20 Jul 2008 19:12:45 -0000
  • Message-id: <20080720191245.575CB3B5A9@xxxxxxxxxxxxxxxx>
Author: cboltz
Date: Sun Jul 20 21:12:44 2008
New Revision: 10615

URL: http://svn.opensuse.org/viewcvs/zypp?rev=10615&view=rev
Log:
- updated patch2mail for openSUSE 11.0 (now using zypp-refresh-wrapper
and "zypper --xmlout lu" instead of zypp-checkpatches-wrapper)
(script for <= 10.3 still included)
- changed description - mentioning the used tool would need a
"if 0%{?suse_version}" which would bee overmuch ;-)
- packaged README file
- made rpmlint more happy
- version 0.9.2

Added:
trunk/tools/patch2mail/patch2mail.changes
trunk/tools/patch2mail/patch2mail_10.3 (with props)
Modified:
trunk/tools/patch2mail/README
trunk/tools/patch2mail/patch2mail
trunk/tools/patch2mail/patch2mail.spec

Modified: trunk/tools/patch2mail/README
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/tools/patch2mail/README?rev=10615&r1=10614&r2=10615&view=diff
==============================================================================
--- trunk/tools/patch2mail/README (original)
+++ trunk/tools/patch2mail/README Sun Jul 20 21:12:44 2008
@@ -1,8 +1,9 @@
patch2mail
~~~~~~~~~~

-patch2mail checks zypp-checkpatches-wrapper for available updates and
-sends a mail to root if any patches are available.
+patch2mail checks zypper (zypp-checkpatches-wrapper on openSUSE <= 10.3)
+for available updates and sends a mail to root if any patches are
+available.

Usage is very simple: just install the RPM :-)
It comes with the script in /etc/cron.daily and sends the mail to root.
@@ -22,7 +23,7 @@
License / Copyright
~~~~~~~~~~~~~~~~~~~

-Copyright (c) 2007 Christian Boltz - www.cboltz.de
+Copyright (c) 2007-2008 Christian Boltz - www.cboltz.de

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

Modified: trunk/tools/patch2mail/patch2mail
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/tools/patch2mail/patch2mail?rev=10615&r1=10614&r2=10615&view=diff
==============================================================================
--- trunk/tools/patch2mail/patch2mail (original)
+++ trunk/tools/patch2mail/patch2mail Sun Jul 20 21:12:44 2008
@@ -2,7 +2,8 @@

tmp="$(mktemp /tmp/updates.XXXXXX)"

-/usr/sbin/zypp-checkpatches-wrapper | xsltproc
/usr/share/patch2mail/patch2mail.xsl - > "$tmp"
+/usr/sbin/zypp-refresh-wrapper >/dev/null
+/usr/bin/zypper --xmlout lu | xsltproc /usr/share/patch2mail/patch2mail.xsl -
"$tmp"
grep "ERROR\|^===" "$tmp" >/dev/null || {
rm -f "$tmp"
exit 0 # no updates, no errors

Added: trunk/tools/patch2mail/patch2mail.changes
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/tools/patch2mail/patch2mail.changes?rev=10615&view=auto
==============================================================================
--- trunk/tools/patch2mail/patch2mail.changes (added)
+++ trunk/tools/patch2mail/patch2mail.changes Sun Jul 20 21:12:44 2008
@@ -0,0 +1,11 @@
+Sun Jul 20 18:20:00 CEST 2008 - cboltz
+
+- update for openSUSE 11.0 (scripts for older versions still included)
+- require cron to ensure the script is running daily
+- version 0.9.2
+
+Mon Feb 18 23:02:26 CEST 2008 - cboltz
+
+- Initial SVN commit of patch2mail
+- SVN: http://svn.opensuse.org/svn/zypp/trunk/tools/patch2mail
+- version 0.9.1

Modified: trunk/tools/patch2mail/patch2mail.spec
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/tools/patch2mail/patch2mail.spec?rev=10615&r1=10614&r2=10615&view=diff
==============================================================================
--- trunk/tools/patch2mail/patch2mail.spec (original)
+++ trunk/tools/patch2mail/patch2mail.spec Sun Jul 20 21:12:44 2008
@@ -1,7 +1,7 @@
# norootforbuild
#
Name: patch2mail
-Version: 0.9.1
+Version: 0.9.2
Release: 1
#
License: GPL
@@ -13,19 +13,20 @@
URL: http://www.cboltz.de
Source: %{name}-%{version}.tar.bz2
#
-Summary: patch2mail - patch notification via mail
+Summary: Patch notification via mail
BuildArch: noarch

-Requires: bash mktemp mail grep zypper libxslt coreutils net-tools
+Requires: bash mktemp mail grep zypper coreutils net-tools cron libxslt
# detailed requirements:
-# zypper # zypp-checkpatches-wrapper
-# libxslt # xsltproc
+# zypper # (>= 11.0) zypp-refresh-rapper, zypper
+# zypper # (<= 10.3) zypp-checkpatches-wrapper
+# libxslt # xsltproc [NOT autodetected, even if rpmlint thinks so]
# coreutils # rm
# net-tools # hostname

%description
-patch2mail checks zypp-checkpatches-wrapper for available
-updates and sends a mail to root if any patches are available
+patch2mail checks for available updates and sends a mail to root
+if any patches are available

Authors:
----------
@@ -38,17 +39,19 @@

%install
%{__mkdir} -p %{buildroot}/usr/share/%{name}
+%{__mkdir} -p %{buildroot}/etc/cron.daily

+%{__cp} patch2mail.xsl %{buildroot}/usr/share/%{name}/
%if 0%{?suse_version} < 1030
%{__cp} patch2mail.xsl_10.2
%{buildroot}/usr/share/%{name}/patch2mail.xsl
-%else
- %{__cp} patch2mail.xsl %{buildroot}/usr/share/%{name}/
%endif

-%{__mkdir} -p %{buildroot}/etc/cron.daily
%{__cp} patch2mail %{buildroot}/etc/cron.daily/
+%if 0%{?suse_version} < 1100
+ %{__cp} patch2mail_10.3 %{buildroot}/etc/cron.daily/patch2mail
+%endif

-echo === Buildroot: %{buildroot} ===
+echo ==== Buildroot: %{buildroot} ====
find %{buildroot}
echo ================================

@@ -59,4 +62,14 @@
%attr(755, root, root) /etc/cron.daily/%{name}
/usr/share/%{name}/
/usr/share/%{name}/%{name}.xsl
+%doc README
+
+%changelog
+* Sun Jul 20 2008 - cboltz
+- update for openSUSE 11.0 (scripts for older versions still included)
+- version 0.9.2
+* Mon Feb 18 2008 - cboltz
+- Initial SVN commit of patch2mail
+- SVN: http://svn.opensuse.org/svn/zypp/trunk/tools/patch2mail
+- version 0.9.1


Added: trunk/tools/patch2mail/patch2mail_10.3
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/tools/patch2mail/patch2mail_10.3?rev=10615&view=auto
==============================================================================
--- trunk/tools/patch2mail/patch2mail_10.3 (added)
+++ trunk/tools/patch2mail/patch2mail_10.3 Sun Jul 20 21:12:44 2008
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+tmp="$(mktemp /tmp/updates.XXXXXX)"
+
+/usr/sbin/zypp-checkpatches-wrapper | xsltproc
/usr/share/patch2mail/patch2mail.xsl - > "$tmp"
+grep "ERROR\|^===" "$tmp" >/dev/null || {
+ rm -f "$tmp"
+ exit 0 # no updates, no errors
+}
+
+grep -v "^__TOTAL__" "$tmp" | mail -s "$(hostname) updates" root
+# echo "*** $(hostname) updates ***"; grep -v "^__TOTAL__" "$tmp"
+rm -f "$tmp"

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages