Operating System Image Tools
Go to file
Luke T. Shumaker 5f0d33c402 argparse.sh: Don't set IFS for the callback functions 2024-02-14 08:53:52 -07:00
Documentation Makefile: Let the tests run in parallel 2024-02-14 08:26:04 -07:00
bin osi-mk: Audit 'trap' use, be clearer with tmp file names 2024-02-14 08:53:52 -07:00
lib argparse.sh: Don't set IFS for the callback functions 2024-02-14 08:53:52 -07:00
mypy-stubs Write a `pacman-choices` program 2023-10-30 12:37:42 -06:00
test Convert all Bash programs to use argparse.sh 2024-02-14 01:40:52 -07:00
.editorconfig Add .editorconfig, trim trailing whitespace 2024-02-14 01:37:06 -07:00
.gitignore Get shellcheck to pass 2024-01-29 13:33:13 -07:00
.shellcheckrc Lint the test files 2024-01-05 11:24:19 -07:00
COPYING.txt Fuss with copyright notices 2023-12-12 20:23:30 -07:00
Makefile Makefile: Let the tests run in parallel 2024-02-14 08:26:04 -07:00
README.md Move docs+examples to a 'Documentation' directory 2023-11-06 11:42:01 -07:00

README.md

osi-tools: Operating System Image Tools

Usage

$ ./bin/osi-mk [FLAGS] SYS.img                               # to build an image
$ ./bin/osi-shell SYS.img                                    # launch an interactive shell in an emulator
$ sudo ./bin/osi-mount --{root|user} SYS.img MNT COMMAND     # run command with SYS.img mounted at MNT
$ sudo ./bin/osi-extract SYS.img IMAGE_SRC_DIR HOST_DST_DIR  # to extract files from an image

Dependencies

I believe the complete list of dependencies is (along with what I believe is the newest feature that is depended on):

  • arch-install-scripts
  • btrfs-progs
  • GNU Bash 4.4 (needs @Q)
  • GNU coretutils 8.15 (needs realpath)
  • GNU gettext
  • QEMU (needs qemu-system-x86_64)
  • sed
  • sudo
  • util-linux-ng 2.18 or newer (needs automatic loop devices in mount)

This can be install on a Parabola Parabola GNU/Linux-libre system with the following command:

sudo pacman -S --needed arch-install-scripts btrfs-progs bash coreutils gettext qemu-system-x86 sed sudo util-linux

The tests require

  • BATS
  • bats-support
  • bats-assert
  • bats-file

Developing

You can lint the code in this repository by running make lint, which requires the shellcheck command.

The tests can run in parallel, obeying Make's -j/--jobs flag. Some of the tests write several gigabytes to $TMPDIR; 3GB of space on $TMPDIR is plenty when run serially, but is not enough when run in parallel.