You must ship an internal Linux application to machines running several different distributions. How do a traditional distribution package (.deb/.rpm) and a bundled sandboxed format such as Snap or Flatpak differ as delivery models, and how would you decide between them?
answer
- who owns the shared libraries underneath
- one artifact versus a build matrix
- bundling moves CVE response to you
- confinement is not patching
- desktop session versus headless daemon
basics
~20 sA distribution package links against the host's shared libraries and inherits the distribution's patching and update machinery, but must be built per distribution and release. A bundled format ships its own runtime — one artifact everywhere, plus confinement, at the cost of owning every bundled vulnerability yourself.
solid answer
~60 sThe choice is really about who owns the libraries underneath your application. A `.deb` or `.rpm` links against the distribution's shared libraries, so the distribution's security team patches OpenSSL and glibc beneath you, the artifact is small, and it integrates with the host's existing update, inventory and configuration machinery — but you must build and test one artifact per distribution and release, and you are constrained by whatever versions that release ships. A bundled format inverts this: Snap ships the application as a compressed image with its runtime, Flatpak ships it against a shared runtime such as `org.freedesktop.Platform`, and both run it under confinement — Snap through interfaces that must be connected, Flatpak through a bubblewrap sandbox with host access mediated by portals. You get one artifact for every distribution and an isolation boundary, but you inherit responsibility for every CVE in what you bundled, you duplicate disk and memory, and updates arrive on the publisher's channel rather than through the host's patch process. In practice: headless server daemons go to an internal `.deb`/`.rpm` repository, cross-distribution desktop applications go to Flatpak.
go deeper
Know the basic contrast: a distribution package uses libraries already on the system, while a bundled format ships its own copies so the same file works on many distributions.
Explain the mechanics — a shared runtime plus a sandbox mediating host access, versus linking against the distribution's libraries — and the direct consequences for artifact size, portability and update source.
Argue the operational trade: bundling transfers vulnerability response to the publisher, hides bundled libraries from host scanners, and moves updates outside the fleet's patch process, which is why servers usually keep native packages.
Own the decision framework — patch responsibility and SLA, change-control and air-gap constraints, isolation requirements, fleet inventory and audit — and be willing to say that an existing container platform already answers the server half of the question.
## The real axis: who owns the libraries Everything else follows from this. A traditional distribution package declares dependencies on the distribution's own libraries and links against them at runtime. A bundled format carries its dependencies with it. That single difference propagates into security, size, update cadence, testing burden and operations. ## The traditional model Strengths: - **Someone else patches your dependencies.** When a critical vulnerability lands in a common TLS library, the distribution ships a fixed library package and every application on the host that links it is fixed at once. Your application does not need a rebuild or a release. - **Small artifacts and shared memory.** One copy of each library, shared across processes. - **Native integration.** Files land where the platform expects them, configuration lives in `/etc` where configuration management already operates, the init system supervises the service, and the host's inventory can answer "what version is installed?" through the same query used for everything else. - **One update path.** The machine's normal patch process covers your software too, including the change-control and maintenance-window discipline built around it. Costs: - **A matrix, not an artifact.** Each distribution family and each supported release is a separate build and test target, because the available library versions differ. - **Version constraints imposed on you.** If a release ships an older runtime than your application needs, you either vendor it anyway or drop support. - **Install-time privilege.** Maintainer scripts run as root by design, which is power but also a supply-chain surface. ## The bundled and confined model **Snap** distributes an application as a compressed filesystem image; installed revisions are mounted read-only rather than unpacked, so a host's mount list grows with the number of installed snaps. Its confinement mediates access to host resources through *interfaces* that must be connected before the application can use them, and it supports background services, so it is usable for daemons as well as desktop applications. Updates flow through channels from a store, and the daemon refreshes installed snaps automatically unless refreshes are held — behaviour that is convenient on a laptop and genuinely surprising on a server you thought was frozen. The ecosystem is designed around one default store operated by a single vendor, which matters for air-gapped or self-hosted distribution. **Flatpak** separates applications from *runtimes*: a shared base such as `org.freedesktop.Platform`, `org.gnome.Platform` or `org.kde.Platform` provides the common libraries that many applications build against, so bundling is partial rather than total and the runtime can be updated independently. Applications execute inside a sandbox built with bubblewrap, and access to the host — files, devices, the session — is either granted through declared permissions or mediated at runtime by portals, with per-application overrides available to the administrator. Repositories are content-addressed and de-duplicate shared objects between applications and revisions. Flatpak is squarely desktop-oriented: it assumes a graphical session and portal infrastructure, which makes it a poor fit for headless servers. **AppImage** sits at the extreme: a single executable file bundling everything, with no sandbox and no built-in update mechanism. Excellent for handing someone a build to try; a poor basis for a managed fleet. ## What you inherit when you bundle The security trade is the one senior candidates must name explicitly. Bundling moves CVE response from the distribution to you. When a vulnerability lands in a library you bundled, *you* must rebuild, re-release and get every installation to refresh — and the host's vulnerability scanner may not even see inside your bundle, so the exposure can be invisible to the people responsible for patching. Confinement partially compensates by limiting what a compromised application can reach, but confinement and patching defend against different things; one is not a substitute for the other. There is also an inventory question. "Which hosts run version X" is trivially answerable for distribution packages and needs separate tooling for bundled formats. ## How to decide Ask, in order: 1. **Is it a headless service or a desktop application?** Headless services belong in a distribution package published to an internal repository — or, if the platform is already container-based, in an image, which is the same bundling trade-off with better-established server tooling. Desktop applications across mixed distributions are exactly what Flatpak was built for. 2. **Who will patch the libraries?** If you have no team that can respond to a library CVE within your SLA, do not bundle. 3. **Do the hosts allow updates you do not control?** Automatic refreshes from a vendor store are disqualifying in many regulated or air-gapped environments; a frozen internal repository snapshot is the opposite discipline. 4. **Do you need an isolation boundary?** If the application must be confined from the rest of the machine, a sandboxed format gives you that with declared permissions — but check that the confinement survives the access your application genuinely needs, or you will end up granting broad host access and keeping only the costs. 5. **What does the audit story look like?** Whichever model you pick must be able to answer, fleet-wide, what version is installed and whether it is vulnerable. The honest summary is that bundling buys portability and isolation with maintenance ownership. That is a good trade for a desktop application shipped to unknown distributions, and usually a bad one for a server daemon on a fleet you already patch centrally.
- What does a Flatpak runtime such as org.freedesktop.Platform actually provide?A shared base of libraries that applications build and run against instead of the host's, so several applications share one copy and the base can be updated independently of the applications on top of it. It makes Flatpak's bundling partial: the application ships what is specific to it, while common libraries live in a runtime that is itself maintained and versioned.
- Why is automatic refresh a problem on servers but a feature on laptops?Because servers are managed through change control: what runs is decided by a release process and frozen between windows. A publisher-driven refresh changes running software without the operator's plan, potentially mid-incident or outside a maintenance window, and it bypasses the staged rollout the fleet's normal patch process provides. On a laptop the same behaviour just keeps a user current.
- If you already run containers on the server fleet, does that settle the question?Largely, yes — a container image is the same bundling trade-off, and the operational tooling around it for servers is far more mature than either desktop-oriented format. You still own the libraries you bundled and still need a rebuild-and-redeploy path for CVEs; you just get scheduling, rollout and inventory from the platform you already run.
saying these in an interview costs you the question
- Treating sandboxing as a substitute for patching bundled libraries
- Assuming a bundled app's CVEs are the distribution's problem
- Believing one bundled artifact removes all per-distribution testing
- Ignoring that automatic refresh changes software outside change control
- Thinking a desktop-oriented sandbox format suits headless servers