Hello community, here is the log from the commit of package gnome-schedule for openSUSE:Factory checked in at 2013-03-11 07:24:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gnome-schedule (Old) and /work/SRC/openSUSE:Factory/.gnome-schedule.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "gnome-schedule", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/gnome-schedule/gnome-schedule.changes 2011-12-06 13:52:03.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.gnome-schedule.new/gnome-schedule.changes 2013-03-11 07:24:35.000000000 +0100 @@ -1,0 +2,7 @@ +Fri Mar 1 19:34:22 CET 2013 - sbrabec@suse.cz + +- Add gnome-schedule-distcheck.patch: Fix make distcheck + (bgo#694947). +- Added support for translation-update-upstream. + +------------------------------------------------------------------- New: ---- gnome-schedule-distcheck.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnome-schedule.spec ++++++ --- /var/tmp/diff_new_pack.5zbqN5/_old 2013-03-11 07:24:36.000000000 +0100 +++ /var/tmp/diff_new_pack.5zbqN5/_new 2013-03-11 07:24:36.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package gnome-schedule # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2011 Dominique Leuenberger, Amsterdam, The Netherlands. # # All modifications and additions to the file contributed by third parties @@ -17,21 +17,23 @@ # - Name: gnome-schedule Version: 2.2.0 -Release: 1 -License: GPL-2.0+ +Release: 0 Summary: Graphical interface to leverage the power of cron -Url: http://gnome-schedule.sourceforge.net/ +License: GPL-2.0+ Group: System/GUI/GNOME +Url: http://gnome-schedule.sourceforge.net/ Source: http://downloads.sourceforge.net/project/gnome-schedule/gnome-schedule-2/gnome-schedule-2-2-0/%{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM gnome-schedule-distcheck.patch bgo#694947 sbrabec@suse.cz -- Fix distcheck and generating of pot file. +Patch: gnome-schedule-distcheck.patch # Their presence is checked at build-time BuildRequires: at BuildRequires: cronie BuildRequires: fdupes BuildRequires: gnome-doc-utils-devel BuildRequires: intltool +BuildRequires: translation-update-upstream BuildRequires: update-desktop-files BuildRequires: pkgconfig(gnome-python-2.0) BuildRequires: pkgconfig(pygtk-2.0) @@ -39,8 +41,8 @@ Requires: at Requires: cronie # It does really need the libgnome bindings -Requires: python-gnome Requires: python-gconf +Requires: python-gnome BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -54,6 +56,9 @@ %lang_package %prep %setup -q +# Only this patch should be before translation-update-upstream: +%patch -p1 +translation-update-upstream %build # We need to specify where crontab lives, as configure can't find ++++++ gnome-schedule-distcheck.patch ++++++ diff --git a/src/Makefile.am b/src/Makefile.am index dafd594..a38291e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -43,7 +43,10 @@ DISTCLEANFILES = \ gnome-schedule.gladep EXTRA_DIST = \ + examples/dump.py \ + examples/surerun.sh \ $(bin_SCRIPTS) \ $(gnomeschedule_PYTHON) \ - $(ui_DATA) + gnome-schedule.glade \ + gnome-schedule-applet.xml Index: gnome-schedule-2.2.0/src/examples/dump.py =================================================================== --- /dev/null +++ gnome-schedule-2.2.0/src/examples/dump.py @@ -0,0 +1,91 @@ +# dump.py - This just dumps crontab tasks with their info to stdout +# Copyright (C) 2010 Gaute Hope <eg at gaute dot vetsj dot com> +# +# 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 2 of the License, or +# (at your option) any later version. +# +# This program 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 Library General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +#python +import sys +import os +import pwd + +sys.path.append ("../") +sys.path.append ("./") + +# g-s modules +import config +import crontab +import at + +# NEEDED FOR SUBMODULES +## +## I18N +## +import gettext +gettext.install(config.GETTEXT_PACKAGE(), config.GNOMELOCALEDIR(), unicode=1) + +poscorrect_isset = os.getenv ("POSIXLY_CORRECT", False) +manual_poscorrect = False +if poscorrect_isset == False: + os.putenv ("POSIXLY_CORRECT", "enabled") + manual_poscorrect = True + +uid = os.geteuid () +gid = os.getegid () +user = pwd.getpwuid (uid)[0] +home_dir = pwd.getpwuid (uid)[5] +user_shell = pwd.getpwuid (uid)[6] +if uid == 0: is_root = True +else: is_root = False + +# CRONTAB +# Common string representation for the different output modes +output_strings = [ + _("Default behaviour"), + _("Suppress output"), + _("X application"), + _("X application: suppress output"), + ] + +c = crontab.Crontab (is_root, user, uid, gid, home_dir) +tasks = c.read () +print "Crontab (recurrent) tasks:" +for task in tasks: + print "Task: ", task[0] + print "When: ", task[1], "[", task[5], "]" + print "Command: ", task[2] + print "Crontab line: ", task[3].strip() + print "Job ID: ", task[8] + print "Output: ", task[14], "[", output_strings[task[14]], "]" + print "Type: ", task[12], "[", task[13], "]" + print "" + +# AT +print +print "At (one-time) tasks:" +a = at.At(is_root, user, uid, gid, home_dir, manual_poscorrect) +tasks = a.read () +for task in tasks: + print "Task: ", task[0] + print "User: ", task[10] + print "When: ", task[1], "[", task[5], "]" + print "Command: ", task[2] + print "Job ID: ", task[4] + print "X application ", task[14], "[", ("yes" if (task[14] == 1) else "no"), "]" + print "Type: ", task[12], "[", task[13], "]" + print "Full script: " + print task[3] + print "" + + Index: gnome-schedule-2.2.0/src/examples/surerun.sh =================================================================== --- /dev/null +++ gnome-schedule-2.2.0/src/examples/surerun.sh @@ -0,0 +1,57 @@ +#! /bin/bash +# Copyright (C) 2010 Gaute Hope <eg at gaute dot vetsj dot com> +# +# 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 2 of the License, or +# (at your option) any later version. +# +# This program 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 Library General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Checks if a task has been run since midnight; otherwise run it +# and update timestamp. + +# State is saved in ~/.surerun; use at own risk and modify for your use. + +# usage: ./surerun.sh title command *args + +if [ $# -lt 2 ]; then + echo "Not enough arguments given" + exit 1 +fi + +title=$1 +shift +command=$@ + +statedir=~/.surerun + +midnight=$(date -d "00:00" +%s) + +if [ -e "${statedir}/${title}" ]; then + # exists, check last run + lastrun=$(cat "${statedir}/${title}") + echo "Last run: ${lastrun}" +else + lastrun=0 +fi + +if [ "${lastrun}" -le "${midnight}" ]; then + if [ ! -d "${statedir}" ]; then + mkdir -p "${statedir}" + fi + date +%s > "${statedir}/${title}" + + # run task + echo "Running: ${title}.." + $@ +fi + + -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org