diff --git a/katsu/modules/base/base.yaml b/katsu/modules/base/base.yaml index e71db3c..73616c0 100644 --- a/katsu/modules/base/base.yaml +++ b/katsu/modules/base/base.yaml @@ -6,6 +6,9 @@ scripts: - id: selinux-setup name: Set up SELinux file: selinux.sh + - id: buildstamp + name: Generate buildstamp + file: buildstamp.sh dnf: releasever: 39 diff --git a/katsu/modules/base/buildstamp.sh b/katsu/modules/base/buildstamp.sh new file mode 100644 index 0000000..cd14181 --- /dev/null +++ b/katsu/modules/base/buildstamp.sh @@ -0,0 +1,24 @@ +#!/bin/bash -x + +# get data from /etc/os-release + +source /etc/os-release + + +# get date in form of example 202112022224 +DATE=$(date +%Y%m%d%H%M) + +UUID="${DATE}.$(uname -m)" + +# Inject a dummy .buildstamp so Anaconda doesn't complain +cat << EOF > /.buildstamp +[Main] +Product=${NAME} +Version=${VERSION} +BugURL=${BUG_REPORT_URL} +IsFinal=true +UUID=$UUID +Variant=${VARIANT_ID} +[Compose] +Katsu=0.1 +EOF