Package: devscripts
Version: 2.10.29
Severity: minor
Tags: patch

Hi there,

I just noticed there are several instances of 
$date = `date -R`; chomp $date;
floating around the code.

Proof of concept switch to perl constructs attached.  Please ignore -
the NMU bit - I'm just in the habit of constructing diffs with nmudiff,
so it came along fo the ride :)

-- Package-specific info:

--- /etc/devscripts.conf ---

--- ~/.devscripts ---
DEBCHANGE_MULTIMAINT=yes
DEBSIGN_KEYID=EA59038E
DEBUILD_ROOTCMD=fakeroot
DEBUILD_DPKG_BUILDPACKAGE_OPTS="-kEA59038E 
-i'(?:^|/).*~$|(?:^|/)\..*\.swp|DEADJOE|(?:/CVS|/RCS|\.svn|/\.deps|/\.hg|\.git|\.gitignore|/\.hgtags)(?:$|/)'
 -ICVS -I.svn -I.hg -I.git -I.gitignore"
DEBCOMMIT_STRIP_MESSAGE=yes

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages devscripts depends on:
ii  dpkg-dev                      1.14.19    package building tools for Debian
ii  libc6                         2.7-12     GNU C Library: Shared libraries
ii  perl                          5.10.0-10  Larry Wall's Practical Extraction 

