Bug 51493 - Despite update/secure_apt=no apt-get update refuses to pull packages files if system clock is behind
Despite update/secure_apt=no apt-get update refuses to pull packages files if...
Status: NEW
Product: UCS
Classification: Unclassified
Component: univention-base-files
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
https://bugs.debian.org/cgi-bin/bugre...
:
Depends on: 51498
Blocks:
  Show dependency treegraph
 
Reported: 2020-06-15 10:30 CEST by Arvid Requate
Modified: 2020-11-26 13:27 CET (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
extend-Max-FutureTime.patch (579 bytes, patch)
2020-06-15 10:30 CEST, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2020-06-15 10:30:47 CEST
Created attachment 10390 [details]
extend-Max-FutureTime.patch

With the first UCS 5.0 iso images apt got more sensitive to the system clock. Even with a UCR setting of update/secure_apt=no apt-get update will refuse to pull the packages lists if the system time of the UCS VM is more than 10 seconds behind the signature of the Release file:

E: Release file for http://192.168.0.10/build2/ucs_5.0-0/source/Release is not valid yet (invalid for another 2 d 19 h 44 min 10 s). Updates for this repository will not be applied.

The attached patch may extend the 'Max-FutureTime' parameter to 10 years.
Comment 1 Philipp Hahn univentionstaff 2020-06-16 09:21:48 CEST
FYI: At first the "Release" file is downloaded and validated; as it is from the future, validation fails and the (updated) "Package" file is NOT downloaded - it would not be trusted anyway and as such the old file is kept.
Even if the local time of the VM is corrected later on, APT does not fetch the "Release" file again if it was not updated in between - APT uses HTTPs "If-Modified-Since" with the original time stamp (from the future) as previously returned by our EXTERNAL repository server in the initial fetch.
As the "Release" file is not updated, the "Package" update is skipped again.

My advise is: Fix your ONE underlying time problem instead of fixing the TEN followup and other obscure and hard-to-debug issues like
- gpg might complain too for {pre,post}up.sh.php
- wget https://
- ...
Comment 2 Florian Best univentionstaff 2020-06-18 09:56:21 CEST
Workaround: rm -f /var/lib/apt/lists/omar* && apt update
Comment 3 Philipp Hahn univentionstaff 2020-11-26 13:16:54 CET
I filed an Upstream Debian APT bug for this:
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975903>
Comment 4 Philipp Hahn univentionstaff 2020-11-26 13:27:58 CET
As a temporary work-around during UCS 5.0-0 development:

[5.0-0] 842f138ab0 Bug #51493 base: Temporary work-around for time skew.
 base/univention-base-files/conffiles/etc/apt/apt.conf.d/20secureapt | 1 +
 base/univention-base-files/debian/changelog                         | 6 ++++++
 2 files changed, 7 insertions(+)