[Pkg-cron-devel] [SCM] Git repository for pkg-cron branch, sf3, updated. debian/3.0pl1-109-20-gde88d23

Christian Kastner debian at kvr.at
Sat Sep 24 22:26:46 UTC 2011


The following commit has been merged in the sf3 branch:
commit eb60d9b226b0075cdd627917e7f067fa627464bf
Author: Christian Kastner <debian at kvr.at>
Date:   Thu Sep 22 19:45:00 2011 +0200

    Sync debian/ with master
    
    The source format is irrelevant to all but the source/ and patches/ dirs, so
    sync it in one go. The entire history can be found in the master branch.

diff --git a/debian/NEWS b/debian/NEWS
index 689d429..8f3277c 100644
--- a/debian/NEWS
+++ b/debian/NEWS
@@ -1,3 +1,15 @@
+cron (3.0pl1-119) unstable; urgency=low
+
+    The semantics of the -L option of the cron daemon have changed: from
+    now on, the value will be interpreted as a bitmask of various log
+    selectors, with "1" (log only the start of jobs) being the new default.
+
+    Additionally, since -117 (NEWS entry was overlooked), the LSBNAMES
+    variable in /etc/default/cron was merged with the EXTRA_OPTS variable
+    as it was redundant.
+
+ -- Christian Kastner <debian at kvr.at>  Sun, 07 Aug 2011 21:13:19 +0200
+
 cron (3.0pl1-110) unstable; urgency=low
 
     In the past, long-running jobs caused certain MTAs to time out,
@@ -19,4 +31,3 @@ cron (3.0pl1-74) unstable; urgency=low
     package.
 
  -- Steve Greenland <stevegr at debian.org>  Sat,  6 Sep 2003 17:15:03 -0500
-
diff --git a/debian/README.debian b/debian/README.Debian
similarity index 87%
rename from debian/README.debian
rename to debian/README.Debian
index 7f79c4a..a2c396a 100644
--- a/debian/README.debian
+++ b/debian/README.Debian
@@ -5,7 +5,7 @@ This is the Debian GNU/Linux prepackaged and heavily modified version
 of Paul Vixie's cron subsystem.
 
 Debian's cron development is being done on Alioth:
-http://svn.debian.org/wsvn/pkg-cron
+http://anonscm.debian.org/gitweb/?p=pkg-cron/cron.git
 
 This package was put together by Ian Jackson <iwj10 at cus.cam.ac.uk>,
 from the standard sources to 3.0pl1, as posted to comp.sources.unix.
@@ -35,3 +35,7 @@ deny file:     /etc/cron.deny
 
 This package is now maintained by Javier Fernández-Sanguino Peña
 <jfs at computer.org> and Christian Kastner <debian at kvr.at>.
+
+Historical note: The old subversion repository from before the
+migration to git can be found here:
+ http://svn.debian.org/wsvn/pkg-cron
diff --git a/debian/TODO b/debian/TODO
index 9eb807b..6033c94 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -14,11 +14,6 @@ TODO stuff
   the system. 
   This might imply fixing #304036 (which might help fix #312614 too BTW)
 
-- Greatly improve change detection code for /etc/cron.d. Currently, only
-  broken symlinks are handled correctly. Other errors (bad file owner,
-  bad file permissions) require a restart.
-  NOTE: The broken-symlink-code can be generalized and adapted for this
-
 - Debate changing the policy of /etc/cron.d being a drop-in for packages
   only vs. a general drop-in for crontabs
 
