From 1756a1a8eab44fd0917800a61a930bd8a7317f57 Mon Sep 17 00:00:00 2001 From: Cappy Ishihara Date: Sun, 22 Oct 2023 07:52:32 +0700 Subject: [PATCH] add buildstamp script, funny stuff --- katsu/modules/base/base.yaml | 3 +++ katsu/modules/base/buildstamp.sh | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 katsu/modules/base/buildstamp.sh 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