Add package ftp
Aloïs Micard
3 years ago
0 | rust-ftp (3.0.1-1) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium | |
1 | ||
2 | * Package ftp 3.0.1 from crates.io using debcargo 2.4.2 | |
3 | ||
4 | -- Alois Micard <alois@micard.lu> Tue, 28 Jul 2020 18:31:07 +0000 |
0 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | |
1 | Upstream-Name: ftp | |
2 | Upstream-Contact: Matt McCoy <mattnenterprise@yahoo.com> | |
3 | Source: https://github.com/mattnenterprise/rust-ftp | |
4 | ||
5 | Files: * | |
6 | Copyright: 2014-2020 Matt McCoy <mattnenterprise@yahoo.com> | |
7 | License: Apache-2.0 or MIT | |
8 | ||
9 | Files: debian/* | |
10 | Copyright: | |
11 | 2020 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> | |
12 | 2020 Alois Micard <alois@micard.lu> | |
13 | License: Apache-2.0 or MIT | |
14 | ||
15 | License: Apache-2.0 | |
16 | Debian systems provide the Apache 2.0 license in | |
17 | /usr/share/common-licenses/Apache-2.0 | |
18 | ||
19 | License: MIT | |
20 | Permission is hereby granted, free of charge, to any person obtaining a copy | |
21 | of this software and associated documentation files (the "Software"), to deal | |
22 | in the Software without restriction, including without limitation the rights | |
23 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
24 | copies of the Software, and to permit persons to whom the Software is | |
25 | furnished to do so, subject to the following conditions: | |
26 | . | |
27 | The above copyright notice and this permission notice shall be included in all | |
28 | copies or substantial portions of the Software. | |
29 | . | |
30 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
31 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
32 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
33 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
34 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
35 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
36 | SOFTWARE. |
0 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | |
1 | Upstream-Name: ftp | |
2 | Upstream-Contact: Matt McCoy <mattnenterprise@yahoo.com> | |
3 | Source: https://github.com/mattnenterprise/rust-ftp | |
4 | ||
5 | Files: * | |
6 | Copyright: FIXME (overlay) UNKNOWN-YEARS Matt McCoy <mattnenterprise@yahoo.com> | |
7 | License: Apache-2.0 or MIT | |
8 | Comment: | |
9 | FIXME (overlay): Since upstream copyright years are not available in | |
10 | Cargo.toml, they were extracted from the upstream Git repository. This may not | |
11 | be correct information so you should review and fix this before uploading to | |
12 | the archive. | |
13 | ||
14 | Files: ./LICENSE-MIT | |
15 | Copyright: 2015 The rust-ftp Developers | |
16 | License: UNKNOWN-LICENSE; FIXME (overlay) | |
17 | Comment: | |
18 | FIXME (overlay): These notices are extracted from files. Please review them | |
19 | before uploading to the archive. | |
20 | ||
21 | Files: debian/* | |
22 | Copyright: | |
23 | 2020 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> | |
24 | 2020 Alois Micard <alois@micard.lu> | |
25 | License: Apache-2.0 or MIT | |
26 | ||
27 | License: Apache-2.0 | |
28 | Debian systems provide the Apache 2.0 license in | |
29 | /usr/share/common-licenses/Apache-2.0 | |
30 | ||
31 | License: MIT | |
32 | Permission is hereby granted, free of charge, to any person obtaining a copy | |
33 | of this software and associated documentation files (the "Software"), to deal | |
34 | in the Software without restriction, including without limitation the rights | |
35 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
36 | copies of the Software, and to permit persons to whom the Software is | |
37 | furnished to do so, subject to the following conditions: | |
38 | . | |
39 | The above copyright notice and this permission notice shall be included in all | |
40 | copies or substantial portions of the Software. | |
41 | . | |
42 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
43 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
44 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
45 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
46 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
47 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
48 | SOFTWARE. |
0 | --- a/Cargo.toml | |
1 | +++ b/Cargo.toml | |
2 | @@ -29,14 +29,14 @@ | |
3 | version = "0.2" | |
4 | ||
5 | [dependencies.lazy_static] | |
6 | -version = "0.1" | |
7 | +version = "1.4.0" | |
8 | ||
9 | [dependencies.openssl] | |
10 | version = "0.9" | |
11 | optional = true | |
12 | ||
13 | [dependencies.regex] | |
14 | -version = "0.1" | |
15 | +version = "1.3.7" | |
16 | ||
17 | [features] | |
18 | debug_print = [] |
0 | --- a/Cargo.toml | |
1 | +++ b/Cargo.toml | |
2 | @@ -26,7 +26,7 @@ | |
3 | name = "ftp" | |
4 | path = "src/lib.rs" | |
5 | [dependencies.chrono] | |
6 | -version = "0.2" | |
7 | +version = "0.4.11" | |
8 | ||
9 | [dependencies.lazy_static] | |
10 | version = "1.4.0" | |
11 | --- a/src/ftp.rs | |
12 | +++ b/src/ftp.rs | |
13 | @@ -9,7 +9,7 @@ | |
14 | use std::str::FromStr; | |
15 | use std::net::ToSocketAddrs; | |
16 | use regex::Regex; | |
17 | -use chrono::{DateTime, UTC}; | |
18 | +use chrono::{DateTime, Utc}; | |
19 | use chrono::offset::TimeZone; | |
20 | #[cfg(feature = "secure")] | |
21 | use openssl::ssl::{ SslContext, Ssl }; | |
22 | @@ -422,7 +422,7 @@ | |
23 | ||
24 | /// Retrieves the modification time of the file at `pathname` if it exists. | |
25 | /// In case the file does not exist `None` is returned. | |
26 | - pub fn mdtm(&mut self, pathname: &str) -> Result<Option<DateTime<UTC>>> { | |
27 | + pub fn mdtm(&mut self, pathname: &str) -> Result<Option<DateTime<Utc>>> { | |
28 | try!(self.write_str(format!("MDTM {}\r\n", pathname))); | |
29 | let Line(_, content) = try!(self.read_response(status::FILE)); | |
30 | ||
31 | @@ -438,7 +438,7 @@ | |
32 | caps[5].parse::<u32>().unwrap(), | |
33 | caps[6].parse::<u32>().unwrap() | |
34 | ); | |
35 | - Ok(Some(UTC.ymd(year, month, day).and_hms(hour, minute, second))) | |
36 | + Ok(Some(Utc.ymd(year, month, day).and_hms(hour, minute, second))) | |
37 | }, | |
38 | None => Ok(None) | |
39 | } |