build-iso: Create package_checksums file within iso

Extended build-iso to create the package_checksums file
after the Packages subdirectory has been created and all rpms
are signed.  It can be found in the root directory of the
mounted iso.

The kickstarts will have to be extended to copy the
package_checksums from the iso to the final location
on the controller.

Story: 2009948
Task: 45219
Signed-off-by: Scott Little <scott.little@windriver.com>
Change-Id: I4cf064911600f89e356527ee274f40c6ce14a990
This commit is contained in:
Scott Little 2022-04-29 11:13:46 -04:00
parent 5d4d629bbb
commit b7ecbcc3ba
1 changed files with 19 additions and 1 deletions

View File

@ -449,6 +449,18 @@ function init_output_dir {
echo ""
}
function package_content_checksum {
local p=$1
local md5
local r
r=$(basename $p)
md5=$( ( rpm2cpio $p;
rpm -q --info -p $p;
rpm -q --dump -p $p;
rpm -q --scripts -p $p ) | md5sum | cut -d ' ' -f 1)
echo "$r $md5"
}
function final_touches {
OLD_PWD=$PWD
@ -480,7 +492,13 @@ function final_touches {
# create the repo
\cd $OUTPUT_DIST_DIR/isolinux
$CREATEREPO -q -g ../comps.xml .
# Create package_checksums
printf "creating package_checksums file\n"
for r in $(ls Packages/*rpm); do
package_content_checksum $r
done > package_checksums
# build the ISO
printf "Building image $OUTPUT_FILE\n"
\cd $OUTPUT_DIST_DIR