[FFe][SRU] Repository profiles only act on .list files and do not affect .source files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Client |
Fix Released
|
Low
|
Jan-Yaeger Dhillon | ||
landscape-client (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
In Progress
|
Undecided
|
Mitch Burton | ||
Jammy |
Fix Committed
|
Undecided
|
Mitch Burton | ||
Noble |
Fix Committed
|
Undecided
|
Mitch Burton | ||
Oracular |
Fix Committed
|
Undecided
|
Mitch Burton | ||
Plucky |
New
|
Undecided
|
Mitch Burton |
Bug Description
[Impact]
* Currently, as reported above, Landscape repository profiles only act upon .list files while .sources remain in effect. As Noble transitioned from the default source definition being the traditional .list files to DEB822 .sources files, this bug manifested when a customer noticed sources that they wanted disabled were still appearing in apt update.
* The determined solution was to add pattern matching for .sources extensions as well as .list files. Merged PR here: https:/
* The first LTS to support DEB822 .sources was Xenial, however, the first LTS where this format became the default was noble. The proposed SRU is to bring this change back to Focal
* additionally, .sources and .list files do not get restored when repository profiles are unapplied. This was discovered during verification of the first proposed fix for this bug.
[Testing]
* To reproduce the problem, apply a repository profile on an affected ubuntu system and observe that it does not migrate .sources files to .sources.save by listing /etc/apt/
* Upgrade to the landscape-client packages from proposed and apply a Landscape profile, noting that .sources files successfully move to .sources.save and no longer appear in the output of apt update
* Ensure that .list files are also renamed to .list.save (as this is the current behaviour)
The above steps succeeded during verification for proposed versions 23.02-0ubuntu1~
* following the above steps, unapply the Landscape repository profile and ensure that .sources.save and .list.save files are renamed back to .sources and .list, respectively
[What can go wrong]
* The change is rather localized and brief, so it is not expected to introduce any regressions or problems. Applying a profile may take more time due to extra pattern matching and checking - particularly is the filesystem has many .sources files
* .sources or .list files might be moved and fail to get restored. This can result in the ubuntu archive sources no longer being considered by apt, or a system that has no active sources or sourceparts.
[Original Description]
Somewhat related to LP:2062561, landscape-client currently only appends .save to source lists ending in .list, which leaves 822 style lists using the .sources extension intact.
This means that applying a repository profile to any machine using the new .sources files will still have their public repository sources enabled after a repository profile is applied.
https:/
This was reported 2024-11-08 internally, and now also reported by a customer in case:00400550
Related branches
- Julian Andres Klode (community): Needs Fixing
- git-ubuntu import: Pending requested
-
Diff: 233 lines (+212/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/fix-apt-source-file-management.patch (+204/-0)
debian/patches/series (+1/-0)
- Julian Andres Klode (community): Needs Fixing
- git-ubuntu import: Pending requested
-
Diff: 234 lines (+212/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/fix-apt-source-file-management.patch (+204/-0)
debian/patches/series (+1/-0)
- Julian Andres Klode (community): Needs Fixing
- git-ubuntu import: Pending requested
-
Diff: 234 lines (+212/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/fix-apt-source-file-management.patch (+204/-0)
debian/patches/series (+1/-0)
- Julian Andres Klode (community): Needs Fixing
- git-ubuntu import: Pending requested
-
Diff: 214 lines (+192/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/fix-apt-source-file-management.patch (+184/-0)
debian/patches/series (+1/-0)
- Julian Andres Klode (community): Disapprove
- git-ubuntu import: Pending requested
-
Diff: 295 lines (+273/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/0003-fix-apt-source-file-management (+265/-0)
debian/patches/series (+1/-0)
- Andreas Hasenack: Approve
- Ubuntu Sponsors: Pending requested
-
Diff: 369 lines (+312/-3)7 files modifieddebian/changelog (+18/-0)
debian/patches/2087852-feat-manage-ubuntu-sources-glob.patch (+188/-0)
debian/patches/allow-http-proxy-in-tests.patch (+60/-0)
debian/patches/series (+3/-0)
debian/patches/unittest-makeSuite-deprecation.patch (+40/-0)
debian/rules (+2/-2)
debian/tests/control (+1/-1)
- Lukas Märdian (community): Approve
- git-ubuntu import: Pending requested
-
Diff: 203 lines (+183/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/2087852-feat-manage-ubuntu-sources-glob.patch (+175/-0)
debian/patches/series (+1/-0)
- Andreas Hasenack: Disapprove
- Vladimir Petko (community): Needs Fixing
-
Diff: 218 lines (+198/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/2087852-feat-manage-ubuntu-sources-glob.patch (+190/-0)
debian/patches/series (+1/-0)
- Lukas Märdian (community): Approve
- git-ubuntu import: Pending requested
-
Diff: 205 lines (+183/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/2087852-feat-manage-ubuntu-sources-glob.patch (+175/-0)
debian/patches/series (+1/-0)
- Lukas Märdian (community): Approve
- git-ubuntu import: Pending requested
-
Diff: 194 lines (+173/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/2087852-feat-manage-ubuntu-sources-glob.patch (+165/-0)
debian/patches/series (+1/-0)
- Mitch Burton (community): Disapprove
- Lukas Märdian (community): Approve
- git-ubuntu import: Pending requested
-
Diff: 195 lines (+173/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/2087852-feat-manage-ubuntu-sources-glob.patch (+165/-0)
debian/patches/series (+1/-0)
Changed in landscape-client: | |
status: | New → In Progress |
assignee: | nobody → Jan-Yaeger Dhillon (jansdhillon) |
importance: | Undecided → Low |
Changed in landscape-client: | |
status: | In Progress → Fix Committed |
description: | updated |
summary: |
- Repository profiles only act on .list files and do not affect .source - files + [SRU] Repository profiles only act on .list files and do not affect + .source files |
description: | updated |
description: | updated |
description: | updated |
Changed in landscape-client: | |
status: | Fix Committed → Fix Released |
Changed in landscape-client (Ubuntu Focal): | |
assignee: | nobody → Mitch Burton (mitchburton) |
Changed in landscape-client (Ubuntu Jammy): | |
assignee: | nobody → Mitch Burton (mitchburton) |
Changed in landscape-client (Ubuntu Noble): | |
assignee: | nobody → Mitch Burton (mitchburton) |
Changed in landscape-client (Ubuntu Plucky): | |
assignee: | nobody → Mitch Burton (mitchburton) |
Changed in landscape-client (Ubuntu Oracular): | |
assignee: | nobody → Mitch Burton (mitchburton) |
description: | updated |
description: | updated |
The customer that reported the issue internally is consuming the landscape- client/ jammy 24.04-0landscape0 package from the self-hosted PPA https:/ /launchpad. net/~landscape/ +archive/ ubuntu/ self-hosted- 24.04/+ packages, attached here is the debdiff against that package