Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: pack, ostree commit, or run commands in a subdirectory #87

Open
smcv opened this issue Jun 8, 2018 · 0 comments
Open

RFE: pack, ostree commit, or run commands in a subdirectory #87

smcv opened this issue Jun 8, 2018 · 0 comments

Comments

@smcv
Copy link
Contributor

smcv commented Jun 8, 2018

debos knows how to pack up the entire $ROOTDIR into a tarball, but it can't pack up (for example) just /usr into a tarball.

Similarly, it can commit the entire $ROOTDIR to an ostree repository, but can't commit something other than the root. This would be useful for Flatpak runtimes, which are meant to contain:

  • /files: a copy of a merged /usr
  • /metadata: a metadata file

Workaround: use action: run, chroot: false to run tar or ostree yourself. The way I'm currently doing this is to create ostree/main and ostree/sources in the $ROOTDIR, move usr to ostree/main/files, fetch corresponding source code into ostree/sources, and pack up ostree/sources and ostree/main as though they were my root directory.

If/when I split out time zones and locales into Flatpak extensions, I'll need to commit those separately: for instance, a timezone info extension would contain /files (a copy of /usr/share/zoneinfo) and /metadata.

Similarly, at the moment I'm using a debos recipe for the Platform runtime and a separate debos recipe for the Sdk runtime, and duplicating the common preparation used for both. Ideally my process would go something like this:

  • populate $ROOTDIR with a complete Debian system that is slightly larger than the Platform
  • do the /usr merge and other common preparation
  • copy /usr, /etc and /var twice, for example into /platform and /sdk (hard-link or reflink to avoid duplicating large files)
  • chroot into /platform and delete Essential packages that are pointless in an immutable, non-bootable runtime, like login, init, apt and dpkg, then commit/pack
  • chroot into /sdk, install extra -dev packages, and download corresponding source code for the union of Platform and Sdk, then commit/pack

Workaround: use chroot: false and make the scripts enter the appropriate chroot themselves, using chroot or systemd-nspawn.

refi64 pushed a commit to refi64/debos that referenced this issue Jan 24, 2023
87: Run CI tests on user-mode-linux backend on Debian r=sjoerdsimons a=obbardc

Currently we only run the tests on the qemu backend, which
misses all of the user-mode-linux backend functionality;
specifically fakemachine setup/teardown steps. We need to be
able to reliably test all backends in CI to be able to merge
any related changes with any confidence.

For now, only testing on the Debian base containers is
supported. More container baselines may be added as follow-up
pull requests.

Requires go-debos/test-containers#11

Co-authored-by: Christopher Obbard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant