Skip to content

Releases

Release v0.2.0

Choose a tag to compare

@xfbs xfbs released this 24 Nov 11:37
b6030e6

Added

Libraries

  • linuxutils-mount: Rust-native crate for the mount subsystem. It has
    parsers for /proc/self/mountinfo, /etc/fstab and /proc/swaps, the
    MountEntry and MountTable types, MountFlags bitflags, an OptionList
    parser, an option classifier (optmap), and wrappers for the mount(2) and
    umount2(2) syscalls. See libs/mount/README.md.
  • linuxutils-blkid: Rust-native crate for tag resolution through the
    /dev/disk/by-* udev symlinks. There is no on-disk probe layer yet. See
    libs/blkid/README.md.
  • compat/libmount: ABI-compatible libmount.so shim backed by
    linuxutils-mount. The first version covers read-only parsing and lookup of
    fstab, mountinfo and /proc/swaps (mnt_table_*, the mnt_fs_* getters,
    and iteration). Context, cache, lock, monitor and setters come later. See
    compat/libmount/README.md.
  • compat/libblkid: ABI-compatible libblkid.so shim backed by
    linuxutils-blkid. The first version covers the udev symlink resolution
    layer: cache lifecycle, blkid_evaluate_tag, blkid_evaluate_spec,
    blkid_get_devname, device queries (blkid_get_dev, blkid_dev_has_tag,
    blkid_find_dev_with_tag, blkid_get_tag_value), and iteration over
    devices and tags. The probe layer (blkid_probe_*, partitions, topology) is
    out of scope. See compat/libblkid/README.md.
  • Tag and TagKind in linuxutils-common, shared between
    linuxutils-mount and linuxutils-blkid.
  • Placeholder libkmod crate for the upcoming kmod tools.

Tools

  • mount (first version): list, fstab lookup and direct forms, with the -L
    and -U shortcuts and routing for bind, rbind and remount. -a/--all walks
    fstab with the -t and -O filters, skipping noauto, swap, ignored and
    already mounted entries.
  • umount (first version): resolves targets, sources and tags, with -f,
    -l, -r, -n and -v.
  • findmnt (first version): lists mountinfo, fstab or /proc/swaps, with
    filters for target, source and filesystem type.
  • findfs: resolves LABEL= and UUID= through linuxutils-blkid.
  • blkid (first version): listing mode and -L and -U lookups, without a
    probe layer.
  • fincore: reports page cache residency using mincore(2).
  • exch: exchanges two paths atomically using renameat2(RENAME_EXCHANGE).
  • bits: converts bit masks between the mask, grouped mask, list, binary and
    expanded formats. --list compresses runs of three or more evenly spaced
    bits into start-end[:stride], as upstream does.
  • getino: reports pidfd and namespace inodes.
  • wdctl: shows hardware watchdog status (identity, timeouts, feature and
    status flags, boot status) using the WDIOC_* ioctls. It does the magic
    close write on exit, so the kernel doesn't fire the watchdog when wdctl
    returns. The options that change settings (--settimeout,
    --setpretimeout) come later.
  • setarch: runs a program with a different architecture or personality
    flags, using personality(2) and execvp. It covers the cross-host
    architecture names (linux32, linux64), the common host-specific ones,
    and all the standard personality flags (--addr-no-randomize,
    --uname-2.6, --mmap-page-zero and so on). The --list and --show
    modes are supported.
  • The linuxutils multicall binary now includes every tool. bits, blkid,
    exch, fincore, findfs, findmnt, getino, mount and umount were
    missing before. A test now checks that no tool is left out.
  • linuxutils --list prints the name of every tool, one per line. The Nix
    flake uses it to create the symlinks for the multicall package.

Packaging and CI

  • Release packages: .deb and .rpm packages, tarballs and static binaries
    for x86_64, aarch64 and riscv64, built with just package. They install
    next to util-linux rather than replacing it, with the multicall binary in
    /usr/bin, a symlink for each tool in /usr/lib/linuxutils/bin and the
    man pages in /usr/share/linuxutils/man.
  • GitLab CI runs formatting, clippy, rustdoc and cargo deny checks and the
    test suite on every push. Version tags build the packages and publish a
    release on GitLab and GitHub.
  • deny.toml for cargo deny.

Tests and infrastructure

  • Vendored the upstream util-linux test suite under tests/util-linux/, with
    a wrapper (tests/util-linux-runner.sh) and a Justfile target
    (just test-util-linux) that builds the workspace and runs the upstream
    tests against our target/debug/ binaries. Tests for tools we haven't
    written yet are skipped automatically, and the failures make up the roadmap
    for a 1.0 release.
  • testutil crate with support for /proc and /sys fixtures.
  • Fixture-backed tests for lslocks, lsmem, lsirq and lsns.
  • Snapshot tests of argument parsing for every tool group (disk, login,
    misc, sched, system, term, text).
  • --help snapshot tests, with fixed wrapping through HELP_WIDTH_MAX.