diff --git a/debian/changelog b/debian/changelog
index 9cbc805..af0b998 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,174 @@
+cron (3.0pl1-120) unstable; urgency=low
+
+  * do_command.c, cron.h, cron.8: Change the behaviour when logging the
+    information of the child processes. A new loglevel (8) is introduced and
+    documented in cron.8. The previous log format is kept unless the sysadmin
+    choses to select this new option.   (Closes: 637295) 
+  * debian/examples/cron-stats.pl: Adjust the script with the
+    changes introduced in the logging behaviour.
+  * cron.8: Fix minor formatting errors
+  * debian/cron.bug-script:
+      - Report properly on the EDITOR variable
+      - Report the permissions and contents of all relevant cron directories
+  * debian/changelog: Typo fixes and missing information
+  * crontab.5: 
+      - Document limitations of the periods that can be defined in crontab
+        syntax and provide workarounds (Closes: 640086)
+      - Document limitation of the use of @reboot due to the definition
+        of the boot sequence as suggested by Regid Ichira.
+  * debian/source/lintian-overrides: Add overrides file for lintian
+    required because the maintainer name in debian/changelog and in
+    debian/control do not match due to encoding.
+  [ Christian Kastner ]
+  * debian/control:
+    - Fix broken Vcs-* URLs
+  * debian/NEWS: Remove previous spurious entry from 3.0pl1-110.
+
+ -- Javier Fernández-Sanguino Peña <jfs at debian.org>  Fri, 09 Sep 2011 23:25:35 +0200
+
+cron (3.0pl1-119) unstable; urgency=low
+
+  * The development team has migrated from Subversion to git, with the latter
+    becoming authoritative immediately. A log of the migration process can be
+    found in debian/svn-git-migration.txt.
+
+  [ Javier Fernandez-Sanguino ]
+  * debian/NEWS:
+    - Remove the entry introduced in the previous version until an agreement is
+      reached on the desired behaviour (Reopens: #608774)
+  * debian/standard.daily: 
+    - Work properly if mount points have a space (Closes: #633972)
+    - Sanity check mount point value before generating an error
+  * Add one new example script:
+     - cron-tasks-review.sh: Reviews the files that exist in /etc/cron.d
+       and in /etc/cron.{hourly,daily,weekly,monthly} to find those that
+       will not be run by cron due to some error.
+  * debian/copyright:
+    - Adjust debian/copyright to acknowledge the (c) and license of the new
+      example script.
+  * debian/control:
+     - Remove Steve from the Uploaders field, no longer needed there
+  * cron.8: 
+     - Document the Debian specific changes in a separate section, describing
+     how /etc/cron.{hourly,daily,weekly,monthly} and /etc/cron.d behave
+     and should be used.
+
+  [ Christian Kastner ]
+  * debian/control:
+    - Updated Vcs-* URLs to point to the new git repository
+  * debian/cron.c, database.c:
+    - Interpret the "-L" option of the daemon as a bitmask, and add initial
+      support for three selectors: start, stop, end
+  * database.c, cron.c, cron.h, debian/copyright:
+    - Check orphaned crontabs for adoption. Fix taken from Fedora cronie.
+      Closes: #634926
+  * do_command.c:
+    - When logging a job run, prefix the command text with the PID of the
+      process. Closes: #609780
+  * debian/NEWS:
+    - Added entry documenting the change of the "-L" option as well as the
+      dropping of LSBNAMES in -117.
+
+ -- Javier Fernandez-Sanguino Pen~a <jfs at debian.org>  Wed, 08 Jun 2011 20:44:49 +0200
+
+cron (3.0pl1-118) unstable; urgency=low
+
+  * debian/control
+    - Limited Build-Depends for libaudit-dev to linux-any. I erroneously
+      assumed it applied to other OSes as well.
+  * debian/rules
+    - DEB_BUILD_OPTIONS for audit support is limited to Linux platforms
+
+  [ Javier Fernandez-Sanguino]
+  * debian/NEWS
+    - Document the new behaviour of cron regarding logging of non-zero
+      exit status cronjobs (Closes: #608874)
+
+ -- Christian Kastner <debian at kvr.at>  Tue, 31 May 2011 14:50:34 +0200
+
+cron (3.0pl1-117) unstable; urgency=low
+
+  * Makefile:
+    - Fixed integration of cron-internal debug code into the package building
+      process. Instead of having to modify debian/rules, this can now driven by
+      DEB_BUILD_OPTIONS=debug
+    - Removed hard-coded compiler flags, honoring those provided by
+      dpkg-buildflags instead
+  * do_command.c:
+    - When logging the end of cron jobs, log the PID of the actually exec'ed
+      user command, not the PID of the parent. Closes: #609780
+  * database.c:
+    - Split crontab security checks (type, owner, mode, links) into separate
+      tests with individual error messages instead of the cryptic message
+      "WRONG INODE INFO". Closes: #625493
+    - Extended the ability to recover from broken symlinks (added in -110) to
+      also recover from failed security checks above. Fixes to these were not
+      being detected as cron only looks at mtime. Closes: #625495
+    - Also recover from syntax errors. Fixes to these did change mtime, but
+      were ignored as cron permanently removes broken crontabs from its
+      database of files to check. Closes: #627859
+  * cron.8:
+    - Documented the fact that /etc/crontab and files in /etc/cron.d must not
+      be group- or other-writable. Closes: #625491, LP: #741979
+  * crontab.5:
+    - Specify parse order of crontabs (thanks, Jonathan Amery). Closes: #622645
+  * debian/control:
+    - Bumped Standards-Version to 3.9.2 (no changes needed)
+    - Added missing Build-Depends on libaudit-dev
+    - Removed Conflicts for nonexistent package suidmanager
+    - Removed Conflicts for lockfile-progs (which should have been a Breaks
+      anyway) as we no longer rely on it, we use flock from util-linux instead
+    - Changed architecture-specific Build-Depends on libselinux1-dev to
+      linux-any instead of negating all other OSes
+  * debian/cron.default:
+    - Merged the LSBNAMES option with EXTRA_OPTS. Both where used to pass
+      options to the daemon, making one of them redundant
+    - Added the ability to disable the daily lost+found check by setting the
+      new variable CHECK_LOSTFOUND to "no". Closes: #579640
+  * debian/cron.init:
+    - Don't call start-stop-daemon directly, use LSB init functions instead.
+      Among other things, this works around the cron daemon not deleting its
+      pidfile from /var/run/. Closes: #615855, 622348
+    - Added $network to Should-Start
+  * debian/rules:
+    - Converted to dh syntax. This included replacing some manually executed
+      steps with debhelper file-automated ones (eg: cron.man, cron.examples)
+      to lessen clutter
+    - Completely rewrote the PAM/SELinux/audit integration parts. PAM support
+      was being skipped on kfreebsd and hurd, and audit support was completely
+      broken. From now on:
+      + PAM is enabled by default on all platforms
+      + SELinux is enabled by default on linux-any
+      + audit is disabled by default on all platforms
+      All of these can be driven by DEB_BUILD_OPTIONS (see debian/rules)
+    - Do not compress example perl scripts
+  * debian/{prerm,postrm,postinst}:
+    - Let dh_installinit manage stopping/(re)starting of jobs instead of
+      calling invoke-rc.d ourselves
+  * debian/standard.daily:
+    - Backup of /etc/{passd,group} is no longer performed by cron; the task
+      was handed over to src:shadow (see #554170). In Squeeze, this task will
+      be performed redundantly by both packages (as discussed on
+      debian-release)
+    - Rewrite locking and lost+found-checking code, based on a submission to
+      the BTS by Justin B. Rye. Closes: #478967, #537073, LP: #257367
+    - Parse /etc/mtab instead of /proc/mounts; the former makes handling bind
+      mounts easier. Closes: #578856
+    - Pull in /etc/cron/default for CHECK_LOSTFOUND (see above)
+  * debian/copyright:
+    - Convert to DEP5 format (r173)
+  * debian/watch:
+    - Added watch file to silence a lintian warning, even though the last
+      upstream release was in 2004
+  * Packaging (general): removed a lot of cruft which seems to have accumulated
+    over time. This included all the cron-se stuff, which appears to have been
+    a remnant from the SELinux integration process, and was either not being
+    used anymore or completely broken. Also, the patches/ directory was
+    removed, as that location has a specific meaning and the patches in there
+    were no longer relevant.
+
+ -- Christian Kastner <debian at kvr.at>  Sun, 08 May 2011 01:21:15 +0200
+
 cron (3.0pl1-116) unstable; urgency=high
 
   * Upload with approval from Release Team to get RC bug fixes in Squeeze
@@ -7,7 +178,7 @@ cron (3.0pl1-116) unstable; urgency=high
   * do_command.c:
     - Close an unused stream in the fork()ed child prior to exec'ing the
       user's command, thereby avoiding an fd leak. Closes: #604181, LP: #665912
-      Previously to this, in conjunction with LVM, the fd leak may have the
+      Previous to this, and in conjunction with LVM, the fd leak may have the
       effect of the user being spammed by warnings every time a cron job was
       executed.
   * crontab.5:
@@ -97,7 +268,7 @@ cron (3.0pl1-112) unstable; urgency=low
   * do_command.c:
     - Don't send mail when a job exits non-zero, only send mail if the job sent
       output to stderr. This behaviour was introduced erroneously; while it
-      does have merit, it is completly against standard cron behaviour.
+      does have merit, it is completely against standard cron behaviour.
       Closes: #581612
   * debian/compat:
     - Bumped debhelper compatibility to 7
@@ -442,7 +613,7 @@ cron (3.0pl1-100) unstable; urgency=low
 cron (3.0pl1-99) unstable; urgency=low
 
   * Fix the test for anacron in /etc/crontab that would make cron run the
-    run-parts regardless of wether anacron was installed or not, thanks to
+    run-parts regardless of whether anacron was installed or not, thanks to
     Paul Kimoto for spotting the bug introduced in the fix to #383857 
     (Closes: #392600)
   * Fix lintian error by adding a comment line in the init.d script
diff --git a/debian/control b/debian/control
index 952efb8..9344d56 100644
--- a/debian/control
+++ b/debian/control
@@ -2,21 +2,36 @@ Source: cron
 Section: admin
 Priority: important
 Maintainer: Javier Fernandez-Sanguino Pen~a <jfs at debian.org>
-Uploaders: Christian Kastner <debian at kvr.at>, Steve Greenland <stevegr at debian.org>
-Standards-Version: 3.9.1
-Build-Depends: debhelper (>= 7.2.3~), libpam0g-dev, libselinux1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
+Uploaders: Christian Kastner <debian at kvr.at>
+Standards-Version: 3.9.2
+Build-Depends:
+    debhelper (>= 7.2.3~),
+    libpam0g-dev,
+    libselinux1-dev [linux-any],
+    libaudit-dev [linux-any]
 Homepage: http://ftp.isc.org/isc/cron/
-Vcs-Svn: svn://svn.debian.org/svn/pkg-cron
-Vcs-Browser: http://svn.debian.org/viewsvn/pkg-cron
+Vcs-Git: git://git.debian.org/git/pkg-cron/pkg-cron.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-cron/pkg-cron.git
 
 Package: cron
 Architecture: any
-Pre-Depends: dpkg (>= 1.15.7.2)
-Depends: ${shlibs:Depends}, ${misc:Depends}, debianutils (>=1.7), adduser, lsb-base (>= 3.0-10), libpam-runtime (>= 1.0.1-11)
-Recommends: exim4 | postfix | mail-transport-agent, lockfile-progs
-Suggests: anacron (>=2.0-1), logrotate, checksecurity
-Conflicts: suidmanager (<< 0.50), lockfile-progs (<< 0.1.7)
-Breaks: dpkg (<< 1.15.4)
+Pre-Depends:
+    dpkg (>= 1.15.7.2)
+Depends:
+    ${shlibs:Depends},
+    ${misc:Depends},
+    debianutils (>= 1.7),
+    adduser,
+    lsb-base (>= 3.0-10),
+    libpam-runtime (>= 1.0.1-11)
+Recommends:
+    exim4 | postfix | mail-transport-agent
+Suggests:
+    anacron (>=2.0-1),
+    logrotate,
+    checksecurity
+Breaks:
+    dpkg (<< 1.15.4)
 Provides: cron-daemon
 Description: process scheduling daemon
  The cron daemon is a background process that runs particular programs at
@@ -29,9 +44,5 @@ Description: process scheduling daemon
  as well so that you can receive these messages.
  .
  This cron package is configured by default to do some basic daily system
- maintenance tasks, such as creating backups of key system files. Other
- packages, such as checksecurity, can provide further maintenance tasks.
- .
- The lockfile-progs package is recommended as it will prevent
- /etc/cron.daily/standard from running multiple
- times if something gets jammed.
+ maintenance tasks. Other packages, such as checksecurity, can provide further
+ maintenance tasks.
diff --git a/debian/copyright b/debian/copyright
index 9070f18..3c7da54 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,50 +1,87 @@
-Copyright 1988,1990,1993,1994 by Paul Vixie;
-All rights reserved
+Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=173
+Upstream-Name: vixie-cron
+Ustream-Contact: Paul Vixie <paul at vix.com>
+Source:
+ The original source for this package could be obtained from 
+ ftp://ftp.vix.com/pub/vixie/cron-3.0, although that link appears to have gone
+ down.
 
-Distribute freely, except: don't remove my name from the source or
-documentation (don't take credit for my work), mark your changes (don't
-get me blamed for your possible bugs), don't alter or remove this
-notice.  May be sold if buildable source is provided to buyer.  No
-warranty of any kind, express or implied, is included with this
-software; use at your own risk, responsibility for damages (if any) to
-anyone resulting from the use of this software rests entirely with the
-user.
+Files: *
+Copyright: 1988, 1990, 1993, 1994, Paul Vixie <paul at vix.com>
+           1994, Ian Jackson <ian at davenant.greenend.org.uk>
+           1996-2005, Steve Greenland <stevegr at debian.org>
+           2005-2006, 2008-2010, Javier Fernández-Sanguino Peña <jfs at debian.org>
+           2010-2011, Christian Kastner <debian at kvr.at>
+           Numerous contributions via the Debian BTS copyright their respective authors
+License: Paul Vixie's license
 
+Files: database.c
+Copyright: 1988, 1990, 1993, 1994 Paul Vixie <paul at vix.com>
+           1996-2005, Steve Greenland <stevegr at debian.org>
+           2003, Clint Adams <schizo at debian.org>
+           2010-2011, Christian Kastner <debian at kvr.at>
+           2011, Red Hat, Inc.
+License: Paul Vixie's license and GPL-2+ and ISC
 
-The original source for this package could be obtained from 
-ftp://ftp.vix.com/pub/vixie/cron-3.0, although that link appears to have gone
-down.
+Files: debian/examples/cron-stats.pl
+Copyright: 2006, Javier Fernández-Sanguino Peña <jfs at debian.org>
+License: GPL-2+
 
-Modifications for Debian GNU/Linux Copyright 1994 Ian Jackson;
-Copyright (C) 1994 Ian Jackson
-Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Steve Greenland
-Copyright (C) 2005, 2006, 2008, 2009, 2010 Javier Fernández-Sanguino Peña
-Copyright (C) 2010 Christian Kastner
-Numerous contributions via the Debian BTS copyright their respective authors
+Files: debian/examples/cron-tasks-review.sh
+Copyright: 2011, Javier Fernández-Sanguino Peña <jfs at debian.org>
+License: GPL-2+
 
-Code and regex in database.c/valid_name() based on the run-parts program
-in the Debian "debianutils" package, created by Clint Adams and others. It is
-licensed under the GNU General Public License version 2 or later (see below).
+Files: debian/examples/crontab2english.pl
+Copyright: 2001, Sean M. Burke
+License: Artistic
 
+License: Paul Vixie's license
+ Distribute freely, except: don't remove my name from the source or
+ documentation (don't take credit for my work), mark your changes (don't
+ get me blamed for your possible bugs), don't alter or remove this
+ notice.  May be sold if buildable source is provided to buyer.  No
+ warranty of any kind, express or implied, is included with this
+ software; use at your own risk, responsibility for damages (if any) to
+ anyone resulting from the use of this software rests entirely with the
+ user.
 
-This package includes in the examples directory the  crontab2english script
-written by Sean M. Burke.  This script is Copyright 2001 Sean M. Burke
-and is distributed with the following licensing terms:
+License: GPL-2+
+ This package 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 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 <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
 
-This library is free software; you can redistribute it and/or modify it under
-the same terms as Perl itself. In Debian GNU/Linux you can find Perl's Artistic
-license at /usr/share/common-licenses/Artistic
+License: Artistic
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the "Artistic License" which comes with Debian.
+ .
+ THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES
+ OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ .
+ On Debian systems, the complete text of the Artistic License
+ can be found in "/usr/share/common-licenses/Artistic".
 
-
-This package includes in the examples directory the stats-cron script
-written by Javier Fernandez-Sanguino.  This script is Copyright 2006
-Javier Fernandez-Sanguino and is distributed with the following licensing
-terms:
-
-#    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.
-
-In Debian GNU/Linux you can find a copy of the above licenses at
-/usr/share/common-licenses.
+License: ISC
+ Permission to use, copy, modify, and distribute this software for any 
+ purpose with or without fee is hereby granted, provided that the above
+ copyright notice and this permission notice appear in all copies.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR 
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 
+ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/debian/cron-se.dirs b/debian/cron-se.dirs
deleted file mode 100644
index ca882bb..0000000
--- a/debian/cron-se.dirs
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin
-usr/sbin
diff --git a/debian/cron-se.install b/debian/cron-se.install
deleted file mode 100644
index ba2fab1..0000000
--- a/debian/cron-se.install
+++ /dev/null
@@ -1,3 +0,0 @@
-b-cron-se/cron usr/sbin
-b-cron-se/crontab usr/bin
-b-cron-se/cron-se usr/share/lintian/overrides
\ No newline at end of file
diff --git a/debian/cron-se.overrides b/debian/cron-se.overrides
deleted file mode 100644
index 15360f4..0000000
--- a/debian/cron-se.overrides
+++ /dev/null
@@ -1,2 +0,0 @@
-cron-se: binary-without-manpage cron
-cron-se: binary-without-manpage crontab
diff --git a/debian/cron-se.postinst b/debian/cron-se.postinst
deleted file mode 100644
index d5ba3e1..0000000
--- a/debian/cron-se.postinst
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-set -e
-
-# Fixup crontab binary, directory and files for new group 'crontab'.
-
-if ! dpkg-statoverride --list /usr/bin/crontab > /dev/null ; then
-    dpkg-statoverride --update --add root crontab 2755 /usr/bin/crontab
-fi
-
-if [ -x /etc/init.d/cron ]; then
-	if [ -x /usr/sbin/invoke-rc.d ] ; then
-	       invoke-rc.d cron restart
-	else
-	       /etc/init.d/cron restart
-	fi
-fi
-
-
-
-#DEBHELPER#
diff --git a/debian/cron-se.postrm b/debian/cron-se.postrm
deleted file mode 100644
index de7c179..0000000
--- a/debian/cron-se.postrm
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-set -e
-
-if [ remove = "$1" ]; then
-    dpkg-divert --package cron-se --remove --rename \
-        --divert /usr/sbin/cron.cron /usr/sbin/cron
-    dpkg-divert --package cron-se --remove --rename \
-        --divert /usr/bin/crontab.cron /usr/bin/crontab
-fi
-
-# Restart non-se cron
-if [ -x /etc/init.d/cron ]; then
-	if [ -x /usr/sbin/invoke-rc.d ] ; then
-	       invoke-rc.d cron restart
-	else
-	       /etc/init.d/cron restart
-	fi
-fi
-
-#DEBHELPER#
diff --git a/debian/cron-se.preinst b/debian/cron-se.preinst
deleted file mode 100644
index e9bea18..0000000
--- a/debian/cron-se.preinst
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-set -e
-
-if [ install = "$1"  ]; then
-    dpkg-divert --package cron-se --add --rename \
-        --divert /usr/sbin/cron.cron /usr/sbin/cron
-    dpkg-divert --package cron-se --add --rename \
-        --divert /usr/bin/crontab.cron /usr/bin/crontab
-fi
-
-#DEBHELPER#
diff --git a/debian/cron-se.prerm b/debian/cron-se.prerm
deleted file mode 100644
index 8be5e3f..0000000
--- a/debian/cron-se.prerm
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-set -e
-
-if [ -x /etc/init.d/cron ]; then
-	if [ -x /usr/sbin/invoke-rc.d ] ; then
-	       invoke-rc.d cron stop
-	else
-	       /etc/init.d/cron stop
-	fi
-fi
-
-#DEBHELPER#
diff --git a/debian/cron.bug-script b/debian/cron.bug-script
index 0c0cf18..34a62d2 100644
--- a/debian/cron.bug-script
+++ b/debian/cron.bug-script
@@ -5,10 +5,14 @@
 exec 1>&3 2>&3
 
 echo "--- EDITOR:"
-[ -n "$EDITOR" ] || echo "not set"
+if [ -n "$EDITOR" ] ; then
+       	echo "not set"
+else
+       	echo $EDITOR
+fi
 echo
 
-echo "--- usr/bin/editor:"
+echo "--- /usr/bin/editor:"
 readlink -f /usr/bin/editor
 echo
 
@@ -16,10 +20,9 @@ echo "--- /usr/bin/crontab:"
 ls -l /usr/bin/crontab
 echo
 
-echo "--- /var/spool/cron"
-ls -ld /var/spool/cron
-echo
+for dir in /var/spool/cron /var/spool/cron/crontabs /etc/cron.d /etc/cron.daily /etc/cron.hourly /etc/cron.monthly /etc/cron.weekly ; do
+	echo "--- $dir:"
+	ls -ld $dir
+	echo
+done
 
-echo "--- /var/spool/cron/crontabs"
-ls -ld /var/spool/cron/crontabs
-echo
diff --git a/debian/cron.default b/debian/cron.default
index 9839271..3007648 100644
--- a/debian/cron.default
+++ b/debian/cron.default
@@ -1,8 +1,5 @@
 # Cron configuration options
 
-# Uncomment this option for LSB name support in /etc/cron.d/
-#LSBNAMES='-l'  
-
 # Whether to read the system's default environment files (if present)
 # If set to "yes", cron will set a proper mail charset from the
 # locale information. If set to something other than 'yes', the default
@@ -13,5 +10,21 @@
 READ_ENV="yes"
 
 # Extra options for cron, see cron(8)
-# For example, set a higher log level to audit cron's work
-# EXTRA_OPTS="-L 2"
+#
+# For example, to enable LSB name support in /etc/cron.d/, use
+# EXTRA_OPTS='-l'  
+#
+# Or, to log standard messages, plus jobs with exit status != 0:
+# EXTRA_OPTS='-L 5'
+#
+# For quick reference, the currently available log levels are:
+#   0   no logging (errors are logged irregardless)
+#   1   log start of jobs
+#   2   log end of jobs
+#   4   log jobs with exit status != 0
+#   8   log the process identifier of child process (in all logs)
+#
+#EXTRA_OPTS=""
+
+# Uncomment to disable lost+found check
+#CHECK_LOSTFOUND=no
diff --git a/debian/cron.examples b/debian/cron.examples
new file mode 100644
index 0000000..55b78ae
--- /dev/null
+++ b/debian/cron.examples
@@ -0,0 +1 @@
+debian/examples/*
diff --git a/debian/cron.init b/debian/cron.init
index f07d86d..83cfc61 100644
--- a/debian/cron.init
+++ b/debian/cron.init
@@ -5,8 +5,8 @@
 # Provides:          cron
 # Required-Start:    $remote_fs $syslog $time
 # Required-Stop:     $remote_fs $syslog $time
-# Should-Start:      $named slapd autofs ypbind nscd nslcd
-# Should-Stop:       $named slapd autofs ypbind nscd nslcd
+# Should-Start:      $network $named slapd autofs ypbind nscd nslcd
+# Should-Stop:       $network $named slapd autofs ypbind nscd nslcd
 # Default-Start:     2 3 4 5
 # Default-Stop:
 # Short-Description: Regular background program processing daemon
@@ -16,17 +16,18 @@
 #                    security and more powerful configuration options.
 ### END INIT INFO
 
-
-test -f /usr/sbin/cron || exit 0
-
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DESC="cron daemon"
+NAME=cron
+DAEMON=/usr/sbin/cron
 PIDFILE=/var/run/crond.pid
-# In some systems the pidfile might be (incorrectly) set to /etc
-# if this pidfile is present, use it instead.
-[ -e /etc/cron.pid ] && PIDFILE=/etc/crond.pid
-[ -r /etc/default/cron ] && . /etc/default/cron
+SCRIPTNAME=/etc/init.d/"$NAME"
+
+test -f $DAEMON || exit 0
 
 . /lib/lsb/init-functions
 
+[ -r /etc/default/cron ] && . /etc/default/cron
 
 # Read the system's locale and set cron's locale. This is only used for
 # setting the charset of mails generated by cron. To provide locale
@@ -58,45 +59,30 @@ parse_environment ()
 
 # Parse the system's environment
 if [ "$READ_ENV" = "yes" ] ; then
-    export LANG LC_ALL LC_CTYPE TZ LC_COLLATE
     parse_environment
-    LC_COLLATE=C # Force collation sequence since ASCII is expected in regexps
 fi
 
 
 case "$1" in
 start)	log_daemon_msg "Starting periodic command scheduler" "cron"
-        start-stop-daemon --start --quiet --pidfile $PIDFILE --name cron --startas /usr/sbin/cron -- $LSBNAMES $EXTRA_OPTS
+        start_daemon -p $PIDFILE $DAEMON $EXTRA_OPTS
         log_end_msg $?
 	;;
 stop)	log_daemon_msg "Stopping periodic command scheduler" "cron"
-        start-stop-daemon --stop --quiet --pidfile $PIDFILE --name cron
+        killproc -p $PIDFILE $DAEMON
         log_end_msg $?
         ;;
 restart) log_daemon_msg "Restarting periodic command scheduler" "cron" 
-        start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE --name cron
-        start-stop-daemon --start --quiet --pidfile $PIDFILE --name cron --startas /usr/sbin/cron -- $LSBNAMES $EXTRA_OPTS
-        log_end_msg $?
+        $0 stop
+        $0 start
         ;;
 reload|force-reload) log_daemon_msg "Reloading configuration files for periodic command scheduler" "cron"
 	# cron reloads automatically
         log_end_msg 0
         ;;
 status)
-       log_action_begin_msg "Checking periodic command scheduler"
-       if pidofproc -p "$PIDFILE" >/dev/null; then
-            log_action_end_msg 0 "running"
-            exit 0
-       else
-           if [ -e "$PIDFILE" ]; then
-                log_action_end_msg 1 "failed to start"
-                exit 1
-           else
-                log_action_end_msg 0 "not running"
-                exit 3
-           fi
-       fi
-         ;;
+        status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
+        ;;
 *)	log_action_msg "Usage: /etc/init.d/cron {start|stop|status|restart|reload|force-reload}"
         exit 2
         ;;
diff --git a/debian/cron.manpages b/debian/cron.manpages
new file mode 100644
index 0000000..2e0a148
--- /dev/null
+++ b/debian/cron.manpages
@@ -0,0 +1,3 @@
+cron.8
+crontab.1
+crontab.5
diff --git a/debian/cron.pam b/debian/cron.pam
index ff5d15d..11d9b52 100644
--- a/debian/cron.pam
+++ b/debian/cron.pam
@@ -1,6 +1,4 @@
-#
 # The PAM configuration file for the cron daemon
-#
 
 @include common-auth
 
@@ -13,8 +11,8 @@ session       required   pam_env.so envfile=/etc/default/locale
 
 @include common-account
 @include common-session-noninteractive 
+
 # Sets up user limits, please define limits for cron tasks
 # through /etc/security/limits.conf
 session    required   pam_limits.so
 
-
diff --git a/debian/crontab.main b/debian/crontab.main
index 0b8b0c4..95edd9b 100644
--- a/debian/crontab.main
+++ b/debian/crontab.main
@@ -13,5 +13,3 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 47 6	* * 7	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
 52 6	1 * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
 #
-
-
diff --git a/debian/dirs b/debian/dirs
index 7bd1f12..4b11abb 100644
--- a/debian/dirs
+++ b/debian/dirs
@@ -1,13 +1,8 @@
 usr/bin
 usr/sbin
-usr/share/man/man1
-usr/share/man/man5
-usr/share/man/man8
 etc/cron.hourly
 etc/cron.daily
 etc/cron.weekly
 etc/cron.monthly
 etc/cron.d
-etc/init.d
-etc/pam.d
 var/spool/cron/crontabs
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..439f071
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,4 @@
+FEATURES
+THANKS
+README
+debian/README.anacron
diff --git a/debian/examples/stats-cron.pl b/debian/examples/cron-stats.pl
similarity index 87%
rename from debian/examples/stats-cron.pl
rename to debian/examples/cron-stats.pl
index 0427eb8..7b47e95 100644
--- a/debian/examples/stats-cron.pl
+++ b/debian/examples/cron-stats.pl
@@ -91,7 +91,7 @@ if ($@) {
 use Parse::Syslog;
 use Getopt::Std;
 # Parse command line
-getopts('d:hvf:');
+getopts('dhvf:');
 $opt_d = 0 if ! defined ($opt_d) ;
 
 if ( $opt_h ) {
@@ -116,13 +116,31 @@ while(my $log = $parser->next) {
 	if ( $log->{program} =~ /CRON/ ) {
 		print STDERR "DEBUG: Found syslog entry: $log->{pid}\n" if $opt_d;
 # We extract the entries with the same text but with 'CMD' (start)
-# and 'END' (end) to check if it's the same we use the PID, the
-# PID of END (generated by the parent process) is PID-1 of CMD
+# and 'END' (end) to check if it's the same we use the PID reported
+# by cron.
 		if ($log->{text} =~ /CMD \(/) {
-			add_entry($log->{timestamp},$log->{text},$log->{pid});
+			my $pid;
+			if  ($log->{text} =~ /\(\[(\d+)\]/ ) {
+			# Debian - with loglevel 8, the child process id is
+			# reported
+				$pid = $1;
+			} else {
+			# All the other cases, the process ID of the
+			# child process is the same one as the log entry
+				$pid = $log->{pid};
+			}
+			add_entry($log->{timestamp},$log->{text},$pid, $log->{pid})
 		}
 		if ($log->{text} =~ /END \(/) {
-			clear_entry($log->{timestamp},$log->{text},$log->{pid});
+			my $pid;
+			if  ($log->{text} =~ /\(\[(\d+)\]/ ) {
+			# Debian - with loglevel 8
+				$pid = $1;
+			} else {
+			# Other cases
+				$pid = "UNKNOWN";
+			}
+			clear_entry($log->{timestamp},$log->{text},$pid,$log->{pid});
 		}
 	}
 }
@@ -158,13 +176,15 @@ sub find_prg {
 	my $prg = "";
 	if ( $text =~ /(CM|EN)D\s*\((.*)\s*\)\s*$/ ) {
 		$prg = $2;
+		$prg =~ s/^\[\d+\]\s+//; # Strip off child process numbers
+					# (Debian loglevel 8)
 	}
 	return $prg;
 }
 
 sub add_entry {
 # Get a syslog entry and add it to the table of entries for analysis
-	my ($time, $text, $pid) = @_;
+	my ($time, $text, $pid, $ppid) = @_;
 	my ($user, $prg);
 	print STDERR "DEBUG: Entering add_entry with @_\n" if $opt_d; 
 	$user = find_user($text);
@@ -179,7 +199,7 @@ sub add_entry {
 	}
 	my $value = $pid."-".$time;
 	print STDERR "DEBUG: Adding cronjob of user $user to list: $prg\n" if $opt_d;
-	add_cron_entry($user, $prg, $value);
+	add_cron_entry($user, $prg, $value, $ppid);
 	$cron_entries{$user}{$prg}{'count'}++;
 	return;
 }
@@ -188,7 +208,13 @@ sub clear_entry {
 # Get a syslog entry, find the start entry and add the timestamp difference
 # to the list of timestamps for that user
 #
-	my ($timestamp, $text, $pid) = @_;
+# There's two ways to match entries:
+#  - (in Debian, using loglevel 8): By matching the child process ID
+#    between the entries
+#  - in all the other cases: By matching the process ID of the 
+#    END message (which belongs to the parent) with the process IF
+#    of the CMD message (which belongs to the child)
+	my ($timestamp, $text, $pid, $ppid) = @_;
 	my ($user, $prg, $entry, $count);
 	my @array; my @stack;
 	print STDERR "DEBUG: Entering clear_entry with @_\n" if $opt_d; 
@@ -213,11 +239,12 @@ sub clear_entry {
 	while ( $finish == 0 ) {
 		$entry = pop @array;
 		last if ! defined ($entry) ;
-	# Pop all entries and look for one whose pid is ours -1
+		# Pop all entries and look for one whose pid matches 
 		my ($spid, $stimestamp) =  split ("-", $entry);
 		print  STDERR "DEBUG: Comparing entry $spid to $pid\n" if $opt_d;
-		if  ( $pid-$spid <= 1 ) {
+		if  ( ( $pid ne "UNKNOWN" && $pid == $spid ) ||  $ppid-$spid == 1 ) {
 			my $timediff =  $timestamp-$stimestamp;
+			$timediff = 0 if $timediff < 0;
 			print STDERR "DEBUG: Entries match, time difference of $timediff\n" if $opt_d ;
 			$cron_entries{$user}{$prg}{'finished'}++;
 			if (defined ( $cron_times{$user}{$prg} ) ) { 
@@ -257,6 +284,12 @@ sub add_cron_entry {
 		$cron_entries{$user}{$prg}{'item'} = join(":", $cron_entries{$user}{$prg}{'item'}, $entry);
 	} else {
 		$cron_entries{$user}{$prg}{'item'} = $entry;
+		$cron_entries{$user}{$prg}{'count'} = 0;
+		$cron_entries{$user}{$prg}{'finished'} = 0;
+		$cron_entries{$user}{$prg}{'unmatched'} = 0 ;
+		$cron_entries{$user}{$prg}{'average'} = 0 ;
+		$cron_entries{$user}{$prg}{'minimum'} = 0 ;
+		$cron_entries{$user}{$prg}{'maximum'} = 0;
 	}
 }
 
diff --git a/debian/examples/cron-tasks-review.sh b/debian/examples/cron-tasks-review.sh
new file mode 100644
index 0000000..5e8e112
--- /dev/null
+++ b/debian/examples/cron-tasks-review.sh
@@ -0,0 +1,186 @@
+#!/bin/bash
+#
+# Review the cron tasks defined in the system and warn the admin
+# if some of the files will not be run
+#
+# This program is copyright 2011 by Javier Fernandez-Sanguino <jfs at debian.org>
+#
+#    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 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.
+#
+# For more information please see
+#  http://www.gnu.org/licenses/licenses.html#GPL
+
+
+set -e 
+# reset locale, just in case
+LC_ALL=C
+export LC_ALL
+
+PROGNAME=${0##*/}
+PROGVERSION=1.0
+# Command line options
+SHORTOPTS=hvsi
+LONGOPTS=help,version,syslog,info
+set -- $(getopt -s bash -o $SHORTOPTS -l $LONGOPTS --n $PROGNAME -- "$@")
+
+version () {
+  echo "$PROGNAME $PROGVERSION"
+  echo "$PROGNAME is copyright © Javier Fernandez-Sanguino <jfs at debian.org>"
+  echo "Released under the terms of the GPL version 2 or later"
+  echo "This program is part of the cron package"
+}
+
+usage () {
+    cat <<EOUSE
+    Usage: $PROGNAME [-si]
+
+    Reviews the directories used by cron and reports scripts that
+    might not be run by cron due to problems in their naming or
+    in their setup.
+     
+    You should run this program as root to prevent false positives.
+
+    Options:
+        -s       -- Use syslog to report information
+        -i       -- Report also informational messages
+EOUSE
+}
+
+syslog="no"
+send_info="no"
+for opt in $@; do
+    case $opt in
+        -h|--help) usage; exit 0;;
+        -v|--version) version; exit 0;;
+        -s|--syslog) syslog="yes";;
+        -i|--info)   send_info="yes";;
+        *)  ;;
+    esac
+done
+    
+
+send_message () {
+
+    level=$1
+    msg=$2
+    [ "$level" = "info" ] && [ "$send_info" = "no" ] && return
+
+    if [ "$syslog" = "yes" ] ; then
+        logger -p cron.$level -t CRON $msg
+    else
+        case $level in
+            "warn")
+                echo "WARN: $msg" >&2
+                ;;
+            "info")
+                echo "INFO: $msg" 
+                ;;
+        esac
+    fi
+}
+
+warn () {
+# Send a warning to the user
+    file=$1
+    reason=$2
+
+    name=`basename $file`
+    # Skip hidden files
+    echo $name | grep -q -E '^\.' && return
+    # Skip disabled files
+    echo $name | grep -q -E '\.disabled' && return
+
+    # TODO: Should we send warnings for '.old' or '.orig'?
+
+    # Do not send a warning if the file is '.dpkg-old' or '.dpkg-dist'
+    if ! echo $file | grep -q -E '\.dpkg-(old|dist)$' ; then
+        send_message "warn" "The file $file will not be executed by cron: $reason"
+    else
+        send_message "info" "The file $file is a leftover from the Debian package manager"
+    fi
+}
+
+check_results () {
+
+    dir=$1
+    run_file=$2
+    exec_test=$3
+
+    # Now check the files we found and the ones that exist in the directory
+    find $dir \( -type f -o -type l \) -printf '%p %l\n'  |
+    while read file pointer; do
+        if ! grep -q "^$file$" $run_file; then
+            [ -L "$file" ] && [ ! -e "$pointer" ] && \
+                    warn $file "Points to an nonexistent location ($pointer)" && continue
+            [ "$exec_test" = "yes" ]  && [ ! -x "$file" ] &&  \
+                    warn $file "Is not executable" && continue
+            [ ! -r "$file" ] && [ "`id -u`" != "0" ] && \
+                    warn $file "Cannot read the file to determine if it will be run ($PROGNAME is not running as root)" && continue
+            [ ! -r "$file" ] && \
+                    warn $file "File is unreadable" && continue
+             warn $file "Does not conform to the run-parts convention"
+        else
+
+# do additional checks for symlinks for files that *are* listed by run-parts 
+            if [ -L "$file" ] ; then
+# for symlinks: does the file exist?
+                if [ ! -e "$pointer" ] ; then
+                    warn $file "Points to an nonexistent location ($pointer)"
+                fi
+# for symlinks: is it owned by root?
+                 owner=`ls -l $pointer  | awk '{print $3}'`
+                 if [ "$owner" != "root" ]; then
+                       warn $file "Is not owned by root"
+                 fi
+            fi
+
+       fi
+    done
+
+}
+
+# Setup for the tests
+
+# First: check if we are using -l
+[ -r /etc/default/cron ] &&  . /etc/default/cron
+use_lsb="no"
+[ "$LSBNAMES" = "-l" ] && use_lsb="yes"
+echo $EXTRA_OPTS | grep -q -- '-l' && use_lsb="yes"
+# Set the options for run parts
+run_opts=""
+[ "$use_lsb" = "yes" ] &&  run_opts="--lsbsysinit"
+
+temp=`tempfile` || { echo "ERROR: Cannot create temporary file" >&2 ; exit 1; }
+trap "rm -f $temp" 0 1 2 3 13 15
+
+# Now review the scripts, note that cron does not use run-parts to run these
+# so they are *not* required to be executables, just to conform with the 
+
+# Step 1: Review /etc/cron.d
+run-parts $run_opts --list /etc/cron.d >$temp
+check_results /etc/cron.d $temp "no"
+
+
+# Step 2: Review /etc/cron.{hourly,daily,weekly,monthly}
+
+for interval in hourly daily weekly monthly; do
+    testdir=/etc/cron.$interval
+    run-parts $run_opts --test $testdir >$temp
+    check_results $testdir $temp "yes"
+done
+
+
+exit 0
+
diff --git a/debian/install b/debian/install
index 2d21489..c1d9262 100644
--- a/debian/install
+++ b/debian/install
@@ -1,2 +1,2 @@
-b-cron/cron usr/sbin
-b-cron/crontab usr/bin
+cron        usr/sbin
+crontab     usr/bin
diff --git a/debian/patches-from-bts/proper_use_streerno_bug_470587.diff b/debian/patches-from-bts/proper_use_streerno_bug_470587.diff
deleted file mode 100644
index 0acc0a3..0000000
--- a/debian/patches-from-bts/proper_use_streerno_bug_470587.diff
+++ /dev/null
@@ -1,153 +0,0 @@
-diff -u cron-3.0pl1/misc.c cron-3.0pl1/misc.c
---- cron-3.0pl1/misc.c
-+++ cron-3.0pl1/misc.c
-@@ -203,8 +203,7 @@
- 			fprintf(stderr, "%s: created\n", CRONDIR);
- 			stat(CRONDIR, &sb);
- 		} else {
--			fprintf(stderr, "%s: ", CRONDIR);
--			perror("mkdir");
-+			fprintf(stderr, "%s: mkdir: %s\n", CRONDIR, strerror(errno));
- 			exit(ERROR_EXIT);
- 		}
- 	}
-@@ -214,8 +213,7 @@
- 		exit(ERROR_EXIT);
- 	}
- 	if (chdir(CRONDIR) < OK) {
--		fprintf(stderr, "cannot chdir(%s), bailing out.\n", CRONDIR);
--		perror(CRONDIR);
-+		fprintf(stderr, "%s: chdir: %s\n", CRONDIR, strerror(errno));
- 		exit(ERROR_EXIT);
- 	}
- 
-@@ -227,8 +225,7 @@
- 			fprintf(stderr, "%s: created\n", SPOOL_DIR);
- 			stat(SPOOL_DIR, &sb);
- 		} else {
--			fprintf(stderr, "%s: ", SPOOL_DIR);
--			perror("mkdir");
-+			fprintf(stderr, "%s: mkdir: %s\n", SPOOL_DIR, strerror(errno));
- 			exit(ERROR_EXIT);
- 		}
- 	}
-@@ -507,9 +504,8 @@
- 	if (LogFD < OK) {
- 		LogFD = open(LOG_FILE, O_WRONLY|O_APPEND|O_CREAT, 0600);
- 		if (LogFD < OK) {
--			fprintf(stderr, "%s: can't open log file\n",
--				ProgramName);
--			perror(LOG_FILE);
-+			fprintf(stderr, "%s: %s: open: %s\n",
-+				ProgramName, LOG_FILE, strerror(errno));
- 		} else {
- 			(void) fcntl(LogFD, F_SETFD, 1);
- 		}
-diff -u cron-3.0pl1/crontab.c cron-3.0pl1/crontab.c
---- cron-3.0pl1/crontab.c
-+++ cron-3.0pl1/crontab.c
-@@ -326,8 +326,7 @@
- 		if (errno == ENOENT) 
- 			fprintf(stderr, "no crontab for %s\n", User);
- 		else {
--                        fprintf(stderr, "%s/", CRONDIR);
--			perror(n);
-+                        fprintf(stderr, "%s/: fopen: %s\n", n, strerror(errno));
-                 }
- 		exit(ERROR_EXIT);
- 	} else if ((fd=fileno(f))==-1) {
-@@ -413,8 +412,7 @@
- 		if (errno == ENOENT)
- 			fprintf(stderr, "no crontab for %s\n", User);
- 		else {
--                        fprintf(stderr, "%s/", CRONDIR);
--			perror(n);
-+                        fprintf(stderr, "%s/: unlink: %s\n", CRONDIR, strerror(errno));
-                 }
- 		exit(ERROR_EXIT);
- 	}
-@@ -583,8 +581,7 @@
- 	(void) snprintf(n, MAX_FNAME, CRON_TAB(User));
- 	if (!(f = fopen(n, "r"))) {
- 		if (errno != ENOENT) {
--                        fprintf(stderr, "%s/", CRONDIR);
--			perror(n);
-+                        fprintf(stderr, "%s/: fdopen: %s", n, strerror(errno));
- 			exit(ERROR_EXIT);
- 		}
- 		fprintf(stderr, "no crontab for %s - using an empty one\n",
-@@ -875,14 +872,12 @@
- 	um = umask(077);
- 	fd = mkstemp(tn);
- 	if (fd < 0) {
--                fprintf(stderr, "%s/", CRONDIR);
--		perror(tn);
-+                fprintf(stderr, "%s/: mkstemp: %s\n", CRONDIR, strerror(errno));
- 		return(-2);
- 	}
- 	tmp = fdopen(fd, "w+");
- 	if (!tmp) {
--                fprintf(stderr, "%s/", CRONDIR);
--		perror(tn);
-+                fprintf(stderr, "%s/: fdopen: %s\n", CRONDIR, strerror(errno));
- 		return (-2);
- 	}
- 	(void) umask(um);
-@@ -903,9 +898,8 @@
- 		putc(ch, tmp);
- 
- 	if (ferror(tmp) || fflush(tmp) || fsync(fd)) {
--		fprintf(stderr, "%s: error while writing new crontab to %s\n",
--			ProgramName, tn);
--		perror("Error");
-+		fprintf(stderr, "%s: %s: %s\n",
-+			ProgramName, tn, strerror(errno));
- 		fclose(tmp);  unlink(tn);
- 		return (-2);
- 	}
-@@ -969,9 +963,8 @@
-         }
- 
- 	if (rename(tn, n)) {
--		fprintf(stderr, "%s: error renaming %s to %s\n",
--			ProgramName, tn, n);
--		perror("rename");
-+		fprintf(stderr, "%s: %s: rename: %s\n",
-+			ProgramName, n, strerror(errno));
- 		unlink(tn);
- 		return (-2);
- 	}
-@@ -994,16 +987,14 @@
- 	(void) gettimeofday(&tvs[0], &tz);
- 	tvs[1] = tvs[0];
- 	if (utimes(SPOOL_DIR, tvs) < OK) {
--		fprintf(stderr, "crontab: can't update mtime on spooldir\n");
--                fprintf(stderr, "%s/", CRONDIR);
--		perror(SPOOL_DIR);
-+                fprintf(stderr, "%s/: utimes: %s", CRONDIR, strerror(errno));
-+		fputs("crontab: can't update mtime on spooldir\n", stderr);
- 		return;
- 	}
- #else
- 	if (utime(SPOOL_DIR, NULL) < OK) {
--		fprintf(stderr, "crontab: can't update mtime on spooldir\n");
--                fprintf(stderr, "%s/", CRONDIR);
--		perror(SPOOL_DIR);
-+                fprintf(stderr, "%s: utime: %s\n", CRONDIR, strerror(errno));
-+		fputs("crontab: can't update mtime on spooldir\n", stderr);
- 		return;
- 	}
- #endif /*USE_UTIMES*/
-diff -u cron-3.0pl1/do_command.c cron-3.0pl1/do_command.c
---- cron-3.0pl1/do_command.c
-+++ cron-3.0pl1/do_command.c
-@@ -342,8 +342,7 @@
- 			}
- #endif
-                         execle(shell, shell, "-c", e->cmd, (char *)0, jobenv);
--			fprintf(stderr, "execl: couldn't exec `%s'\n", shell);
--			perror("execl");
-+			fprintf(stderr, "%s: execle: %s\n", shell, strerror(errno));
- 			_exit(ERROR_EXIT);
- 		}
- 		break;
diff --git a/debian/patches-from-bts/sensible_editor_482284.diff b/debian/patches-from-bts/sensible_editor_482284.diff
deleted file mode 100644
index 6480a83..0000000
--- a/debian/patches-from-bts/sensible_editor_482284.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -upr cron-3.0pl1.orig/pathnames.h cron-3.0pl1/pathnames.h
---- cron-3.0pl1.orig/pathnames.h	2008-05-21 10:42:06.064487361 -0500
-+++ cron-3.0pl1/pathnames.h	2008-05-21 10:41:34.412450000 -0500
-@@ -75,7 +75,7 @@
- 			 * environment variable specified.
- 			 */
- #if defined(DEBIAN)
--# define EDITOR "/usr/bin/editor"
-+# define EDITOR "/usr/bin/sensible-editor"
- #elif defined(_PATH_VI)
- # define EDITOR _PATH_VI
- #else
diff --git a/debian/postinst b/debian/postinst
index df970cd..d222e23 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -1,11 +1,11 @@
 #!/bin/sh
 set -e
 
