Package: devscripts
Version: 2.18.6
Severity: normal
Control: affects -1 publicsuffix

I'd like to use a debian/watch file for the publicsuffix package like
this:

    version=4
    opts=mode=git,pretty=%cd,date=%Y%m%d.%H%M \
     https://github.com/publicsuffix/list HEAD

however, the publicsuffix package versions are using the UTC form of
the date of the git HEAD, since it's a global project and commits from
around the world.

The above invocation of uscan appears to use the timezone stored in
the git commit message, which produces variable results.

I think the right fix is to change --date=format: to
date=format-local:, like so:

diff --git a/lib/Devscripts/Uscan/git.pm b/lib/Devscripts/Uscan/git.pm
index 1df77c7d..dcfc0154 100644
--- a/lib/Devscripts/Uscan/git.pm
+++ b/lib/Devscripts/Uscan/git.pm
@@ -84,7 +84,7 @@ sub git_search {
 "--git-dir=$self->{downloader}->{destdir}/$self->{gitrepo_dir}",
                     'log',
                     '-1',
-                    "--date=format:$self->{date}",
+                    "--date=format-local:$self->{date}",
                     "--pretty=$self->{pretty}"
                 ],
                 wait_child => 1,


and then also to explicitly set TZ=UTC for the environment of the
spawned git subprocess. (i don't know how to do that with this perl
spawn() subroutine, whose documentation i can't locate right now --
hopefully someone else does!)

I don't think there's any reason to prefer local time in this case --
presumably we want to measure the timestamp based on a universal,
monotonically-increasing clock.

         --dkg


-- Package-specific info:

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

--- ~/.devscripts ---
DEBSIGN_KEYID=0EE5BE979282D80B9F7540F1CCD2ED94D21739E9

-- System Information:
Debian Release: buster/sid
  APT prefers testing-debug
  APT policy: (500, 'testing-debug'), (500, 'testing'), (200, 
'unstable-debug'), (200, 'unstable'), (1, 'experimental-debug'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages devscripts depends on:
ii  dpkg-dev              1.19.0.5
ii  libc6                 2.27-6
ii  libfile-homedir-perl  1.004-1
ii  perl                  5.26.2-7
ii  python3               3.6.6-1
ii  sensible-utils        0.0.12

Versions of packages devscripts recommends:
ii  apt                         1.7.0
ii  at                          3.1.23-1
ii  curl                        7.61.0-1
ii  dctrl-tools                 2.24-3
ii  debian-keyring              2018.09.30
ii  dput-ng [dput]              1.21
ii  dupload                     2.9.2
ii  equivs                      2.1.0
ii  fakeroot                    1.23-1
ii  file                        1:5.34-2
ii  gnupg                       2.2.10-3
ii  gnupg2                      2.2.10-3
ii  libdistro-info-perl         0.18
ii  libdpkg-perl                1.19.0.5
ii  libencode-locale-perl       1.05-1
ii  libfile-which-perl          1.22-1
pn  libgit-wrapper-perl         <none>
ii  libipc-run-perl             20180523.0-1
pn  liblist-compare-perl        <none>
ii  liblwp-protocol-https-perl  6.07-2
ii  libmoo-perl                 2.003004-1
pn  libsoap-lite-perl           <none>
ii  libstring-shellquote-perl   1.04-1
ii  libtry-tiny-perl            0.30-1
ii  liburi-perl                 1.74-1
ii  libwww-perl                 6.35-2
pn  licensecheck                <none>
ii  lintian                     2.5.108
ii  man-db                      2.8.4-2
ii  patch                       2.7.6-3
ii  patchutils                  0.3.4-2
ii  python3-apt                 1.7.0~rc1
ii  python3-debian              0.1.33
ii  python3-magic               2:0.4.15-2
ii  python3-requests            2.18.4-2
pn  python3-unidiff             <none>
pn  python3-xdg                 <none>
ii  strace                      4.21-1
ii  unzip                       6.0-21
ii  wdiff                       1.2.2-2+b1
ii  wget                        1.19.5-1
ii  xz-utils                    5.2.2-1.3

Versions of packages devscripts suggests:
pn  adequate                                   <none>
ii  autopkgtest                                5.5
pn  bls-standalone                             <none>
ii  build-essential                            12.5
pn  check-all-the-things                       <none>
pn  cvs-buildpackage                           <none>
ii  devscripts-el                              40.1
ii  diffoscope                                 103
pn  disorderfs                                 <none>
pn  dose-extra                                 <none>
pn  duck                                       <none>
ii  faketime                                   0.9.7-2.1
pn  gnuplot                                    <none>
ii  gpgv                                       2.2.10-3
ii  gpgv2                                      2.2.10-3
pn  how-can-i-help                             <none>
pn  libauthen-sasl-perl                        <none>
ii  libdbd-pg-perl                             3.7.4-1
pn  libfile-desktopentry-perl                  <none>
pn  libnet-smtps-perl                          <none>
pn  libterm-size-perl                          <none>
ii  libtimedate-perl                           2.3000-2
pn  libyaml-syck-perl                          <none>
ii  mailutils [mailx]                          1:3.4-1+b1
ii  mozilla-devscripts                         0.52
pn  mutt                                       <none>
ii  openssh-client [ssh-client]                1:7.8p1-1
pn  piuparts                                   <none>
ii  postgresql-client-10 [postgresql-client]   10.5-1
ii  postgresql-client-9.5 [postgresql-client]  9.5.4-3
ii  postgresql-client-9.6 [postgresql-client]  9.6.5-1
ii  quilt                                      0.65-2
pn  ratt                                       <none>
ii  reprotest                                  0.7.8
ii  svn-buildpackage                           0.8.7
ii  w3m                                        0.5.3-36+b1

-- no debconf information

Reply via email to