Bug#1020914: dget: does not keep mtimes

2022-09-28 Thread Mattia Rizzolo
On Wed, Sep 28, 2022 at 02:42:00PM +0200, Thorsten Glaser wrote:
> Package: devscripts
> Version: 2.21.3+deb11u1
> Severity: normal
> X-Debbugs-Cc: t...@mirbsd.de
> 
> u@u:~/Projekte $ dget -d 
> http://deb.debian.org/debian/pool/main/t/tomcat9/tomcat9_9.0.67-1.dsc
> dget: retrieving 
> http://deb.debian.org/debian/pool/main/t/tomcat9/tomcat9_9.0.67-1.dsc
>   % Total% Received % Xferd  Average Speed   TimeTime Time  
> Current
>  Dload  Upload   Total   SpentLeft  Speed
> 100  2748  100  27480 0  85644  0 --:--:-- --:--:-- --:--:-- 88645
…
> u@u:~/Projekte $ wget 
> http://deb.debian.org/debian/pool/main/t/tomcat9/tomcat9_9.0.67.orig.tar.xz
> --2022-09-28 14:38:25--  
> http://deb.debian.org/debian/pool/main/t/tomcat9/tomcat9_9.0.67.orig.tar.xz
> Resolving deb.debian.org (deb.debian.org)... 2a04:4e42:62::644, 
> 199.232.138.132
> Connecting to deb.debian.org (deb.debian.org)|2a04:4e42:62::644|:80... 
> connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 4053772 (3.9M) [application/x-xz]
> Saving to: ‘tomcat9_9.0.67.orig.tar.xz’
> 
> tomcat9_9.0.67.orig.tar.xz   
> 100%[===>]   3.87M  2.93MB/sin 
> 1.3s
> 
> 2022-09-28 14:38:26 (2.93 MB/s) - ‘tomcat9_9.0.67.orig.tar.xz’ saved 
> [4053772/4053772]

> Why can dget not, or does not, retain the mtime? This would be
> rather useful to have, e.g. when uploading a forked package to
> a local repo I would have the same mtime on the origtgz.


Well, because as you can notice it's a different program...

dget uses curl by default, and curl by default doesn't try to retain
mtimes, as wget does