-if [ -x "/etc/init.d/cron" ]; then
-    update-rc.d cron start 89 2 3 4 5 . >/dev/null || exit $?
-fi
-# Copy existing allow/deny files
 crondir="/var/spool/cron"
+
+# LEGACY: This hasn't been relevant to Debian cron since the last Millenium,
+# but we keep it here to preserve the upgrade path... 
+# Copy existing allow/deny files
 pausemessage="F"
 for fname in allow deny ; do
     if [ -f $crondir/$fname ] ; then
@@ -34,6 +34,7 @@ if [ -e /etc/cron.monthly/standard.dpkg-bak ]; then
         /etc/cron.monthly/standard-obsolete-please-verify-and-remove
 fi
 
+
 # Add group for crontabs
 getent group crontab > /dev/null 2>&1 || addgroup --system crontab
 
@@ -57,14 +58,5 @@ if [ -d $crondir/crontabs ] ; then
     set -e
 fi
 
-if [ -x /etc/init.d/cron ]; then
-	if [ -x /usr/sbin/invoke-rc.d ] ; then
-	       invoke-rc.d cron start
-	else
-	       /etc/init.d/cron start
-	fi
-fi
-
-
 
 #DEBHELPER#
diff --git a/debian/postrm b/debian/postrm
index 48d0162..7fa22ac 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -4,8 +4,7 @@ set -e
 # Conffile has become obsolete
 dpkg-maintscript-helper rm_conffile /etc/cron.monthly/standard "3.0pl1-113" -- "$@"
 
