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:
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!
When debugging an issue my coworker was facing, I realized that certain system files defined in the
core24repository 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 viadpkg.In particular, I noticed that the
/etc/issueand/etc/issue.netfiles (found in the/static/etc/directory in this repo have been replaced by the vanilla Ubuntu versions, or more accurately, have been moved toissue.dpkg-oldandissue.net.dpkg-old(respectively). To my knowledge (and with the help offind&fzf) only/etc/issueand/etc/issue.nethave 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) andlatest/beta(rev. 1587) channels are affected by this bug.Downloading the snap file with
snap downloadand decompressing withunsquashfs, one can see observe differences w.r.t. this repo.A few more details on my findings
Here I
unsquashfs'ed both thelatest/stableand working rev. 1349 snaps into a "old" and "new" directory (respectively). Doing a very basicls->grepinsquashfs-rootyou can see thedpkg-oldartifacts (the files in this repo) laying around in the "new" directory that are not present in the "old" (rev. 1349) directory.As for the file contents difference, on the older rev. 1349 of core24, we only have
etc/issueandetc/issue.net, with the contents ofetc/issuebeing:On the latest rev. 1499 and rev. 1587, the contents of
etc/issueis:with a
etc/issue.dpkg-oldcontents of:Next steps?
For the Ubuntu Core systems I'm developing right now, I'll have to try to pin the older revision of
core24since I rely on the IP address being displayed by/etc/issuefor initial system setup. It would be great if a new release could be drafted soon with the Core/etc/issuefile 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!