setup-alpine needs the time set earlier in the script
I was installing Alpine 3.8 recently on some old PCs that had been
turned off long enough that the system clocks were years out of date.
The `setup-alpine` script tries to contact and select the package
repositories before setting up NTP.
Due to the clock being so behind, contacting the repos failed because
the TLS handshake was upset at the time differential (I believe).
CTRL-C out of `setup-alpine` at that point (ie., after networking was
setup) and execute `setup-ntp` by hand followed by `setup-alpine`
again resolved the issue.
But it seems like (if I read `setup-alpine.in` correctly),
`setup-ntp` might be moved from L.198-200 to L.188, ie., before
`setup-apkrepos` (with suitable check for `$quick` added) to make
this a little smoother in this case. Happy to produce a patch if that
seems the right thing to do…?
(from redmine: issue id 9911, created on 2019-01-25, closed on 2019-05-04)
- Changesets:
- Revision 6f613e0f by Natanael Copa on 2019-01-25T15:17:52Z:
main/alpine-conf: set up ntp before repos in setup-alpine
we need time to be correct for https certificate validation.
fixes #9911
- Revision 8c6d977259da9bbf4f416ddc2195bf22483259b5 by Natanael Copa on 2019-02-21T16:20:43Z:
setup-alpine: setup ntp before repos
we need time to be correct for https certificates when setting up
apkrepos, so we call setup-ntp before setup-apkrepos.
ref #9911