-if [ $1 = purge ]; then 
-    update-rc.d cron remove >/dev/null
+if [ "$1" = "purge" ]; then 
     rm -f /etc/cron.allow /etc/cron.deny
 fi
 
diff --git a/debian/prerm b/debian/prerm
index 8be5e3f..d8faa89 100644
--- a/debian/prerm
+++ b/debian/prerm
@@ -1,12 +1,5 @@
 #!/bin/sh
 set -e
 
-if [ -x /etc/init.d/cron ]; then
-	if [ -x /usr/sbin/invoke-rc.d ] ; then
-	       invoke-rc.d cron stop
-	else
-	       /etc/init.d/cron stop
-	fi
-fi
-
 #DEBHELPER#
+
diff --git a/debian/rules b/debian/rules
index 7c281bb..a840ebd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,139 +1,70 @@
 #!/usr/bin/make -f
-# 
-# Rules file for cron
-#
+# -*- makefile -*-
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
-CROSS=CC=$(DEB_HOST_GNU_TYPE)-gcc
-else
-CROSS=
-endif
 
-DEB_OPTIM= -O2 -g -Wall -Wno-comment
-DEB_INSTALL = install
-DEB_DEBUG_DEFS = -DDEBUGGING=0
+# Set system type (Linux, HURD, etc.)
+DEB_HOST_ARCH_OS = $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+
+# Standard compiler flags 
+CFLAGS += -Wall -Wno-unused -Wno-comment
 
