Commit 6be7b157 authored by Ophélie Gagnard's avatar Ophélie Gagnard

generation: Manage image name properly. Fix a typo.

parent 7797ac14
...@@ -33,3 +33,5 @@ TMP_URL_PATTERN="https://download.opensuse.org/repositories/home:oph.nxd/Debian_ ...@@ -33,3 +33,5 @@ TMP_URL_PATTERN="https://download.opensuse.org/repositories/home:oph.nxd/Debian_
MCA_PACKAGE_URL=${URL_PATTERN}/${MCA_PACKAGE_FILE} MCA_PACKAGE_URL=${URL_PATTERN}/${MCA_PACKAGE_FILE}
FLB_PACKAGE_URL=${TMP_URL_PATTERN}/${FLB_PACKAGE_FILE} FLB_PACKAGE_URL=${TMP_URL_PATTERN}/${FLB_PACKAGE_FILE}
PLG_PACKAGE_URL=${URL_PATTERN}/${PLG_PACKAGE_FILE} PLG_PACKAGE_URL=${URL_PATTERN}/${PLG_PACKAGE_FILE}
UEFI_IMAGE_NAME="linux-${KERNEL_VERSION}_${MCA_NAME_AND_VERSION}_${FLB_NAME_AND_VERSION}_${SERVER_GROUP}.efi"
...@@ -119,7 +119,6 @@ CERT_DIR=uefi-keys/public-certificates ...@@ -119,7 +119,6 @@ CERT_DIR=uefi-keys/public-certificates
KEYS_DIR=uefi-keys/private-keys KEYS_DIR=uefi-keys/private-keys
PUBLIC_CERT_DIR=${PROJECT_DIR}/${CERT_DIR}/${SERVER_GROUP} PUBLIC_CERT_DIR=${PROJECT_DIR}/${CERT_DIR}/${SERVER_GROUP}
PRIVATE_KEYS_DIR=${PROJECT_DIR}/${KEYS_DIR}/${SERVER_GROUP} PRIVATE_KEYS_DIR=${PROJECT_DIR}/${KEYS_DIR}/${SERVER_GROUP}
uefi_image_name="$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -r)_${MCA_NAME_AND_VERSION}_${FLB_NAME_AND_VERSION}_${SERVER_GROUP}".efi
dracut_output_file=dracut-output dracut_output_file=dracut-output
# Install the module # Install the module
...@@ -139,5 +138,5 @@ cd - ...@@ -139,5 +138,5 @@ cd -
additional_dracut_options= additional_dracut_options=
# Create an initramfs image # Create an initramfs image
rm -f "$dracut_output_file" rm -f "$dracut_output_file"
dracut -c ./dracut.module/dracut.conf "$uefi_image_name" -force "$additional_dracut_options" |& tee -a "$dracut_output_file" dracut -c ./dracut.module/dracut.conf "$UEFI_IMAGE_NAME" --force "$additional_dracut_options" |& tee -a "$dracut_output_file"
echo New initramfs image: $(pwd)/"$uefi_image_name" echo New initramfs image: $(pwd)/"$UEFI_IMAGE_NAME"
...@@ -10,7 +10,6 @@ cd $GIT_ROOT ...@@ -10,7 +10,6 @@ cd $GIT_ROOT
source generation/00env.sh source generation/00env.sh
metadata_file=metadata.json metadata_file=metadata.json
uefi_image_name="$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -r)_${MCA_NAME_AND_VERSION}_${FLB_NAME_AND_VERSION}_${SERVER_GROUP}".efi
sha_list=installation/images-sha512.list sha_list=installation/images-sha512.list
hash_comment="# self-compiled kernel, network autoconfig off + dummy ips, rd.neednet=1 LABEL=Root, metadata in shadir, no scan no send" hash_comment="# self-compiled kernel, network autoconfig off + dummy ips, rd.neednet=1 LABEL=Root, metadata in shadir, no scan no send"
...@@ -32,9 +31,10 @@ json_metadata="{ \ ...@@ -32,9 +31,10 @@ json_metadata="{ \
\"comment\": \"$hash_comment\" \ \"comment\": \"$hash_comment\" \
}" }"
echo "$json_metadata" > "$metadata_file" echo "$json_metadata" > "$metadata_file"
networkcache-upload --conf ../tls-access-to-shacache/test.cfg --id river --file "$uefi_image_name" --metadata "$metadata_file" networkcache-upload --conf ../tls-access-to-shacache/test.cfg --id river --file "$UEFI_IMAGE_NAME" --metadata "$metadata_file"
echo $(sha512sum "$uefi_image_name" | cut -d' ' -f1) "$hash_comment" >> "$sha_list" echo $(sha512sum "$UEFI_IMAGE_NAME" | cut -d' ' -f1) "$hash_comment" >> "$sha_list"
echo "$UEFI_IMAGE_NAME"
git add "$sha_list" git add "$sha_list"
git commit -m "installation: Add an image hash." git commit -m "installation: Add an image hash."
git push git push
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment