diff --git a/.gitignore b/.gitignore index 33e241fc1..add2e9567 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ *.swp .idea /package/harvester-os/iso/boot/grub2/harvester.cfg +/package/harvester-os/harvester-release.yaml diff --git a/package/harvester-os/Dockerfile b/package/harvester-os/Dockerfile index de233d166..cbc5be008 100644 --- a/package/harvester-os/Dockerfile +++ b/package/harvester-os/Dockerfile @@ -6,8 +6,9 @@ RUN curl -sfL https://github.com/rancher/wharfie/releases/latest/download/wharfi COPY files/ / RUN chmod 0600 /system/oem/* -RUN rm -f /system/oem/05_network.yaml +COPY harvester-release.yaml /etc/ -ARG HARVESTER_INSTALLER_VERSION +ARG HARVESTER_PRETTY_NAME +RUN sed -i "s/^PRETTY_NAME.*/PRETTY_NAME=\"$HARVESTER_PRETTY_NAME\"/g" /etc/os-release && \ + echo GRUB_ENTRY_NAME="\"$HARVESTER_PRETTY_NAME\"" >> /etc/os-release -RUN echo GRUB_ENTRY_NAME="\"Harvester $HARVESTER_INSTALLER_VERSION\"" >> /etc/os-release diff --git a/scripts/package-harvester-os b/scripts/package-harvester-os index 19b2479e5..241f522f1 100755 --- a/scripts/package-harvester-os +++ b/scripts/package-harvester-os @@ -8,14 +8,30 @@ PACKAGE_HARVESTER_OS_DIR="${TOP_DIR}/package/harvester-os" mkdir -p ${ARTIFACTS_DIR} source ${SCRIPTS_DIR}/version +source ${SCRIPTS_DIR}/version-rke2 +source ${SCRIPTS_DIR}/version-rancher +source ${SCRIPTS_DIR}/version-harvester ${TOP_DIR}/../harvester +source ${SCRIPTS_DIR}/version-monitoring BASE_OS_IMAGE="rancher/harvester-os:20211130" HARVESTER_OS_IMAGE=rancher/harvester-os:$VERSION cd ${PACKAGE_HARVESTER_OS_DIR} + +PRETTY_NAME="Harvester ${VERSION}" + +cat > harvester-release.yaml < iso/boot/grub2/harvester.cfg luet-makeiso iso.yaml --image "${HARVESTER_OS_IMAGE}" --output ${ARTIFACTS_DIR}/${ISO_PREFIX} rm ${ARTIFACTS_DIR}/${ISO_PREFIX}.iso.sha256 diff --git a/scripts/version-rancher b/scripts/version-rancher new file mode 100644 index 000000000..8cef1e01f --- /dev/null +++ b/scripts/version-rancher @@ -0,0 +1 @@ +RANCHER_VERSION="v2.6-638b29a687f3818e7de676a573ec9b9156f193a9-head"