+# debug is disabled by default
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-  DEB_OPTIM = -g -Wall -Wno-comment
-  DEB_DEBUG_DEFS= -DDEBUGGING=1
+  DEBUG_DEFS = -DDEBUGGING=1
+else
+  DEBUG_DEFS = -DDEBUGGING=0
 endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-  DEB_INSTALL += -s
+export DEBUG_DEFS
+
+# PAM is enabled by default
+ifeq (,$(findstring nopam,$(DEB_BUILD_OPTIONS)))
+    PAM_DEFS = -DUSE_PAM
+    PAM_LIBS = -lpam
+    export PAM_DEFS PAM_LIBS
 endif
 
-# Set system type (Linux, HURD, etc.)
-DEB_HOST_ARCH_OS = $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+# SELinux and audit are only available on Linux
 ifeq ($(DEB_HOST_ARCH_OS), linux)
-  PAM_DEFS = -DUSE_PAM
-  PAM_LIBS = -lpam
-  SELINUX = yes
-else
-  PAM_DEFS = 
-  PAM_LIBS =
+# SELinux is enabled by default
+ifeq (,$(findstring noselinux,$(DEB_BUILD_OPTIONS)))
+    SELINUX_DEFS = -DWITH_SELINUX
+    SELINUX_LIBS = -lselinux
+    export SELINUX_DEFS SELINUX_LIBS
+endif
+# audit is disabled by default
+ifneq (,$(findstring withaudit,$(DEB_BUILD_OPTIONS)))
+    AUDIT_DEFS = -DWITH_AUDIT
+    AUDIT_LIBS = -laudit
+    export AUDIT_DEFS AUDIT_LIBS
+endif
 endif
 
