From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 1995066B53 for ; Tue, 28 Jul 2020 12:33:57 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0FD8D237B7 for ; Tue, 28 Jul 2020 12:33:27 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 28702237A5 for ; Tue, 28 Jul 2020 12:33:26 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E1937433B8 for ; Tue, 28 Jul 2020 12:33:25 +0200 (CEST) From: Wolfgang Bumiller To: pbs-devel@lists.proxmox.com Date: Tue, 28 Jul 2020 12:33:14 +0200 Message-Id: <20200728103321.16843-1-w.bumiller@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.033 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [mod.rs, mk-format-hashes.rs, errors.rs, compat.rs, lib.rs] Subject: [pbs-devel] [PATCH pxar/backup 0/6] bump timestamps to 96 bit X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2020 10:33:57 -0000 So apparently modification time values of *before* Jan 1 1970 are a thing, so here's support for that... This bumps the `Entry` struct in pxar (meaning an API bump), and still supports reading old archives. Note that I've introduced a new `StatxTimestamp` struct. I chose this name as the `statx(2)` manpage's `struct statx_timestamp` is the only struct which actually documents the fact that only the seconds are signed, and the nanoseconds are *positive* and *relative* to the seconds, iow. a timestamp of "-3.5 seconds" is represented as "-4 seconds, plus 500_000_000 nanoseconds". (The only other time I found this to be explicitly mentioned is in the `chrono` crate's `TimeZone::timestamp` method which explicitly creates a "DateTime from the number of non-leap seconds since (...) 1970 (...) and the number of nanoseconds since the last whole non-leap second.". Wolfgang Bumiller (6): pxar: add format description to format module introduce StatxTimestamp helper type update mk-format-hashes for a new ENTRY implement Entry v2 add entry v1 compatiblity test bump version to 0.3.0-1 Cargo.toml | 2 +- debian/changelog | 8 ++ examples/mk-format-hashes.rs | 11 ++- src/decoder/mod.rs | 21 +++- src/errors.rs | 25 ----- src/format/mod.rs | 179 ++++++++++++++++++++++++++++++++--- src/lib.rs | 28 +++--- tests/compat.rs | 136 ++++++++++++++++++++++++++ 8 files changed, 353 insertions(+), 57 deletions(-) delete mode 100644 src/errors.rs create mode 100644 tests/compat.rs backup: update to pxar 0.3 to support negative timestamps -- 2.20.1