[SRU] ucf fails to work for local diversions on Jammy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ucf (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Won't Fix
|
High
|
Ponnuvel Palaniyappan |
Bug Description
[ Impact ]
When a dpkg-diversion is used to setup a package diversion and ucf for managing
the configuration files for chrony package, the postinst script of ucf fails
when installing chrony.
This issue isn't specific to chrony but can happen for any package whose
config files are managed by ucf.
This affects users on Jammy who use ucf. Newer versions of ucf have this bug
fixed already.
"ucf should respect dpkg-divert" (refer https:/
[ Test Plan ]
Common case.
A1. Create a Jammy container or VM
A2. Install chrony: apt install chrony -y
A3. Confirm ucf works with no failures (including syntax errors)
B1. Modify the configuration: /etc/chrony/
B2. Remove chrony package and re-install
B3. Confirm it still works.
B. Case when a diversion is in place.
1. Create a Jammy container or VM
2. Setup a diversion for chrony.conf: dpkg-divert --package chrony --add --rename --divert /etc/chrony/
3. Install chrony: apt install chrony -y
4. Notice the postinst script fail with syntax errors such as:
```
Preparing to unpack .../chrony_
Unpacking chrony (4.2-2ubuntu2) ...
Setting up chrony (4.2-2ubuntu2) ...
/usr/bin/ucf: 444: [: missing ]
grep: ]: No such file or directory
/usr/bin/ucf: 444: [: missing ]
grep: ]: No such file or directory
```
5. Install the package with the fix from the PPA: https:/
6. Repeat the same from steps 1 to 4 and notice no failures at step4.
[ Where problems could occur ]
Can further introduce similar bugs if the patch contains similar syntax
errors. Consequently local diversion may not take effect for packages
using ucf to manage configuration files.
[ Other Info ]
Upstream bug: https:/
It's been fixed in version ucf/3.0043+nmu1. Lunar/Mantic/Noble all have the
ucf version with this patch.
Affects Jammy only and thus backported to only Jammy.
Changed in ucf (Ubuntu): | |
status: | New → Fix Released |
Changed in ucf (Ubuntu Jammy): | |
status: | New → In Progress |
assignee: | nobody → Ponnuvel Palaniyappan (pponnuvel) |
importance: | Undecided → High |
summary: |
- ucf fails to work for local diversions on Jammy + [SRU] ucf fails to work for local diversions on Jammy |
tags: | added: sts |
description: | updated |
Changed in ucf (Ubuntu Jammy): | |
status: | In Progress → Won't Fix |
Hey Pon, the debdiff contains changes to a bunch of files inside .pc which should not be included.
Can you try generating the debdiff again wtihout these changes?
Once of the ways would be to drop in a patch to d/patches and add it with quilt or apply it with the "patch" command and then run "dpkg-source --commit" to generate the patch for you.