Skip to content

Commit

Permalink
Begin work to break repositories up to follow upstream release versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
fewtarius committed Dec 5, 2024
1 parent b62f390 commit 4b81007
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 141 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ _work/
release/
rootfs/installer/packages.x86_64
rootfs/installer/airootfs/etc/install.image/
rootfs/installer/pacman.conf
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export WORK_DIR := ${BUILD_DIR}/_work
export IMAGE_DIR := ${BUILD_DIR}/release/images
export REPO_DIR := ${BUILD_DIR}/release/repos
export BUILD_VER := $(shell date +%Y%m%d.%H%M)
export UPSTREAM_VERSION := 3.6

RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(RUN_ARGS):;@:)
Expand All @@ -23,6 +24,7 @@ repo-clean:
sudo rm -rf ${REPO_DIR}

image-clean:
sudo umount -qR ${WORK_DIR}/image/buildwork/rootfs_mnt ||:
sudo rm -rf ${WORK_DIR} ${IMAGE_DIR}

build-clean:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,25 @@ LocalFileSigLevel = Optional
[steamfork]
Include = /etc/pacman.d/steamfork-mirrorlist

[jupiter-3.6]
[jupiter-@UPSTREAM_VERSION@]
Server = https://steamdeck-packages.steamos.cloud/archlinux-mirror/$repo/os/$arch

[holo-3.6]
[holo-@UPSTREAM_VERSION@]
Server = https://steamdeck-packages.steamos.cloud/archlinux-mirror/$repo/os/$arch

[core-3.6]
[core-@UPSTREAM_VERSION@]
Server = https://steamdeck-packages.steamos.cloud/archlinux-mirror/$repo/os/$arch

[extra-3.6]
[extra-@UPSTREAM_VERSION@]
Server = https://steamdeck-packages.steamos.cloud/archlinux-mirror/$repo/os/$arch

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community-3.6]
[community-@UPSTREAM_VERSION@]
Server = https://steamdeck-packages.steamos.cloud/archlinux-mirror/$repo/os/$arch

[multilib-3.6]
[multilib-@UPSTREAM_VERSION@]
Server = https://steamdeck-packages.steamos.cloud/archlinux-mirror/$repo/os/$arch

# An example of a custom package repository. See the pacman manpage for
Expand Down
6 changes: 6 additions & 0 deletions metadata/steamfork-mirrorlist
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Server = https://www.steamfork.org/@UPSTREAM_VERSION@/@RELEASE_TYPE@
Server = https://www1.ny.steamfork.org/@UPSTREAM_VERSION@/@RELEASE_TYPE@
Server = https://www1.da.steamfork.org/@UPSTREAM_VERSION@/@RELEASE_TYPE@
Server = https://www1.sj.steamfork.org/@UPSTREAM_VERSION@/@RELEASE_TYPE@
Server = https://www1.as.steamfork.org/@UPSTREAM_VERSION@/@RELEASE_TYPE@
Server = https://www2.as.steamfork.org/@UPSTREAM_VERSION@/@RELEASE_TYPE@
6 changes: 0 additions & 6 deletions rootfs/installer/airootfs/etc/pacman.d/steamfork-mirrorlist

This file was deleted.

2 changes: 1 addition & 1 deletion rootfs/installer/package_lists/full.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ gpm
zenity
gptfdisk
grml-zsh-config
core-3.6/grub
core-@UPSTREAM_VERSION@/grub
hdparm
hyperv
intel-ucode
Expand Down
2 changes: 1 addition & 1 deletion rootfs/installer/package_lists/minimal.x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ gpm
zenity
gptfdisk
grml-zsh-config
core-3.6/grub
core-${UPSTREAM_VERSION}/grub
hdparm
hyperv
intel-ucode
Expand Down
107 changes: 0 additions & 107 deletions rootfs/installer/pacman.conf

This file was deleted.

9 changes: 5 additions & 4 deletions rootfs/installer/profiledef.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
source /tmp/buildinfo

