How to build the rpm package with SHA-256 checksum for files?
- by larrycai
In standard alone RHEL 6.4 rpm build environment, the rpm packages is generated with SHA-256 check sum, which is gotten by command rpm -qp --dump xxx.rpm
[user@redhat64 abc]$ rpm -qp --dump package/rpm/abc-1.0.1-1.x86_64.rpm
..
/opt/company/abc/abc/1.0.1-1/bin/start.sh 507 1398338016 d8820685b6446ee36a85cc1f7387d14537d6f8bf5ce4c5a4ccd2f70e9066c859 0100750 user abcc 0
..
While if it is build in docker environment (still RHEL6.4) the checksum is md5
UPDATE Use Ubuntu 14.04 as docker server, Redhat6.4 is the container inside
[user@c1cbdf51d189 abc]$ rpm -qp --dump package/rpm/abc-1.0.1-1.x86_64.rpm
..
/opt/company/abc/abc/1.0.1-1/bin/start.sh 507 1401952578 f229759944ba77c3c8ba2982c55bbe70 0100750 user abcc 0
..
If I checked the real file, the file is the same
[user@c1cbdf51d189 1.0.1-1]$ sha256sum bin/start.sh
d8820685b6446ee36a85cc1f7387d14537d6f8bf5ce4c5a4ccd2f70e9066c859 bin/start.sh
[user@c1cbdf51d189 1.0.1-1]$ md5sum bin/start.sh
f229759944ba77c3c8ba2982c55bbe70 bin/start.sh
How I configure rpmbuild to let generated rpm file is SHA-256 based ?