Skip to content

Commit

Permalink
refactor: using latest install and font patch method
Browse files Browse the repository at this point in the history
This updates the existing PR to:
1) install on `ucore` (not `ucore-minimal`)
2) install latest release (in case we get one)
3) use font patching from 45 drives to fix missing fonts

This approach is what I've been testing for months and was suggested to
me by @bketelsen based on his Homer image:
https://github.com/bketelsen/homer/blob/main/build_files/fetch-install.sh
  • Loading branch information
bsherman committed Jan 9, 2025
1 parent e492352 commit e37d244
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
3 changes: 0 additions & 3 deletions ucore/install-ucore-minimal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ if [[ "-zfs" == "${ZFS_TAG}" ]]; then
rpm-ostree install pv /tmp/rpms/akmods-zfs/kmods/zfs/*.rpm /tmp/rpms/akmods-zfs/kmods/zfs/other/zfs-dracut-*.rpm
# for some reason depmod ran automatically with zfs 2.1 but not with 2.2
depmod -a -v ${KERNEL_VERSION}

curl -L https://github.com/45Drives/cockpit-zfs-manager/archive/refs/tags/v1.3.1.tar.gz | tar xz -C /tmp
mv /tmp/cockpit-zfs-manager-1.3.1/zfs /usr/share/cockpit
fi

## CONDITIONAL: install NVIDIA
Expand Down
22 changes: 22 additions & 0 deletions ucore/install-ucore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@ fi
export IMAGE_NAME=ucore
/ctx/packages.sh

## CONDITIONAL: ZFS support
if [[ "-zfs" == "${ZFS_TAG}" ]]; then
# cockpit plugin for ZFS management
curl --fail --retry 5 --retry-delay 5 --retry-all-errors -sSL -o /tmp/cockpit-zfs-manager-api.json \
"https://api.github.com/repos/45Drives/cockpit-zfs-manager/releases/latest"
CZM_TGZ_URL=$(cat /tmp/cockpit-zfs-manager-api.json | jq -r .tarball_url)

Check notice on line 21 in ucore/install-ucore.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

ucore/install-ucore.sh#L21

Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
curl -sSL -o /tmp/cockpit-zfs-manager.tar.gz "${CZM_TGZ_URL}"

mkdir -p /tmp/cockpit-zfs-manager
tar -zxvf /tmp/cockpit-zfs-manager.tar.gz -C /tmp/cockpit-zfs-manager --strip-components=1
mv /tmp/cockpit-zfs-manager/polkit-1/actions/* /usr/share/polkit-1/actions/
mv /tmp/cockpit-zfs-manager/polkit-1/rules.d/* /usr/share/polkit-1/rules.d/
mv /tmp/cockpit-zfs-manager/zfs /usr/share/cockpit

curl -sSL -o /tmp/cockpit-zfs-manager-font-fix.sh \
https://raw.githubusercontent.com/45Drives/scripts/refs/heads/main/cockpit_font_fix/fix-cockpit.sh
chmod +x /tmp/cockpit-zfs-manager-font-fix.sh
/tmp/cockpit-zfs-manager-font-fix.sh

rm -rf /tmp/cockpit-zfs-manager*
fi

# install packages direct from github
/ctx/github-release-install.sh trapexit/mergerfs "fc${RELEASE}.x86_64"

Expand Down

0 comments on commit e37d244

Please sign in to comment.