Documentation

  • mdbook scaffold under docs/ with a landing page for each group.
  • Project branding (banner SVGs for light and dark themes).
  • Status tables in libs/mount/README.md and libs/blkid/README.md that
    track gaps compared to upstream libmount and libblkid.

Changed

  • Man pages for system administration tools are now in section 8, as
    upstream has them, and cargo xtask mangen writes them into man1 and
    man8 directories.
  • Release builds use LTO, a single codegen unit, panic = "abort", and are
    stripped.
  • Updated rustix to 1.1.6, which fixes RUSTSEC-2026-0486.
  • Reorganised the library layout. libs/* is now for Rust-native crates, and
    the ABI-compatible shims moved to compat/* (for example, libs/libuuid
    moved to compat/libuuid).
  • Raised the MSRV to Rust 1.87 (was 1.85) to use u*::is_multiple_of.
  • ipcs learned upstream's -t/--time, -p/--pid and -c/--creator
    display modes, and prints sections in upstream's order (messages, shared
    memory, semaphores) in every mode.
  • rename now matches the output format and matching rules of upstream
    rename(1):
    • Symlink mode prints file: `old' -> `new'.
    • With --no-overwrite, skipped files print Skipping existing file: `name' to stdout.
    • The `old' -> `new' line is only printed on success.
    • The search is limited to the basename when neither side of the
      substitution contains /.
    • Trailing slashes on input paths are removed before processing.
  • bits --list output is compressed into ranges, as upstream does. The flat
    form moved to the new -x/--expand mode.

Fixed

  • The tools now build for musl. chrt calls the scheduler system calls
    directly, since musl's wrappers for them always fail with ENOSYS, and
    the ioctl calls in blockdev, blkdiscard, eject, fsfreeze, fstrim,
    losetup and wdctl pass their request numbers in the type that musl
    expects.
  • cargo xtask mangen now writes a man page for every tool. It used to skip
    the same nine tools that were missing from the multicall binary, because it
    kept its own list. It now uses the multicall binary's list.
  • rev --help and column --help described the whole linuxutils-text
    crate instead of the tool.
  • The --help text of many tools is easier to read. Descriptions that were
    written as Markdown lists no longer run together into one paragraph, notes
    about the implementation are no longer shown to users, and Markdown
    formatting such as backticks is gone.
  • The Nix flake builds again. Its source filter dropped files the build
    needs (the hand-written man page sections and the test snapshots). It now
    also installs every tool, and the C headers from compat/. Two kinds of
    test that failed in its sandbox are fixed: the fixture tests now skip when
    unshare can't run, and the whereis -m test no longer needs a man page
    for ls on the host.
  • setarch:
    • --show=VAL now decodes hex and decimal personality values into
      upstream's format of PER_* plus a flag list (for example, 0x00880000
      becomes PER_LINUX (FDPIC_FUNCPTRS ADDR_LIMIT_32BIT)). Before, it treated
      the value as an architecture name.
    • New --pid=PID option reads another process's personality from
      /proc/PID/personality.
    • Verbose output (Switching on FLAG., Execute command `name'.) and
      error messages (Unrecognized architecture, failed to execute) now
      match upstream.
  • copyfilerange:
    • --ranges can be given more than once.
    • Verbose mode prints copy_file_range SRC to DST OFF:OFF:LEN to stdout.
      Before, it printed a different format to stderr.
    • It refuses to copy from beyond the end of the source, with upstream's
      offset N is beyond file size of M error.
  • waitpid:
    • Accepts the race-free PID:INODE form printed by getino -p, and checks
      that the pidfs inode hasn't been reused.
    • --timeout accepts fractional seconds.
    • With --verbose, prints Timeout expired to stdout on timeout. Before,
      it printed a different message to stderr.
    • The message for a process that already exited now reads
      PID N has exited, skipping, as upstream does.
  • line:
    • Reads one byte at a time from file descriptor 0. A BufReader used to
      read too far, which broke (line && line) <pipe.
    • Ignores extra positional arguments.
    • At EOF without a final \n, adds the newline that POSIX requires.
  • mountpoint:
    • --nofollow no longer reports a symlink as a mountpoint. The path used
      to be canonicalised, which resolved the symlink before the mountinfo
      lookup.
    • Rejects --devno with --nofollow, with upstream's
      mountpoint: --devno and --nofollow are mutually exclusive error.
  • lsmem:
    • Column alignment matches upstream (SIZE, STATE, NODE and ZONES
      are now right-aligned).
    • The kernel's lower-case none...
Read more