[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 1/8] xen: calculate XEN_BUILD_TIME using XEN_BUILD_DATE value
Daniel Kiper writes ("Re: [PATCH v2 1/8] xen: calculate XEN_BUILD_TIME using XEN_BUILD_DATE value"): > Well, this complicates situation further and it seems to me that > sed-ery cannot be sufficient. Anyway, I will take a look how to > solve that. Our other current host OS is FreeBSD. FreeBSD's date(1) uses -d for something utterly different (also, something mad). Can we rely on Perl yet ? Perl can do this kind of thing easily enough. Alternatively we could have a wrapper script. Andrew Cooper: > Why are we adding yet more Xen specific logic to implement the same as > SOURCE_DATE_EPOCH from the reproducible-builds.org effort? We should clearly honour SOURCE_DATE_EPOCH. But that's a different question. I think the right thing is something like this: export XEN_BUILD_POSIX_TIME ?= $(shell echo $${SOURCE_DATE_EPOCH-date +%s}) export XEN_BUILD_DATE ?= $(shell LC_ALL=C date_parsing_epoch $(XEN_BUILD_EPOCH)) export XEN_BUILD_TIME ?= $(shell LC_ALL=C date_parsing_epoch $(XEN_BUILD_EPOCH) +%T) Where date_parsing_epoch is this on GNU systems #!/bin/sh set -e epoch=$1; shift date -u -d "@$epoch" "$@" and I think something like this on FreeBSD #!/bin/sh set -e epoch=$1; shift date -u -jn -f%s "$epoch" "$@" Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |