Bug 28750 - Diversions sind nicht lokal; verwenden DPKG_MAINTSCRIPT_PACKAGE=univention-config
Diversions sind nicht lokal; verwenden DPKG_MAINTSCRIPT_PACKAGE=univention-co...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UCR
UCS 3.0
All Linux
: P3 normal (vote)
: UCS 3.1
Assigned To: Philipp Hahn
Sönke Schwardt-Krummrich
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-12 12:55 CEST by Philipp Hahn
Modified: 2012-12-12 21:08 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Troubleshooting
Max CVSS v3 score:


Attachments
Add --local to dpkg-divert for newer dpkg (2.07 KB, patch)
2012-10-12 13:54 CEST, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2012-10-12 12:55:17 CEST
Durch Arbeiten an Bug #19145 ist gerade aufgefallen, daß "ucr" die eingerichteten Diversions nicht länger als "lokale Umleitung" einrichtet, sondern als "Paket univention-config"-Umleitung.
Das führt (teilweise) zu dem Problem, das sich Diversions nicht mehr automatisch entfernen lassen, weil es beim "remove" zu Fehlern kommt, die nach /dev/null umgeleitet werden:

# ucr update
dpkg-divert: error: mismatch on package
  when removing `diversion of /etc/dhcp3/dhclient.conf to /etc/dhcp3/dhclient.conf.debian by univention-config'
  found `local diversion of /etc/dhcp3/dhclient.conf to /etc/dhcp3/dhclient.conf.debian'
dpkg-divert: error: mismatch on package
  when removing `diversion of /etc/udev/rules.d/99-uvmm-node-kvm.rules to /etc/udev/rules.d/99-uvmm-node-kvm.rules.debian by univention-config'
  found `local diversion of /etc/udev/rules.d/99-uvmm-node-kvm.rules to /etc/udev/rules.d/99-uvmm-node-kvm.rules.debian'
dpkg-divert: error: mismatch on package
  when removing `diversion of /etc/modprobe.d/nfs-kernel-lockd to /etc/modprobe.d/nfs-kernel-lockd.debian by univention-config'
  found `local diversion of /etc/modprobe.d/nfs-kernel-lockd to /etc/modprobe.d/nfs-kernel-lockd.debian'
dpkg-divert: error: mismatch on package
  when removing `diversion of /etc/default/libvirt-bin to /etc/default/libvirt-bin.debian by univention-config'
  found `local diversion of /etc/default/libvirt-bin to /etc/default/libvirt-bin.debian'
dpkg-divert: error: mismatch on package
  when removing `diversion of /etc/libvirt/qemu.conf to /etc/libvirt/qemu.conf.debian by univention-config'
  found `local diversion of /etc/libvirt/qemu.conf to /etc/libvirt/qemu.conf.debian'

Ursache dafür ist, das in ucs-3.1/ucs/base/univention-config-registry/python/univention/config_registry/handler.py#ConfigHandlerDiverting beim Aufruf von dpkg-divert zwar DPKG_MAINTSCRIPT_PACKAGE=univention-config gesetzt wird (um den Wrapper für dpkg-divert beum Update von 2.4 auf 3.0 zu deaktivieren), aber dabei kein "--local" übergeben wird. "man 1 dpkg-divert" sagt dazu:
> ENVIRONMENT
>   DPKG_MAINTSCRIPT_PACKAGE
>     If set and the --local and --package options have not been specified, dpkg-divert will use it as the package name.

Um das zu verhindern sollten wir unbedingt dort '--local' einfügen.

Betroffenen Systemen können wie folgt identifiziert werden:
# grep ^univention-config /var/lib/dpkg/diversions

Mir ist allerdings noch unklar, warum das Problem nicht immer auftritt.

Ggf. sollte ucr auch so modifiert werden, daß die Fehler nicht nach /dev/null umgeleitet werden.
Comment 1 Philipp Hahn univentionstaff 2012-10-12 13:54:11 CEST
Created attachment 4709 [details]
Add --local to dpkg-divert for newer dpkg

Das scheint erst mit dpkg_1.16.1.2.89.201203201341 so zu sein (wie auch immer das auf mein Test-System gekommen ist). Von daher ist die Änderung nicht sofort nötig, sollte aber dennoch dringend umgesetzt werden.
Comment 2 Philipp Hahn univentionstaff 2012-10-12 13:59:45 CEST
dpkg war aus ucs_3.0-0-experimental
Comment 3 Stefan Gohmann univentionstaff 2012-10-12 15:16:48 CEST
Das wird für UCC relevant, von daher sollten wir das noch in 3.1 beheben.
Comment 4 Philipp Hahn univentionstaff 2012-10-23 18:12:13 CEST
--local wurde beim Aufruf von dpkg-divert ergänzt

svn36555, univention-config_8.0.4-9.412.201210231803
ChangeLog: svn15360
\item \ucsUCR{} now always uses local diversion (\ucsBug{28750}).
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2012-11-15 18:39:20 CET
(In reply to comment #4)
> --local wurde beim Aufruf von dpkg-divert ergänzt
→ --local wird jetzt immer an dpkg-divert übergeben → OK

> svn36555, univention-config_8.0.4-9.412.201210231803
> ChangeLog: svn15360
> \item \ucsUCR{} now always uses local diversion (\ucsBug{28750}).
→ OK
Comment 6 Stefan Gohmann univentionstaff 2012-12-12 21:08:17 CET
UCS 3.1-0 has been released: 
 http://forum.univention.de/viewtopic.php?f=54&t=2125

If this error occurs again, please use "Clone This Bug".