Skip to content

System files are swapped in latest core24 #415

@FrederickGeek8

Description

@FrederickGeek8

When debugging an issue my coworker was facing, I realized that certain system files defined in the core24 repository were swapped out on the version published to the Snap Store and do not match those in this repository. On it's face, it looks as if a package was upgraded and the "upstream" version of that file was used instead of that defined in this repository as part of a post-build package upgrade via dpkg.

In particular, I noticed that the /etc/issue and /etc/issue.net files (found in the /static/etc/ directory in this repo have been replaced by the vanilla Ubuntu versions, or more accurately, have been moved to issue.dpkg-old and issue.net.dpkg-old (respectively). To my knowledge (and with the help of find & fzf) only /etc/issue and /etc/issue.net have been replaced with dpkg, but I could imagine that there needs to be a more general mechanism implemented to ensure that the files layed out in this repo are not overwritten in the future.

The working revision of the core24 snap is rev. 1349. Both the latest/stable (rev. 1499) and latest/beta (rev. 1587) channels are affected by this bug.

Downloading the snap file with snap download and decompressing with unsquashfs, one can see observe differences w.r.t. this repo.

A few more details on my findings

Here I unsquashfs'ed both the latest/stable and working rev. 1349 snaps into a "old" and "new" directory (respectively). Doing a very basic ls->grep in squashfs-root you can see the dpkg-old artifacts (the files in this repo) laying around in the "new" directory that are not present in the "old" (rev. 1349) directory.

# ls new/squashfs-root/etc | grep issue
issue
issue.dpkg-old
issue.net
issue.net.dpkg-old

# ls old/squashfs-root/etc | grep issue
issue
issue.net

As for the file contents difference, on the older rev. 1349 of core24, we only have etc/issue and etc/issue.net, with the contents of etc/issue being:

Ubuntu Core 24 on \4 (\l)

On the latest rev. 1499 and rev. 1587, the contents of etc/issue is:

Ubuntu 24.04.4 LTS \n \l

with a etc/issue.dpkg-old contents of:

Ubuntu Core 24 on \4 (\l)

Next steps?

For the Ubuntu Core systems I'm developing right now, I'll have to try to pin the older revision of core24 since I rely on the IP address being displayed by /etc/issue for initial system setup. It would be great if a new release could be drafted soon with the Core /etc/issue file preserved so I can unpin the older version of core24.

On the repo build side of things, I'm still familiarizing myself with this codebase but I don't see any mechanism for ensuring that dpkg isn't overriding files layed out here during the build process. I'm hoping that it was through the build process that the config files were swapped out and not that someone was upgrading an existing installation outside of the typical build process that was pushed to the Snap Store -- that would be spooky.

Thanks for all your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions