Skip to content

Commit

Permalink
feat: add minimal util-linux
Browse files Browse the repository at this point in the history
Add a minimal util-linus tools. Only `fstrim` is enabled for now.

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Sep 4, 2023
1 parent 0f4a77e commit 89f857d
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ TARGETS = \
tailscale \
thunderbolt \
usb-modem-drivers \
util-linux \
zfs

# Temporarily disabled, as mellanox-ofed fails to build with Linux 6.1
Expand Down
10 changes: 10 additions & 0 deletions tools/util-linux/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v1alpha1
metadata:
name: util-linux
version: "$VERSION"
author: Sidero Labs
description: |
This system extension provides a minimal util-linux package.
compatibility:
talos:
version: ">= v1.0.0"
44 changes: 44 additions & 0 deletions tools/util-linux/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: util-linux
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: base
steps:
- sources:
- url: https://www.kernel.org/pub/linux/utils/util-linux/v{{ regexReplaceAll ".\\d+$" .UTIL_LINUX_VERSION "${1}" }}/util-linux-{{ regexReplaceAll "\\.0$" .UTIL_LINUX_VERSION "${1}" }}.tar.xz
destination: util-linux.tar.xz
sha256: 890ae8ff810247bd19e274df76e8371d202cda01ad277681b0ea88eeaa00286b
sha512: 8fe2c9014f6161330610f7470b870855cecbd3fab9c187b75d8f22e16573c82516050479be39cfb9f7dd6d7ef1cc298d31d839b194dda5ec4daf0d1197ac71e9
prepare:
- |
tar -xJf util-linux.tar.xz --strip-components=1
mkdir build
cd build
../configure \
--prefix=/usr/local \
--without-python \
--disable-bash-completion \
--disable-asciidoc \
--disable-makeinstall-chown \
--without-systemd \
--without-systemdsystemunitdir \
--disable-all-programs \
--enable-libmount \
--enable-libblkid \
--enable-fstrim \
build:
- |
cd build
make install-strip -j $(nproc)
install:
- |
cd build
mkdir /rootfs
make install DESTDIR=/rootfs
rm -rf /rootfs/usr/local/{include,lib,share}
finalize:
- from: /rootfs
to: /rootfs
- from: /pkg/manifest.yaml
to: /
1 change: 1 addition & 0 deletions tools/util-linux/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION: "{{ .UTIL_LINUX_VERSION }}"
2 changes: 2 additions & 0 deletions tools/vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# renovate: datasource=git-tags extractVersion=^v(?<version>.*)$ depName=git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
UTIL_LINUX_VERSION: 2.39.1

0 comments on commit 89f857d

Please sign in to comment.