-export PAM_DEFS
-export PAM_LIBS
 
-# SELinux
-ifeq (yes,$(SELINUX))
-  SELINUX_DEFS = -DWITH_SELINUX
-  SELINUX_LIBS = -lselinux
-endif
+%:
+	dh $@ 
 
-export SELINUX_DEFS SELINUX_LIBS
 
-# Audit
-ifeq (yes,$(AUDIT))
-AUDIT_LIBS = -laudit
-else
-AUDIT_LIBS = 
-endif
-export AUDIT_LIBS
+override_dh_auto_install:
+	# Empty target to bypass the auto-detected install target in Makefile
 
-ifeq ($(DEB_HOST_ARCH_OS), linux)
-build: build-cron build-cron-se
-else
-build: build-cron
-endif
 
-build-cron: b-cron/build-stamp
-b-cron/build-stamp:
-	dh_testdir
-	rm -rf b-cron
-	mkdir b-cron
-	# Add here commands to compile the package.
-	$(MAKE) $(CROSS) -C b-cron -f ../Makefile OPTIM="$(DEB_OPTIM)" DEBUG_DEFS="$(DEB_DEBUG_DEFS)" VPATH=.. INCLUDE=-I.. 
-	touch $@
-
-build-cron-se: b-cron-se/build-stamp
-b-cron-se/build-stamp:
-	dh_testdir
-	rm -rf b-cron-se
-	mkdir b-cron-se
-	cp debian/cron-se.overrides b-cron-se/cron-se
-	cd b-cron-se
-	# Add here commands to compile the package.
-	SELINUX_DEFS="-DWITH_SELINUX" SELINUX_LIBS=-lselinux $(MAKE) $(CROSS) -C b-cron-se -f ../Makefile OPTIM="$(DEB_OPTIM)" DEBUG_DEFS="$(DEB_DEBUG_DEFS)" VPATH=.. INCLUDE=-I..
-	touch $@
-
-clean:
-	dh_testdir
-	dh_testroot
-	$(MAKE) clean
-	rm -rf b-cron b-cron-se
-	rm -f debian/conffiles
-	dh_clean
-
-# Build architecture-independent files here.
-binary-indep: build
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build
-#	dh_testversion
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
+override_dh_install:
 	dh_install