-- 
regards,
Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540  .''`.
More about me:  https://mapreri.org : :'  :
Launchpad user: https://launchpad.net/~mapreri  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-


signature.asc
Description: PGP signature


Bug#1020914: dget: does not keep mtimes

2022-09-28 Thread Thorsten Glaser
Package: devscripts
Version: 2.21.3+deb11u1
Severity: normal
X-Debbugs-Cc: t...@mirbsd.de

(shortened a bit)

u@u:~/Projekte $ dget -d 
http://deb.debian.org/debian/pool/main/t/tomcat9/tomcat9_9.0.67-1.dsc
dget: retrieving 
http://deb.debian.org/debian/pool/main/t/tomcat9/tomcat9_9.0.67-1.dsc
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
100  2748  100  27480 0  85644  0 --:--:-- --:--:-- --:--:-- 88645
dget: retrieving 
http://deb.debian.org/debian/pool/main/t/tomcat9/tomcat9_9.0.67.orig.tar.xz
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
100 3958k  100 3958k0 0  2510k  0  0:00:01  0:00:01 --:--:-- 2510k
dget: retrieving 
http://deb.debian.org/debian/pool/main/t/tomcat9/tomcat9_9.0.67-1.debian.tar.xz
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
100 36016  100 360160 0  1082k  0 --:--:-- --:--:-- --:--:-- 1099k
tomcat9_9.0.67-1.dsc:
  Good signature found
   validating tomcat9_9.0.67.orig.tar.xz
   validating tomcat9_9.0.67-1.debian.tar.xz
All files validated successfully.
u@u:~/Projekte $ ll -d tomc*
-rw-r--r--  1 u u   36016 28. Sep 14:38 tomcat9_9.0.67-1.debian.tar.xz
-rw-r--r--  1 u u2748 28. Sep 14:38 tomcat9_9.0.67-1.dsc
-rw-r--r--  1 u u 4053772 28. Sep 14:38 tomcat9_9.0.67.orig.tar.xz
u@u:~/Projekte $ rm tomcat9_9.0.67.orig.tar.xz
u@u:~/Projekte $ wget 
http://deb.debian.org/debian/pool/main/t/tomcat9/tomcat9_9.0.67.orig.tar.xz
--2022-09-28 14:38:25--  
http://deb.debian.org/debian/pool/main/t/tomcat9/tomcat9_9.0.67.orig.tar.xz
Resolving deb.debian.org (deb.debian.org)... 2a04:4e42:62::644, 199.232.138.132
Connecting to deb.debian.org (deb.debian.org)|2a04:4e42:62::644|:80... 
connected.
HTTP request sent, awaiting response... 200 OK
Length: 4053772 (3.9M) [application/x-xz]
Saving to: ‘tomcat9_9.0.67.orig.tar.xz’

tomcat9_9.0.67.orig.tar.xz   100%[===>] 
  3.87M  2.93MB/sin 1.3s

2022-09-28 14:38:26 (2.93 MB/s) - ‘tomcat9_9.0.67.orig.tar.xz’ saved 
[4053772/4053772]

u@u:~/Projekte $ ll -d tomc*ori*
-rw-r--r--  1 u u 4053772 27. Sep 01:03 tomcat9_9.0.67.orig.tar.xz


Why can dget not, or does not, retain the mtime? This would be
rather useful to have, e.g. when uploading a forked package to
a local repo I would have the same mtime on the origtgz.


-- Package-specific info:

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

--- ~/.devscripts ---
DEBCHANGE_AUTO_NMU=no
DEBCHANGE_MAINTTRAILER=no
DEBCHANGE_MULTIMAINT_MERGE=yes

-- System Information:
Debian Release: 11.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'oldstable-updates'), (500, 'oldoldstable'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-10-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/lksh
Init: sysvinit (via /sbin/init)

Versions of packages devscripts depends on:
ii  dpkg-dev  1.20.12
ii  fakeroot  1.25.3-1.1
ii  file  1:5.39-3
ii  gnupg 2.2.27-2+deb11u2
ii  gpgv  2.2.27-2+deb11u2
ii  libc6 2.31-13+deb11u4
ii  libfile-dirlist-perl  0.05-2
ii  libfile-homedir-perl  1.006-1
ii  libfile-touch-perl0.11-1
ii  libfile-which-perl1.23-1
ii  libipc-run-perl   20200505.0-1
ii  libmoo-perl   2.004004-1
ii  libwww-perl   6.53-1
ii  patchutils0.4.2-1
ii  perl  5.32.1-4+deb11u2
ii  python3   3.9.2-3
ii  sensible-utils0.0.14
ii  wdiff 1.2.2-2+b1

Versions of packages devscripts recommends:
ii  apt 2.2.4
ii  curl7.85.0-1~bpo11+1
ii  dctrl-tools 2.24-3+b1
ii  debian-keyring  2021.07.26
ii  dput1.1.0
pn  equivs  
pn  libdistro-info-perl 
ii  libdpkg-perl1.20.12
ii  libencode-locale-perl   1.05-1.1
pn  libgit-wrapper-perl 
pn  libgitlab-api-v4-perl   
ii  liblist-compare-perl0.55-1
ii  liblwp-protocol-https-perl  6.10-1
pn  libsoap-lite-perl   
ii  libstring-shellquote-perl   1.04-1
ii  libtry-tiny-perl0.30-1
ii  liburi-perl 5.08-1
ii  licensecheck3.1.1-2
ii  lintian 2.104.0
ii  man-db  2.9.4-2
ii  patch   2.7.6-7
ii  pristine-tar1.49
ii  python3-apt 2.2.1
ii  python3-debian  0.1.39
ii  python3-magic