Closed micheloosterhof closed 4 years ago
Can you run:
docker images
and also
docker inspect --format='{{json .Created}}' trustworthysystems/camkes
(assuming you have that particular image trustworthysystems/camkes
- sub in any other trustworthysystems/
image if not.
and finally, try running:
date --date=2020-04-25T18:44:40.822475865Z +%s
and let me know the results of each?
:; docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
trustworthysystems/sel4 latest 1ef2c5921950 4 days ago 2.87GB
user_img-michel latest 44767d3ce9a6 6 days ago 6.58GB
extras latest 4a0fbdf64efc 6 days ago 6.58GB
trustworthysystems/camkes latest 38bc983beee2 6 days ago 6.32GB
trustworthysystems/sel4 <none> ab2964507f41 6 days ago 2.87GB
:; docker inspect --format='{{json .Created}}' trustworthysystems/camkes
"2020-04-24T05:01:05.040785167Z"
:; date --date=2020-04-25T18:44:40.822475865Z +%s
date: illegal option -- -
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
hmm, that is a pain.
I've put up a PR on our internal SCM to check if the date
command is compatible with this use.
In the PR, if it is not compatible, it will just skip this check with a warning.
Not ideal, but at least it avoids crashing behavior. The PR also moves the checks from the Makefile to a bash script, so adding more complex behavior should be much easier in the future. I will try to get a Mac setup somewhere, so I can do some better testing.
Thanks! I agree, avoiding the crash is preferred behaviour. I'm sure the test for age check can be rewritten in a more platform independent way.
This is 'fixed' in this commit: https://github.com/SEL4PROJ/seL4-CAmkES-L4v-dockerfiles/commit/02c017b36263336f2c488324dcd52c2bc7063ac8
I have fixed in inverted commas, because it just does a quick check to see if the date
command behaves as expected, and if not, will skip the check.
This module does not work on MacOS the date command has different flags than Linux.