-
-	dh_installdocs FEATURES THANKS README debian/README.anacron
-	dh_installexamples debian/examples/*
-#	dh_installmenu
-	dh_installpam
-	dh_installinit --noscripts
-	# Can't use dh_installcron because we don't have "normal" naming
-	# convention
+	install -m 755 debian/standard.daily debian/cron/etc/cron.daily/standard
 	install -m 644 debian/crontab.main debian/cron/etc/crontab
 	install -m 644 debian/placeholder debian/cron/etc/cron.d/.placeholder
 	install -m 644 debian/placeholder debian/cron/etc/cron.hourly/.placeholder
 	install -m 644 debian/placeholder debian/cron/etc/cron.daily/.placeholder
 	install -m 644 debian/placeholder debian/cron/etc/cron.weekly/.placeholder
 	install -m 644 debian/placeholder debian/cron/etc/cron.monthly/.placeholder
-	install -m 755 debian/standard.daily \
-                       debian/cron/etc/cron.daily/standard
-	install -m 644 debian/cron.default debian/cron/etc/default/cron
-	dh_installman crontab.1 crontab.5 cron.8
-#	dh_undocumented
-	dh_bugfiles
-	dh_installchangelogs CHANGES
-	dh_installdebconf
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-#	dh_makeshlibs
-	dh_md5sums
-	dh_builddeb
-
-source diff:                                                                  
-	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary
+
+
+override_dh_installinit:
+	dh_installinit -- start 89 2 3 4 5 .
+
+
+override_dh_compress:
+	dh_compress -Xexamples
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..5ed032c
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1,7 @@
+
+# Lintian overrides for cron
+#
+# These overrides are required because the debian/changelog
+# is in UTF-8 and debian/control is not:
+cron source: changelog-should-mention-nmu
+cron source: source-nmu-has-incorrect-version-number 
diff --git a/debian/standard.daily b/debian/standard.daily
index fce6ef0..543cf4c 100644
--- a/debian/standard.daily
+++ b/debian/standard.daily
@@ -3,132 +3,103 @@
 # Written by Ian A. Murdock <imurdock at gnu.ai.mit.edu>
 # Modified by Ian Jackson <ijackson at nyx.cs.du.edu>
 # Modified by Steve Greenland <stevegr at debian.org>
+# Modified by Christian Kastner <debian at kvr.at>, based on a script submitted
+# to the BTS by Justin B. Rye <jbr at edlug.org.uk>
 
 # Start in the root filesystem, make SElinux happy
 cd /
-bak=/var/backups
 LOCKFILE=/var/lock/cron.daily
-umask 022
+LOFO=lost+found
 
-#
-# Avoid running more than one at a time 
-#
-
-if [ -x /usr/bin/lockfile-create ] ; then
-    lockfile-create $LOCKFILE
-    if [ $? -ne 0 ] ; then
-	cat <<EOF
+# When flock is available, avoid running more than once at a time 
+if `which flock >/dev/null`; then
+    exec 9> $LOCKFILE
+    if ! flock -x -n 9; then
+        cat <<EOF
 
 Unable to run /etc/cron.daily/standard because lockfile $LOCKFILE
 acquisition failed. This probably means that the previous day's
 instance is still running. Please check and correct if necessary.
 
 EOF
-	exit 1
+        exit 1
     fi
-
-    # Keep lockfile fresh
-    lockfile-touch $LOCKFILE &
-    LOCKTOUCHPID="$!"
 fi
 
-#
-# Backup key system files
-#
-
-if cd $bak ; then
-	cmp -s passwd.bak /etc/passwd || (cp -p /etc/passwd passwd.bak &&
-					  chmod 600 passwd.bak)
-	cmp -s group.bak /etc/group || (cp -p /etc/group group.bak &&
-					chmod 600 group.bak)
-        if [ -f /etc/shadow ] ; then
-	  cmp -s shadow.bak /etc/shadow || (cp -p /etc/shadow shadow.bak &&
-                                            chmod 600 shadow.bak)
-	fi
-        if [ -f /etc/gshadow ] ; then
-	  cmp -s gshadow.bak /etc/gshadow || (cp -p /etc/gshadow gshadow.bak &&
-					      chmod 600 gshadow.bak)
-	fi
+# Don't continue if user wants to skip lost+found check
+if [ -f /etc/default/cron ]; then
+    . /etc/default/cron
+    [ "$CHECK_LOSTFOUND" = "no" ] && exit 0
 fi
 
-#
-# Check to see if any files are in lost+found directories and warn admin
-#
-# Get a list of the (potential) ext2, ext3, ext4 and xfs l+f directories
-# Discard errors, for systems not using any of these.
-lfdirs=`df -P --type=ext2 --type=ext3 --type=ext4 --type=xfs 2>/dev/null |
-	awk '/\/dev\// { print }' | sed -e 's/ [[:space:]]*/ /g'  |
-	while read mount block used avail perc mp; do
-		[ "$mp" = "/" ] && mp=""
-		echo "$mp/lost+found"
-	done`
-
-# Don't use space as a field separator
-oldifs="$IFS"
-IFS=`printf '\n\t'`
-
-for lfdir in $lfdirs; do
-# In each directory, look for files
-    if [ -d "$lfdir" ] ; then
-	more_lost_found=`ls -1  "$lfdir" 2>/dev/null | grep -v 'lost+found$' | sed 's/^/    /'`
-	if [ -n "$more_lost_found" ] ; then
-	    lost_found="$lost_found
-
-$lfdir:
-$more_lost_found"
-	    # NOTE: above weird line breaks in string are intentional!
-        fi
+
+# Go through /etc/mtab, looking for filesystems with lost+found dirs
+while read DEV MTPT FSTYPE OPTS REST
+do
+    # Skip devices outside of /dev
+    echo "$DEV" | grep -q '^/dev/' || continue  
+
+    # Only check on FS where we might expect lost+found
+    echo "$FSTYPE" | grep -q -E '^(ext2|ext3|ext4|xfs)$' || continue
+
+    [ "$MTPT" = '/' ] && MTPT=""
+    # Replace spaces in the path (\040)
+    MTPT="`echo $MTPT | sed -e 's/\\040/ /g'`"
+
+    if [ ! -d "$MTPT/$LOFO" ]
+    then
+        # XFS does not necessarily have a lost+found dir
+        [ "$FSTYPE" = "xfs" ] && continue
+
+        # If we do not find the directory then it might
+        # be an issue with the mtab or with how we parse 
+        # the information
+        [ ! -d "$MTPT" ] && continue
+
+        MISSING="$MISSING\n$MTPT/$LOFO"
+    elif cd "$MTPT/$LOFO" 2> /dev/null
+    then
+        LIST=
+        for NAME in *
+        do
+            [ "$NAME" = '*' ] && break
+            LIST="$LIST\n\t$NAME"
+        done
+        [ -n "$LIST" ] || continue
+        CONTENTS="$CONTENTS\n$MTPT/$LOFO:$LIST"
     else
-# Do nothing for XFS filesystems they do not need to
-# have a lost and found dir
-        fs=`cat /proc/mounts | grep " ${lfdir%/lost+found} "`
-        case "$fs" in
-            ext*)
-        	no_lost_found="$no_lost_found
-$lfdir"
-                ;;
-            *)
-                ;;
-        esac
+        echo "Can't access $MTPT/$LOFO"
     fi
-done
-
-# Restore IFS
-IFS="$oldifs"
-unset oldifs
-
-# NOTE: This might need to be configurable if systems abound
-# w/o lost+found out there to prevent giving out this warning
-# every day.
-if [ -n "$lost_found" ]; then
-    cat << EOF
-Files were found in lost+found directories. This is probably
-the result of a crash or bad shutdown, or possibly of a disk
-problem. These files may contain important information. You
-should examine them, and move them out of lost+found or delete
-them if they are not important.
-
-The following files were found:
-$lost_found
+done < /etc/mtab
+
+# Report findings if any
+if [ -n "$MISSING" ]
+then
+    cat <<EOF
+
+Some local file systems lack a $LOFO directory. This means if the
+file system is damaged and needs to be repaired, fsck will not have
+anywhere to put stray files for recovery. You should consider creating
+a $LOFO directory with mklost+found(8).
+
+The following $LOFO directories were not available:
 EOF
+    echo $MISSING
 fi
 
-if [ -n "$no_lost_found" ]; then
-    cat << EOF
-Some local filesystems do not have lost+found directories. This
-means that these filesystems will not be able to recover
-lost files when the filesystem is checked after a crash.
-Consider creating a lost+found directory with mklost+found(8).
+if [ -n "$CONTENTS" ]
+then
+    cat <<EOF
 
-The following lost+found directories were not available:
-$no_lost_found
+Items were found in $LOFO directories. This is probably the result
+of a crash or bad shutdown, or possibly of a disk problem. You should
+examine them to see if they contain important information, and either
+retrieve them from $LOFO or delete them.
+
+The following items were found:
 EOF
+    echo $CONTENTS
 fi
 
-#
-# Clean up lockfile
-#
-if [ -x /usr/bin/lockfile-create ] ; then
-    kill $LOCKTOUCHPID
-    lockfile-remove $LOCKFILE
-fi
+# Remove lock file (releasing lock)
+rm -f $LOCKFILE
diff --git a/debian/svn-git-migration.txt b/debian/svn-git-migration.txt
new file mode 100644
index 0000000..84f921c
--- /dev/null
+++ b/debian/svn-git-migration.txt
@@ -0,0 +1,121 @@
+Subversion-to-Git Migration Notes
+=================================
+
+The following is a documentation of the exact steps that were taken to convert
+Debian cron's subversion repository to a git repository. This was a one-shot
+conversion, after which the git repository became authoritative. git-svn's
+bridging features were therefore not needed.
+
+The following packages were used in this conversion:
+    * git-svn
+    * pristine-tar
+
+Additionally, a collection of scripts known as git-svn-abandon were used. These
+scripts post-process a git repository cloned from SVN by converting subversion
+tag branches into proper git tags, rewriting commits and so on. They were
+retrieved from:
+
+    https://github.com/nothingmuch/git-svn-abandon 
+
+The grafting step was skipped, as there were no branch merges within SVN.
+
+
+STEPS
+=====
+
+1)  The git-svn-abandon scripts were cloned, and the destination directory was
+    added to $PATH:
+    
+        $ git clone git://github.com/nothingmuch/git-svn-abandon.git
+        $ PATH=$PATH:$PWD/git-svn-abandon/
+
+    A tiny patch was applied to the scripts to prettify the tags during the
+    process (upstream/*, debian/*, and so on). The patch can be found at the
+    bottom of this document.
+
+
+2)  Before importing the svn history, an authors file /path/to/authors-file
+    was created for use by git-svn. See git-svn(1) for more info.
+
+
+3)  The svn repository was cloned with
+
+        $ git svn clone --stdlayout --authors-file=/path/to/authors-file \
+            --prefix=svn/ svn://anonscm.debian.org/pkg-cron
+
+
+4)  The resulting git repository was then post-processed with git-svn-abandon:
+
+        $ git svn-abandon-fix-refs
+        $ git svn-abandon-cleanup
+
+    At this point, all SVN branches had been converted to git branches, and all
+    SVN tags to git tags (annotated).
+
+
+5)  The resulting repository was slightly restructured. All update branches
+    were renamed to update/<release>,
+
+        $ for brname in woody slink potato lenny; do
+            git branch -m ${brname}_updates updates/$brname;
+          done
+
+    and all other branches -- except sf3! -- were removed:
+
+        $ git branch -D rDoS-patch sid-squeeze source-dist
+
+        
+6)  The new upstream branch was created from commit e5a00cee3 ("Initial
+    revision"), which corresponds to SVN revision #2 -- that is, the commit
+    with which the original upstream source was initially added to the repository:
+
+        $ git branch upstream e5a00cee31b43146f8e661fef0623a4203d00f9e
+
+    Comparing the contents of the tree of that commit to the contents of
+    original source tarball currently in the archive (as there has only been one
+    upstream version, ever), one can easily verify that their contents are
+    identical. (This process is not shown here).
+
+
+7) The pristine-tar delta was committed so that the original tarball could be
+   recreated from the upstream branch:
+
+        $ pristine-tar commit /path/to/cron_3.0pl1.orig.tar.gz
+
+    At this point, the pristine-tar/upstream/master branches commonly used by
+    git-buildpackage are properly set up.
+
+
+==> At this point, the git repository became authoritative, and all further
+    commits to the subversion repository were ignored.
+
+
+ -- Christian Kastner <debian at kvr.at>  Wed, 15 Jun 2011 15:39:26 +0200
+
+
+
+diff --git a/git-svn-abandon-fix-refs b/git-svn-abandon-fix-refs
+index c47405d..960b9a1 100755
+--- a/git-svn-abandon-fix-refs
++++ b/git-svn-abandon-fix-refs
+@@ -27,13 +27,19 @@ git for-each-ref --format='%(refname)' refs/remotes/svn/tags/* | while read tag_
+         target_ref="$tag_ref"
+     fi
+ 
++    # Added for Debian cron: prettify tags
++    pretty_tag=`echo $tag | sed -re \
++        's,debian_version_3(_|\.)0pl1-([0-9]+),debian/3.0pl1-\2,;
++         s,upstream.*,upstream/3.0pl1,;
++         s,debian-sf3-3\.0pl1-([0-9]+),sf3/\1,'`
++
+     # create an annotated tag based on the last commit in the tag, and delete the "branchy" ref for the tag
+     git show -s --pretty='format:%s%n%n%b' "$tag_ref" | \
+     perl -ne 'next if /^git-svn-id:/; $s++, next if /^\s*r\d+\@.*:.*\|/; s/^ // if $s; print' | \
+     env GIT_COMMITTER_NAME="$(  git show -s --pretty='format:%an' "$tag_ref" )" \
+         GIT_COMMITTER_EMAIL="$( git show -s --pretty='format:%ae' "$tag_ref" )" \
+         GIT_COMMITTER_DATE="$(  git show -s --pretty='format:%ad' "$tag_ref" )" \
+-        git tag -a -F - "$tag" "$target_ref"
++        git tag -a -F - "$pretty_tag" "$target_ref"
+ 
+     git update-ref -d "$tag_ref"
+ done
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..d5b5c9c
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+
+http://ftp.isc.org/isc/cron/cron_(.*)\.shar

-- 
Git repository for pkg-cron



More information about the Pkg-cron-devel mailing list