I've started with chrysn patch and improved it. I'm using dh_autotools-dev & dh_autoreconf to update configury at build time to avoid make timestamp screw issues, which seems to be the current knowhow.
I've also have taken the liberty to fix #606516 in this debdiff. I hope this debdiff will be sponsored. With regards, Dmitrijs.
pgpIRYe6vMDfg.pgp
Description: PGP signature
=== modified file 'debian/changelog' --- gnome-schedule2.1.1-3/debian/changelog 2010-01-29 11:37:55 +0000 +++ gnome-schedule2.1.1-3.1/debian/changelog 2010-12-11 18:39:34 +0000 @@ -1,3 +1,13 @@ +gnome-schedule (2.1.1-3.1) unstable; urgency=high + + * Non-maintainer upload. + * Fix setting PYTHONPATH in an insecure way (Closes: #605167): + - Using dh_autotools-dev to update config.* + - Using dh_autoreconf to update autotools + * Set architecture to all (Closes: #606516) + + -- Dmitrijs Ledkovs <dmitrij.led...@ubuntu.com> Sat, 11 Dec 2010 11:12:35 +0000 + gnome-schedule (2.1.1-3) unstable; urgency=low * Added dpatch to fix exception Syntax error (Closes: #567406) === modified file 'debian/control' --- gnome-schedule2.1.1-3/debian/control 2010-01-29 11:37:55 +0000 +++ gnome-schedule2.1.1-3.1/debian/control 2010-12-11 18:39:00 +0000 @@ -2,12 +2,12 @@ Section: gnome Priority: optional Maintainer: Alejandro Rios P. <aler...@debian.org> -Build-Depends: debhelper (>= 7.4.3), autotools-dev, python-dev, pkg-config, python-gtk2-dev, libgtk2.0-dev, yelp, libxml-parser-perl, cron, at, scrollkeeper, python-support (>= 1.0.4), python-glade2, python-gnome2-dev, dpatch, gnome-doc-utils, python-all-dev, intltool +Build-Depends: debhelper (>= 7.4.3), autotools-dev, python-dev, pkg-config, python-gtk2-dev, libgtk2.0-dev, yelp, libxml-parser-perl, cron, at, scrollkeeper, python-support (>= 1.0.4), python-glade2, python-gnome2-dev, dpatch, gnome-doc-utils, python-all-dev, intltool, dh-autoreconf Homepage: http://gnome-schedule.sf.net/ Standards-Version: 3.8.3 Package: gnome-schedule -Architecture: any +Architecture: all Depends: ${python:Depends}, python-gtk2, at, anacron, python-gnome2, python-glade2, ${misc:Depends} Description: GNOME scheduler for automatic tasks GNOME GUI for configuring a users' cron (automatic jobs). === modified file 'debian/patches/00list' --- gnome-schedule2.1.1-3/debian/patches/00list 2010-01-29 11:37:55 +0000 +++ gnome-schedule2.1.1-3.1/debian/patches/00list 2010-12-11 10:58:07 +0000 @@ -1,2 +1,3 @@ 03_distclean xwrapper_bug567406 +bug605167-pythonpath.dpatch === modified file 'debian/patches/03_distclean.dpatch' --- gnome-schedule2.1.1-3/debian/patches/03_distclean.dpatch 2009-11-08 17:17:39 +0000 +++ gnome-schedule2.1.1-3.1/debian/patches/03_distclean.dpatch 2010-12-11 11:10:32 +0000 @@ -5,25 +5,14 @@ ## DP: don't remove gnome-doc-utils.make in the distclean target. @DPATCH@ -diff -urNad gnome-schedule-2.0.2~/Makefile.am gnome-schedule-2.0.2/Makefile.am --- gnome-schedule-2.0.2~/Makefile.am 2007-12-21 08:30:24.000000000 -0500 +++ gnome-schedule-2.0.2/Makefile.am 2008-03-09 22:49:35.000000000 -0500 @@ -11,7 +11,6 @@ intltool-merge \ intltool-update \ - po/.intltool-merge-cache \ -- gnome-doc-utils.make - - EXTRA_DIST = \ - gnome-doc-utils.make \ -diff -urNad gnome-schedule-2.0.2~/Makefile.in gnome-schedule-2.0.2/Makefile.in ---- gnome-schedule-2.0.2~/Makefile.in 2008-02-08 13:21:45.000000000 -0500 -+++ gnome-schedule-2.0.2/Makefile.in 2008-03-09 22:54:35.000000000 -0500 -@@ -239,7 +239,6 @@ - intltool-merge \ - intltool-update \ - po/.intltool-merge-cache \ -- gnome-doc-utils.make +- po/.intltool-merge-cache \ +- gnome-doc-utils.make ++ po/.intltool-merge-cache EXTRA_DIST = \ gnome-doc-utils.make \ === added file 'debian/patches/bug605167-pythonpath.dpatch' --- gnome-schedule2.1.1-3/debian/patches/bug605167-pythonpath.dpatch 1970-01-01 00:00:00 +0000 +++ gnome-schedule2.1.1-3.1/debian/patches/bug605167-pythonpath.dpatch 2010-12-11 10:57:01 +0000 @@ -0,0 +1,57 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## bug605167_hackish.dpatch by chrysn <chr...@fsfe.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Patch for debian bug #605167. + +...@dpatch@ +--- a/configure.ac ++++ b/configure.ac +@@ -10,15 +10,6 @@ AC_SUBST(PYGTK_CFLAGS) + AC_SUBST(PYGTK_LIBS) + + +-AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin) +- if test "$PKGCONFIG" != "no" ; then +- AC_MSG_CHECKING([PYTHONPATH env variable for PyGTK]) +- PYTHONPATH=$($PKGCONFIG --variable=pyexecdir pygtk-2.0) +- AC_SUBST([PYTHONPATH]) +- AC_MSG_RESULT($PYTHONPATH) +- fi +- +-export PYTHONPATH=$PYGTK_DIR:$PYTHONPATH + dnl check for libglade + AC_MSG_CHECKING(for gtk.glade) + prog=" +@@ -42,7 +33,6 @@ fi + + PKG_CHECK_MODULES(GNOMEPYTHON, gnome-python-2.0 >= 2.12.0) + +-export PYTHONPATH=$PYGTK_DIR:$PYTHONPATH + dnl check for python-gconf + AC_MSG_CHECKING(for python gconf) + prog=" +diff --git a/desktop/Makefile.in b/desktop/Makefile.in +index 76ccd31..816be0f 100644 +--- a/src/config.py.in ++++ b/src/config.py.in +@@ -21,7 +21,7 @@ version = "@VERSION@" + image_dir = "@prefix@/share/pixmaps/gnome-schedule" + gs_dir = "@prefix@/share/gnome-schedule" + glade_dir = gs_dir +-xwrapper_exec = "pythonpa...@pythonpath@/gtk-2.0/:$PYTHONPATH @PYTHON@ @prefix@/share/gnome-schedule/xwrapper.py" ++xwrapper_exec = "@PYTHON@ @prefix@/share/gnome-schedule/xwrapper.py" + locale_dir = "@prefix@/share/locale" + crontabbin = "@CRONTAB_CONFIG@" + atbin = "@AT_CONFIG@" +diff --git a/src/gnome-schedule b/src/gnome-schedule +index 2734623..1a099f4 100644 +--- a/src/gnome-schedule.in ++++ b/src/gnome-schedule.in +@@ -1,2 +1,2 @@ + #! /bin/sh +-pythonpa...@pythonpath@/gtk-2.0/:$PYTHONPATH @PYTHON@ @prefix@/share/gnome-schedule/gnome-schedule.py $1 +...@python@ @prefix@/share/gnome-schedule/gnome-schedule.py $1 +-- +1.7.2.3 + === modified file 'debian/rules' --- gnome-schedule2.1.1-3/debian/rules 2009-11-09 10:01:57 +0000 +++ gnome-schedule2.1.1-3.1/debian/rules 2010-12-11 18:16:11 +0000 @@ -18,16 +18,10 @@ CFLAGS = -Wall -g -O3 -config.status: configure +config.status: dh_testdir - for i in config.guess config.sub ; do \ - if test -e /usr/share/misc/$$i ; then \ - if ! test -e $$i.orig ; then \ - mv $$i $$i.orig ; \ - cp --remove-destination /usr/share/misc/$$i $$i ; \ - fi ; \ - fi ; \ - done + dh_autoreconf + dh_autotools-dev_updateconfig CFLAGS="$(CFLAGS)" ./configure $(CONFFLAGS) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --disable-scrollkeeper --with-help-dir=\$${prefix}/share/gnome/help --with-omf-dir=\$${prefix}/share/omf build: build-stamp @@ -49,7 +43,9 @@ dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean - dh_clean + dh_autoreconf_clean + dh_autotools-dev_restoreconfig + dh_clean install: build