Unfortunately, hexdump doesn't support enforcing endianness of printed
fields (or printing of fields out of order, for that matter), and there
is no trivial analogue of dd conv=swab for 4-byte swaps, so we use xxd's
so-called "little-endian mode" to convert the endianness to big endian,
then print fields per-byte with hexdump and process the constructed
0xaabbccdd numbers. Note that this also swaps the order of the date fields
to mm.dd.yyYY (instead of YYyy.mm.dd).
* gen_provides.sh: Pipe dd, xxd, and xxd -r to swap quad-bytes into big
endian, print them as sequences of bytes to construct the fields
of necessary size.
* microcode_ctl.spec (BuildRequires): Add /usr/bin/xxd.
Resolves: #1880064
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
* gen_updates2.py (read_revs_dir): Consistently prefix struct.unpack
formats with "<" to signify that it is little-endian data.
Resolves: #1880064
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
It makes little sense in some places, but that is subject to some future
fixes.
Resolves: #1880064
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Apparently, it was short-lived. The python interpreter binary name
is still has to be provided explicitly, though; as well as the build
dependency, since the buildroot no longer contains a python interpreter.
Resolves: #1880064
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>