Versions of packages devscripts recommends:
ii  at                 3.1.10.1              Delayed job execution and batch pr
ii  bsd-mailx [mailx]  8.1.2-0.20071201cvs-3 A simple mail user agent
ii  bzr                1.5-1                 easy to use distributed version co
ii  curl               7.18.2-1              Get a file from an HTTP, HTTPS or 
ii  cvs                1:1.12.13-11          Concurrent Versions System
ii  dctrl-tools        2.12                  Command-line tools to process Debi
ii  debian-keyring     2008.05.28            GnuPG (and obsolete PGP) keys of D
pn  debian-maintainers <none>                (no description available)
ii  dillo [www-browser 0.8.6-3               Small and fast web browser
ii  dput               0.9.2.32              Debian package upload tool
ii  dupload            2.6.4                 utility to upload Debian packages
ii  epiphany-gecko [ww 2.22.2-2              Intuitive GNOME web browser - Geck
pn  equivs             <none>                (no description available)
ii  fakeroot           1.9.5                 Gives a fake root environment
ii  galeon [www-browse 2.0.4-1               GNOME web browser for advanced use
ii  git-core           1:1.5.5.4-1           fast, scalable, distributed revisi
ii  gnupg              1.4.9-2               GNU privacy guard - a free PGP rep
ii  iceape-browser [ww 1.1.9-5               Iceape Navigator (Internet browser
ii  iceweasel [www-bro 3.0~rc2-1             lightweight web browser based on M
ii  konqueror [www-bro 4:3.5.9.dfsg.1-2+b1   KDE's advanced file manager, web b
pn  libauthen-sasl-per <none>                (no description available)
ii  libcrypt-ssleay-pe 0.57-1+b1             Support for https protocol in LWP
ii  libparse-debcontro 2.005-2               Easy OO parsing of Debian control-
ii  libsoap-lite-perl  0.710.06-1            Client and server side SOAP implem
ii  libterm-size-perl  0.2-4+b1              Perl extension for retrieving term
ii  libtimedate-perl   1.1600-9              Time and date functions for Perl
ii  liburi-perl        1.35.dfsg.1-1         Manipulates and accesses URI strin
ii  libwww-perl        5.812-1               WWW client/server library for Perl
pn  libyaml-syck-perl  <none>                (no description available)
ii  lintian            1.24.1                Debian package checker
ii  lsb-release        3.2-12                Linux Standard Base version report
ii  lynx [www-browser] 2.8.6-2               Text-mode WWW Browser
ii  mailx              1:20071201-3          Transitional package for mailx ren
ii  man-db             2.5.2-1               on-line manual pager
ii  openssh-client [ss 1:4.7p1-12            secure shell client, an rlogin/rsh
ii  patch              2.5.9-5               Apply a diff file to an original
ii  patchutils         0.2.31-4              Utilities to work with patches
ii  strace             4.5.15-1.2            A system call tracer
ii  subversion         1.4.6dfsg1-4          Advanced version control system
ii  unzip              5.52-11               De-archiver for .zip files
ii  w3m [www-browser]  0.5.2-2               WWW browsable pager with excellent
ii  wdiff              0.5-17                Compares two files word by word
ii  wget               1.11.3-1              retrieves files from the web

-- no debconf information

-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        [EMAIL PROTECTED] |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------
diff -Nru devscripts-2.10.29/debian/changelog devscripts-2.10.29+nmu1/debian/changelog
--- devscripts-2.10.29/debian/changelog	2008-06-03 19:30:04.000000000 +0100
+++ devscripts-2.10.29+nmu1/debian/changelog	2008-06-17 01:26:07.000000000 +0100
@@ -1,3 +1,10 @@
+devscripts (2.10.29+nmu1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Proof of concept change to use strftime
+
+ -- Stephen Gran <[EMAIL PROTECTED]>  Tue, 17 Jun 2008 01:25:57 +0100
+
 devscripts (2.10.29) unstable; urgency=low
 
   * checkbashisms:
diff -Nru devscripts-2.10.29/scripts/bts.pl devscripts-2.10.29+nmu1/scripts/bts.pl
--- devscripts-2.10.29/scripts/bts.pl	2008-05-11 21:55:09.000000000 +0100
+++ devscripts-2.10.29+nmu1/scripts/bts.pl	2008-06-17 01:32:08.000000000 +0100
@@ -40,6 +40,7 @@
 use Net::SMTP;
 use Cwd;
 use IO::Handle;
+use POSIX qw(strftime);
 use lib '/usr/share/devscripts';
 use Devscripts::DB_File_Lock;
 use Devscripts::Debbugs;
@@ -1962,6 +1963,7 @@
     my $fromaddress = $fromaddresses[0];
     # Message-ID algorithm from git-send-email
     my $msgid = sprintf("%s-%s", time(), int(rand(4200)))."-bts-$fromaddress";
+    my $date = strftime("%a, %d %b %Y %H:%M:%S %z", localtime(time));
     my $date = `date -R`;
     chomp $date;
 
diff -Nru devscripts-2.10.29/scripts/debchange.pl devscripts-2.10.29+nmu1/scripts/debchange.pl
--- devscripts-2.10.29/scripts/debchange.pl	2008-04-27 18:10:59.000000000 +0100
+++ devscripts-2.10.29+nmu1/scripts/debchange.pl	2008-06-17 01:25:28.000000000 +0100
@@ -38,6 +38,7 @@
 use File::Copy;
 use File::Basename;
 use Cwd;
+use POSIX qw(strftime tzset);
 use lib '/usr/share/devscripts';
 use Devscripts::Debbugs;
 
@@ -803,9 +804,12 @@
     }
 }
 
-# Get the date
-my $date_cmd = ($opt_tz ? "TZ=$opt_tz " : "") . "date -R";
-chomp(my $DATE=`$date_cmd`);
+if ($opt_tz) { 
+  $ENV{"TZ"} = $opt_tz; 
+  tzset();
+}
+
+my $DATE = strftime("%a, %d %b %Y %H:%M:%S %z", localtime(time));
 
 if ($opt_news && !$opt_i && !$opt_a) {
     if ($VERSION eq $changelog{'Version'}) {
diff -Nru devscripts-2.10.29/scripts/mass-bug.pl devscripts-2.10.29+nmu1/scripts/mass-bug.pl
--- devscripts-2.10.29/scripts/mass-bug.pl	2008-05-27 21:00:20.000000000 +0100
+++ devscripts-2.10.29+nmu1/scripts/mass-bug.pl	2008-06-17 01:18:31.000000000 +0100
@@ -148,6 +148,7 @@
 use Getopt::Long;
 use Text::Wrap;
 use File::Basename;
+use POSIX qw(strftime);
 
 my $progname = basename($0);
 $Text::Wrap::columns=70;
@@ -316,8 +317,7 @@
     my ($subject, $body, $to, $from) = @_;
 
     if (defined $from) {
-	my $date = `date -R`;
-	chomp $date;
+	my $date = strftime("%a, %d %b %Y %H:%M:%S %z", localtime(time));
 	
 	my $pid = open(MAIL, "|-");
 	if (! defined $pid) {

Attachment: signature.asc
Description: Digital signature

Reply via email to