iso_name="steamfork-${STAGING_RELEASETYPE}"
iso_label="STEAMFORK_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)"
iso_publisher="fewtarius"
iso_application="Squirrel?"
iso_label="STEAMFORK_${STAGING_OS_TAG}"
iso_publisher="Steamfork"
iso_application="SteamFork Installation Media"
iso_version="${STAGING_OS_TAG}"
install_dir="arch"
buildmodes=('iso')
bootmodes=('bios.syslinux.mbr' 'bios.syslinux.eltorito'
'uefi-ia32.grub.esp' 'uefi-x64.grub.esp'
'uefi-ia32.grub.eltorito' 'uefi-x64.grub.eltorito')
arch="x86_64"
pacman_conf="pacman.conf"

pacman_conf="airootfs/etc/pacman.conf"
airootfs_image_type="squashfs"
airootfs_image_tool_options=('-comp' 'xz' '-Xbcj' 'x86' '-b' '128K' '-Xdict-size' '100%')
file_permissions=(
Expand Down
35 changes: 30 additions & 5 deletions rootfs/steamfork/build-image
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ case $key in
shift
shift
;;
--upstream_ver)
UPSTREAM_VERSION=$2
echo "Upstream Version: ${UPSTREAM_VERSION}"
shift
shift
;;
--snapshot_ver)
SNAPSHOTVERSION="$2"
echo "Build version: ${SNAPSHOTVERSION}"
Expand Down Expand Up @@ -116,19 +122,29 @@ else
fi

source ${BUILD_MANIFEST}
PACCFG=${SCRIPTPATH}/postcopy/etc/pacman.conf


