Skip to content

Keep dpkg database on clients - #931

Merged
jumpyvi merged 4 commits into
mainfrom
feat-dpkg
Oct 24, 2026
Merged

jumpyvi merged 4 commits into
mainfrom
feat-dpkg

Conversation

@jumpyvi

@jumpyvi jumpyvi commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

This lets you restore the dpkg database at runtime so you can use APT like normal if you make /usr writable.

The DB can be restored with:

sudo addgroup --system ssl-cert
sudo rm -rf /var/lib/dpkg
sudo tar -xzvf /usr/share/factory/dpkg/dpkg.tar.gz -C /
sudo /usr/bin/apt update

After that, you can install any packages from Ubuntu like on classic.

@github-actions

Copy link
Copy Markdown

Installer builds for 4a36b4a

Do not use these installers for production systems. They are intended for testing purposes only. They will update to the latest PR build, which will break your install eventually.

Arch ISO Checksum
amd64 elementaryos-9.0-proposed-x86-64.20261023185734.iso sha256
arm64 elementaryos-9.0-proposed-arm64.20261023185737.iso sha256

@github-actions

Copy link
Copy Markdown

Installer builds for 6a764d4

Do not use these installers for production systems. They are intended for testing purposes only. They will update to the latest PR build, which will break your install eventually.

Arch ISO Checksum
amd64 elementaryos-9.0-proposed-x86-64.20261023192816.iso sha256
arm64 elementaryos-9.0-proposed-arm64.20261023192814.iso sha256

@lewisgoddard

Copy link
Copy Markdown
Member

Could we ship the database unpacked at /usr/share/factory/var/lib/dpkg instead of as a tarball? Then dpkg-query --admindir=/usr/share/factory/var/lib/dpkg -l can list the image's packages without restoring anything, and images are compress already.

@jumpyvi

jumpyvi commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

Could we ship the database unpacked at /usr/share/factory/var/lib/dpkg instead of as a tarball? Then dpkg-query --admindir=/usr/share/factory/var/lib/dpkg -l can list the image's packages without restoring anything, and images are compress already.

I want to keep it tar/compressed on clients devices, to not use to much spaces/files count if they don't need it.

And the main goal for it to be restored in /var/lib/dpkg so apt can fonction as expected when mutable sysexts are enabled

@lewisgoddard

Copy link
Copy Markdown
Member

Could we ship the database unpacked at /usr/share/factory/var/lib/dpkg instead of as a tarball? Then dpkg-query --admindir=/usr/share/factory/var/lib/dpkg -l can list the image's packages without restoring anything, and images are compress already.

I want to keep it tar/compressed on clients devices, to not use to much spaces/files count if they don't need it.

And the main goal for it to be restored in /var/lib/dpkg so apt can fonction as expected when mutable sysexts are enabled

With images compressed already I assumed this wouldn't change much.

@jumpyvi

jumpyvi commented Oct 23, 2026 •

Copy link
Copy Markdown
Member Author

Yeah, but theses images are decompressed when they end up on a disk

@lewisgoddard

lewisgoddard commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Okay then, a couple of restrictions:

  1. This won't have packages from sysexts.
  2. After each sysupdate it will need copying manually again.

(This loses any old package info on update, but those packages presumably got wiped anyway.)

@jumpyvi

jumpyvi commented Oct 24, 2026

Copy link
Copy Markdown
Member Author

Okay then, a couple of restrictions:

  1. This won't have packages from sysexts.
  2. After each sysupdate it will need copying manually again.

(This loses any old package info on update, but those packages presumably got wiped anyway.)

Yeah, this is for debugging/testing or "emergency package install", not for persistant packages.

@jumpyvi

jumpyvi commented Oct 24, 2026

Copy link
Copy Markdown
Member Author

I will test this out tmrw to see if it works as expected

@github-actions

Copy link
Copy Markdown

Installer builds for 5436d9c

Do not use these installers for production systems. They are intended for testing purposes only. They will update to the latest PR build, which will break your install eventually.

Arch ISO Checksum
amd64 elementaryos-9.0-proposed-x86-64.20261023235154.iso sha256
arm64 elementaryos-9.0-proposed-arm64.20261023235216.iso sha256

@jumpyvi
jumpyvi enabled auto-merge (squash) October 24, 2026 19:32
@github-actions

Copy link
Copy Markdown

Installer builds for 66b2ffe

Do not use these installers for production systems. They are intended for testing purposes only. They will update to the latest PR build, which will break your install eventually.

Arch ISO Checksum
amd64 elementaryos-9.0-proposed-x86-64.20261024193248.iso sha256
arm64 elementaryos-9.0-proposed-arm64.20261024193256.iso sha256

@jumpyvi
jumpyvi merged commit f71b02f into main Oct 24, 2026
3 checks passed
@jumpyvi
jumpyvi deleted the feat-dpkg branch October 24, 2026 20:02
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

Successfully merging this pull request may close these issues.

2 participants