Commit Graph

2 Commits

Author SHA1 Message Date
Eugene Syromiatnikov 315a5ea0a9 gen_provides.sh: make microcode header decoding endianness-agnostic
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>
2021-07-26 23:18:05 +02:00
Eugene Syromiatnikov 3e73f633e5 Import RHEL packaging
Sync with current RHEL 8.5 packaging.

Resolves: #1880064
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
2021-07-26 18:44:11 +02:00