ROOT_WORKDIR=${WORKDIR}/rootfs_mnt
echo "Preparing to create deployment image..."
# Pre-build cleanup
umount -l ${ROOT_WORKDIR}
rm -rf ${WORKDIR}/*.img*
rm -rf ${WORKDIR}/*.img
rm -rf ${WORKDIR}/work.img
if [ -d "${WORKDIR}" ]
then
rm -rf ${WORKDIR}
fi

# Start building here
mkdir -p ${WORKDIR}

PACCFG_SOURCE="metadata/pacman.conf"
cp -f ${PACCFG_SOURCE} ${WORKDIR}
sed -i 's~@UPSTREAM_VERSION@~'${UPSTREAM_VERSION}'~g' ${WORKDIR}/pacman.conf
PACCFG=${WORKDIR}/pacman.conf

SF_PACCFG_SOURCE="metadata/steamfork-mirrorlist"
cp -f ${SF_PACCFG_SOURCE} ${WORKDIR}
sed -i 's~@UPSTREAM_VERSION@~'${UPSTREAM_VERSION}'~g' ${WORKDIR}/steamfork-mirrorlist
SF_PACCFG=${WORKDIR}/steamfork-mirrorlist

mkdir -p ${OUTPUT}
mkdir -p ${ROOT_WORKDIR}
fallocate -l 10000MB ${WORKDIR}/work.img
Expand Down Expand Up @@ -161,6 +177,12 @@ echo "Bootstrapping SteamFork core root.."
pacstrap -C ${PACCFG} ${ROOT_WORKDIR} ${UI_BOOTSTRAP}
rm ${ROOT_WORKDIR}/etc/pacman.conf
cp ${PACCFG} ${ROOT_WORKDIR}/etc/pacman.conf

if [ ! -d "${ROOT_WORKDIR}/etc/pacman.d" ]
mkdir -p "${ROOT_WORKDIR}/etc/pacman.d"
fi
cp ${SF_PACCFG} ${ROOT_WORKDIR}/etc/pacman.d

if [ ! -d "${ROOT_WORKDIR}/usr/share/defaults" ]
then
mkdir -p ${ROOT_WORKDIR}/usr/share/defaults
Expand Down Expand Up @@ -240,6 +262,9 @@ Options=bind
WantedBy=steamos-offload.target
EOF

echo "Copy pacman.conf..."
cp ${PACCFG} ${ROOT_WORKDIR}/etc/

echo "Set repository path..."
sed -i 's~@RELEASE_TYPE@~${RELEASE_TYPE}~g' ${ROOT_WORKDIR}/etc/pacman.d/steamfork-mirrorlist

Expand Down
6 changes: 0 additions & 6 deletions rootfs/steamfork/postcopy/etc/pacman.d/steamfork-mirrorlist

This file was deleted.

4 changes: 2 additions & 2 deletions rootfs/steamfork/presets/minimal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export DISABLED_SERVICES=()
export PLYMOUTH_THEME=""
export FINAL_DISTRIB_IMAGE=${BUILDVER}
export KERNELCHOICE="linux"
export BASE_BOOTSTRAP_PKGS="base base-devel linux-firmware intel-ucode amd-ucode dkms jq btrfs-progs core-3.6/grub efibootmgr openssh"
export BASE_BOOTSTRAP_PKGS="base base-devel linux-firmware intel-ucode amd-ucode dkms jq btrfs-progs core-${UPSTREAM_VERSION}/grub efibootmgr openssh"
export STEAMOS_PKGS="acl
accountsservice
adobe-source-code-pro-fonts
Expand Down Expand Up @@ -259,7 +259,7 @@ export STEAMOS_PKGS="acl
linux-api-headers
linux-firmware
linux-firmware-whence
extra-3.6/llvm
extra-${UPSTREAM_VERSION}/llvm
lsof
lz4
lzo
Expand Down
2 changes: 1 addition & 1 deletion rootfs/steamfork/presets/rel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export DISABLED_SERVICES=(jupiter-controller-update.service
export PLYMOUTH_THEME="steamos"
export FINAL_DISTRIB_IMAGE=${BUILDVER}
export KERNELCHOICE="linux"
export BASE_BOOTSTRAP_PKGS="base base-devel linux-firmware amd-ucode intel-ucode sddm-wayland dkms jq btrfs-progs core-3.6/grub efibootmgr openssh plymouth"
export BASE_BOOTSTRAP_PKGS="base base-devel linux-firmware amd-ucode intel-ucode sddm-wayland dkms jq btrfs-progs core-${UPSTREAM_VERSION}/grub efibootmgr openssh plymouth"
export STEAMOS_PKGS="accounts-qml-module
accountsservice
acl
Expand Down
12 changes: 10 additions & 2 deletions scripts/mkimage
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ then
sudo steamos-readonly disable
fi

echo A

function cleanup() {
sudo umount ${WORK_DIR}/buildwork/rootfs_mnt 2>/dev/null ||:
sudo umount -R ${WORK_DIR}/buildwork/rootfs_mnt/var/cache/pacman/pkg \
${WORK_DIR}/buildwork/rootfs_mnt ||:

sudo rm -rf ${IMAGE_DIR} \
${INSTALLER_DIR}/airootfs/etc/install.image \
${INSTALLER_DIR}/buildinfo \
Expand Down Expand Up @@ -67,10 +71,12 @@ then
else
PACKAGESET="full"
fi

cp -f ${INSTALLER_DIR}/package_lists/${PACKAGESET}.x86_64 ${INSTALLER_DIR}/packages.x86_64
sed -i 's~@UPSTREAM_VERSION@~'${UPSTREAM_VERSION}'~g' ${INSTALLER_DIR}/packages.x86_64

# Build the SteamFork image
sudo rootfs/steamfork/build-image --flavor ${RELEASE_TYPE} --deployment_rel ${RELEASE_TYPE} --snapshot_ver "${BUILD_VER}" --workdir "${WORK_DIR}" --output-dir "${IMAGE_DIR}" --add-release
sudo rootfs/steamfork/build-image --flavor ${RELEASE_TYPE} --deployment_rel ${RELEASE_TYPE} --upstream_ver "${UPSTREAM_VERSION}" --snapshot_ver "${BUILD_VER}" --workdir "${WORK_DIR}" --output-dir "${IMAGE_DIR}" --add-release

# Prep for the installation image
source ${IMAGE_DIR}/latest_${RELEASE_TYPE}.releasemeta
Expand All @@ -79,5 +85,7 @@ sudo ln -sf ${IMAGE_DIR}/latest_${RELEASE_TYPE}.releasemeta /tmp/buildinfo
echo ${IMAGEFILE} | sudo tee ${IMAGE_DIR}/currentcandidate
${INSTALLER_DIR}/getlatestbuild.sh || exit 1

cp ${WORK_DIR}/image/buildwork/pacman.conf ${INSTALLER_DIR}/airootfs/etc/

# Build the installation image
sudo mkarchiso -v -w ${WORK_DIR}/image-build -o ${IMAGE_DIR}/installer ${INSTALLER_DIR}

0 comments on commit 4b81007

Please sign in to comment.