Your message dated Wed, 28 Dec 2022 17:35:05 +0000
with message-id <e1paakx-000ueo...@fasolo.debian.org>
and subject line Bug#1026875: fixed in elan 1.4.2-3
has caused the Debian Bug report #1026875,
regarding elan - update for rust-zip 0.6
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
1026875: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026875
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: elan
Version: 1.4.2-2
We would like to update the zip crate to 0.6, I have uploaded the new version
to experimental to allow testing with it.
I bumped the dependency in elan and most of the code built fine, but there was
one chunk of code that failed.
let mtime = entry.last_modified().to_time().to_timespec();
let mtime = filetime::FileTime::from_unix_time(mtime.sec,
mtime.nsec as u32);
zip 0.6 has moved from time 0.1 to time 0.3 and as a result of this the return
type of to_time() has changed from "Tm" to
"Result<OffsetDateTime, ComponentRange>"
This raises a couple of issues, the first is that OffsetDateTime does not have a
to_timespec function, it does however have a unix_timestamp_nanos function which
can be used to achieve much the same goal.
The second though, is what to do about error handling. The old code in time 0.1
just blundered on if invalid values were supplied, but the new time 0.3 codepath
includes error checking. So that leaves the question of what to do if an error
happens during timestamp conversion, should some default value be used or
should the error be propagated to the caller.
My current patch takes the latter approach, passing the error up to the caller.
I have also raised this issue upstream at
https://github.com/leanprover/elan/issues/85
At the present time, this bug report is filed for information, I still need
to check out the other reverse dependencies of rust-zip, and I would also like
feedback from upstream on this issue if possible.
diff -Nru elan-1.4.2/debian/changelog elan-1.4.2/debian/changelog
--- elan-1.4.2/debian/changelog 2022-12-01 20:58:32.000000000 +0000
+++ elan-1.4.2/debian/changelog 2022-12-23 02:54:30.000000000 +0000
@@ -1,3 +1,10 @@
+elan (1.4.2-2.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Update for rust-zip 0.6
+
+ -- Peter Michael Green <plugw...@debian.org> Fri, 23 Dec 2022 02:54:30 +0000
+
elan (1.4.2-2) unstable; urgency=medium
* Add lake symlink
diff -Nru elan-1.4.2/debian/control elan-1.4.2/debian/control
--- elan-1.4.2/debian/control 2022-12-01 20:52:28.000000000 +0000
+++ elan-1.4.2/debian/control 2022-12-23 02:10:54.000000000 +0000
@@ -24,7 +24,7 @@
librust-toml-dev,
librust-url-dev,
librust-wait-timeout-dev,
- librust-zip-dev,
+ librust-zip-0.6-dev,
librust-clap+atty-dev,
librust-clap+strsim-dev,
librust-clap+vec-map-dev,
@@ -41,7 +41,7 @@
librust-openssl-probe-dev,
librust-backtrace-sys-dev,
librust-markdown-dev,
- librust-zip+time-dev,
+ librust-zip-0.6+time-dev,
librust-zstd-dev,
bash-completion
Standards-Version: 4.6.1.0
diff -Nru elan-1.4.2/debian/patches/series elan-1.4.2/debian/patches/series
--- elan-1.4.2/debian/patches/series 2022-12-01 20:52:28.000000000 +0000
+++ elan-1.4.2/debian/patches/series 2022-12-23 02:13:45.000000000 +0000
@@ -1,2 +1,3 @@
build.patch
0002-dependencies.patch
+zip-0.6.patch
diff -Nru elan-1.4.2/debian/patches/zip-0.6.patch
elan-1.4.2/debian/patches/zip-0.6.patch
--- elan-1.4.2/debian/patches/zip-0.6.patch 1970-01-01 00:00:00.000000000
+0000
+++ elan-1.4.2/debian/patches/zip-0.6.patch 2022-12-23 02:54:30.000000000
+0000
@@ -0,0 +1,87 @@
+Description: update for zip 0.6
+ Zip 0.6 moved from time 0.1 to time 0.3 which changes how timestamps are
+ handled.
+
+ The old implementation did not do any checking of validity during the
+ timestamp conversion process and just blundered on if an invalid timestamp
+ was supplied. The new implementation on the other hand can return an error.
+
+ This patch makes elan build with the new version of zip, currently it
+ handles the new error by passing it up to the caller.
+Author: Peter Michael Green <plugw...@debian.org>
+
+Index: elan-1.4.2/Cargo.toml
+===================================================================
+--- elan-1.4.2.orig/Cargo.toml
++++ elan-1.4.2/Cargo.toml
+@@ -47,7 +47,7 @@ time = "0.3.4"
+ toml = "0.5.8"
+ url = "2.2.0"
+ wait-timeout = "0.2.0"
+-zip = "0.5.9"
++zip = "0.6"
+ tar = ">=0.4.36"
+ flate2 = "1.0.14"
+ json = "0.12.4"
+Index: elan-1.4.2/src/elan-dist/Cargo.toml
+===================================================================
+--- elan-1.4.2.orig/src/elan-dist/Cargo.toml
++++ elan-1.4.2/src/elan-dist/Cargo.toml
+@@ -22,8 +22,9 @@ remove_dir_all = "0.7.0"
+ elan-utils = { path = "../elan-utils" }
+ error-chain = "0.12.4"
+ json = "0.12.4"
+-zip = "0.5.13"
++zip = "0.6"
+ filetime = "0.2.14"
++time = "0.3"
+
+ [target."cfg(not(windows))".dependencies]
+ libc = "0.2.88"
+Index: elan-1.4.2/src/elan-dist/src/component/package.rs
+===================================================================
+--- elan-1.4.2.orig/src/elan-dist/src/component/package.rs
++++ elan-1.4.2/src/elan-dist/src/component/package.rs
+@@ -122,8 +122,8 @@ impl<'a> ZipPackage<'a> {
+ }
+ }
+ } // make sure to close `dst` before setting mtime
+- let mtime = entry.last_modified().to_time().to_timespec();
+- let mtime = filetime::FileTime::from_unix_time(mtime.sec,
mtime.nsec as u32);
++ let mtime =
entry.last_modified().to_time()?.unix_timestamp_nanos();
++ let mtime = filetime::FileTime::from_unix_time((mtime /
1000000000) as i64 , (mtime % 1000000000) as u32);
+ filetime::set_file_times(&full_path, mtime, mtime).unwrap();
+ }
+
+Index: elan-1.4.2/src/elan-dist/src/errors.rs
+===================================================================
+--- elan-1.4.2.orig/src/elan-dist/src/errors.rs
++++ elan-1.4.2/src/elan-dist/src/errors.rs
+@@ -4,6 +4,7 @@ use std::io::{self, Write};
+ use std::path::PathBuf;
+ use temp;
+ use toml;
++use time::error::ComponentRange;
+
+ error_chain! {
+ links {
+@@ -13,6 +14,7 @@ error_chain! {
+ foreign_links {
+ Temp(temp::Error);
+ Io(io::Error);
++ Time(ComponentRange);
+ }
+
+ errors {
+Index: elan-1.4.2/src/elan-dist/src/lib.rs
+===================================================================
+--- elan-1.4.2.orig/src/elan-dist/src/lib.rs
++++ elan-1.4.2/src/elan-dist/src/lib.rs
+@@ -13,6 +13,7 @@ extern crate error_chain;
+ extern crate json;
+ extern crate sha2;
+ extern crate zip;
++extern crate time;
+
+ #[cfg(not(windows))]
+ extern crate libc;
--- End Message ---
--- Begin Message ---
Source: elan
Source-Version: 1.4.2-3
Done: Christopher Hoskin <mans0...@debian.org>
We believe that the bug you reported is fixed in the latest version of
elan, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1026...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Christopher Hoskin <mans0...@debian.org> (supplier of updated elan package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Wed, 28 Dec 2022 17:00:31 +0000
Source: elan
Architecture: source
Version: 1.4.2-3
Distribution: sid
Urgency: medium
Maintainer: Christopher Hoskin <mans0...@debian.org>
Changed-By: Christopher Hoskin <mans0...@debian.org>
Closes: 1026875
Changes:
elan (1.4.2-3) unstable; urgency=medium
.
* Fix "elan - update for rust-zip 0.6" cherry-pick upstream commit
(Closes: #1026875)
Checksums-Sha1:
049a41df5d09126e53f4cd0617ad757e7fc4c2e0 2681 elan_1.4.2-3.dsc
f31c8d90f04d65642db866c447933572849c3f0d 6284 elan_1.4.2-3.debian.tar.xz
b21dd4ca919928e1dce48dc1b7247c8731fc3762 18291 elan_1.4.2-3_amd64.buildinfo
Checksums-Sha256:
9ae89c59cecadd7cda8155b2ad5c252252094796640d4f1ea5cc121d23ddc962 2681
elan_1.4.2-3.dsc
b5345081f27f7b5ef46f9af2a3c633e77ac36cb8c376df256873924fb6c09d59 6284
elan_1.4.2-3.debian.tar.xz
afb63754acc7ad0dc69f33339d604b7d34cd75549b8401698b262ac0c0bd084d 18291
elan_1.4.2-3_amd64.buildinfo
Files:
74eb7cc022862236aa1430ac1192a98e 2681 math optional elan_1.4.2-3.dsc
0da39baa1a9dcc586715388e9013b770 6284 math optional elan_1.4.2-3.debian.tar.xz
e1ac715c0e93939fd8381b27d677a20c 18291 math optional
elan_1.4.2-3_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEbctJ5K6JlvFsvhGhf6qUsnUUSpoFAmOsecIACgkQf6qUsnUU
Spp9Ng/+OJkyC2FjlGmxe77BUY2qGZNjaLbdtLeDwIOy2E/8Ja+CUUGr+tHt8kev
Et92lIpftX1u4xmBFh/QHfuBCCE5XDfqI90HzaB/maFHeaqqiY6fvCUEA4FzDbE6
+d4M70BpIAUbkWzt2A8ptj1fGLoV2Z3P2Gf9//HwRT0XKZykhdLdSTViDR1nvaDb
o3iW0EwbZx+TmhSMyawAiCh2rFaYAiscOWMBF0jixg4nEQs1aeCm9oVjXT6RA3Bk
ystotRoPO5bLO2KB61M93u/v8y4SWhSRWeF24eEFwNZk10+QZLinGsp/5LhL4xRW
8sCk6Rme96JZN6dI4x/5gJv9oWGe13sNqpfzyuf04goJgBzcObXR2QTxGJFm/vwo
Fqrk2+eVTIijZgYxsOmYWyMtn00EGY9q9wLcQmL80eNLatk0z3RNq4n5dnvz+UAi
cY1V3glBQoM6Z/o2zUUVaF5VovqvZDeGM3/zfVN9PbLwWsGT/SCOs5zPN4bwmJC4
GtxfELBm00t7zXzPBEmVoababuDIHTlSAdye9QmT8jtT68q4GKBRqMNpngCUfnJR
S7ThGiLdqn9Jg9B5Ahaavfi05SxN7gT4av8hJKzdSGb2Gc5rf7vHBxCsosIAuIei
yVAByJp4iocFId9K/kyZw2MSWuxVKIY5ENkf7Kj1SC64uTItXPU=
=Qecd
-----END PGP SIGNATURE-----
--- End Message ---