Bug#374578: xserver-xorg: md5sums of links considered harmful
Package: xserver-xorg
Version: 1:7.0.22
Severity: normal
I wasn't able to recreate xorg.conf today. One of many reasons that this
was the case was because /var/lib/dpkg/info/xserver-xorg.postinst
insists on using md5sums of links!
I'm going to guess that /var/lib/x11/X.md5sum had an old value of the
checksum, even though the /etc/X11/X link was one that the package had
created--not me.
Here is the relevant bits of /var/lib/dpkg/info/xserver-xorg.postinst:
# compare the current and stored checksums; if they do not match, assume
# that's the way the user wants it.
# why, why, why, why, why, why, why are we md5suming this? -daniels
if [ "$(readlink "$SERVER_SYMLINK" | md5sum)" = \
"$(cat "$SERVER_SYMLINK_CHECKSUM")" ] || \
[ "$(echo "/usr/X11R6/bin/Xorg" | md5sum)" = \
"$(cat "$SERVER_SYMLINK_CHECKSUM")" ] || \
[ "$(echo "/usr/bin/X11/Xorg" | md5sum)" = \
"$(cat "$SERVER_SYMLINK_CHECKSUM")" ] || \
! [ -e "$SERVER_SYMLINK" ]; then
I agree with daniels; why, indeed?! If it wasn't checking the
(incorrect) sums, this test would have passed on my system.
I have a couple of suggestions:
1. Simply check the value of $SERVER_SYMLINK and only muck with it if
it doesn't exist, or it's a known old value.
2. Even better, do the usual dpkg thing: observe dpkg's --force-confdef
(as well as --force-confold and --force-confnew) and create
$SERVER_SYMLINK.dpkg-new or $SERVER_SYMLINK.dpkg-old appropriately. The
user will find it and be able to ditch the new or old link
appropriately.
As a workaround, I ran the following command:
sudo sh -c "readlink /etc/X11/X | md5sum > /var/lib/x11/X.md5sum"
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (600, 'testing'), (80, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) (ignored: LC_ALL set to en_US)
Versions of packages xserver-xorg depends on:
ii debconf 1.5.1 Debian configuration management sy
ii x11-common 1:7.0.22 X Window System (X.Org) infrastruc
ii xbase-clients 1:7.0.1-2 miscellaneous X clients
ii xkb-data 0.8-5 X Keyboard Extension (XKB) configu
ii xserver-xorg-core 1:1.0.2-8 X.Org X server -- core server
ii xserver-xorg-input-al 1:7.0.22 the X.Org X server -- input driver
ii xserver-xorg-input-ev 1:1.0.0.5-2 X.Org X server -- evdev input driv
ii xserver-xorg-input-kb 1:1.0.1.3-2 X.Org X server -- keyboard input d
ii xserver-xorg-input-mo 1:1.0.4-3 X.Org X server -- mouse input driv
ii xserver-xorg-video-al 1:7.0.22 the X.Org X server -- output drive
ii xserver-xorg-video-ap 1:1.0.1.5-2 X.Org X server -- APM display driv
ii xserver-xorg-video-ar 1:0.5.0.5-2 X.Org X server -- ark display driv
ii xserver-xorg-video-at 1:6.5.8.0-1 X.Org X server -- ATI display driv
ii xserver-xorg-video-ch 1:1.0.1.3-3 X.Org X server -- Chips display dr
ii xserver-xorg-video-ci 1:1.0.0.5-2 X.Org X server -- Cirrus display d
ii xserver-xorg-video-cy 1:1.0.0.5-2 X.Org X server -- Cyrix display dr
ii xserver-xorg-video-du 1:0.1.0.5-2 X.Org X server -- dummy display dr
ii xserver-xorg-video-fb 1:0.1.0.5-2 X.Org X server -- fbdev display dr
ii xserver-xorg-video-gl 1:1.0.1.3-3 X.Org X server -- Glint display dr
ii xserver-xorg-video-i1 1:1.1.0.5-2 X.Org X server -- i128 display dri
ii xserver-xorg-video-i7 1:1.0.0.5-2 X.Org X server -- i740 display dri
ii xserver-xorg-video-i8 1:1.5.1.0-2 X.Org X server -- Intel i8xx, i9xx
ii xserver-xorg-video-im 1:1.0.0.5-2 X.Org X server -- IMSTT display dr
ii xserver-xorg-video-mg 1:1.2.1.3.dfsg.1-2 X.Org X server -- MGA display driv
ii xserver-xorg-video-ne 1:1.0.0.5-2 X.Org X server -- Neomagic display
ii xserver-xorg-video-ne 1:0.1.4.1-3 X.Org X server -- Newport display
ii xserver-xorg-video-ns 1:2.7.6.5-2 X.Org X server -- NSC display driv
ii xserver-xorg-video-nv 1:1.0.1.5-2 X.Org X server -- NV display drive
ii xserver-xorg-video-re 1:4.0.1.3.dfsg.1-2 X.Org X server -- Rendition displa
ii xserver-xorg-video-s3 1:1.8.6.5-2 X.Org X server -- S3 ViRGE display
ii xserver-xorg-video-sa 1:2.0.2.3-4 X.Org X server -- Savage display d
ii xserver-xorg-video-si 1:1.3.1.5-3 X.Org X server -- SiliconMotion di
ii xserver-xorg-video-si 1:0.8.1.3-2 X.Org X server -- SiS display driv
ii xserver-xorg-video-si 1:0.7.1.3-2 X.Org X server -- SiS USB display
ii xserver-xorg-video-td 1:1.1.1.3-3 X.Org X server -- tdfx display dri
ii xserver-xorg-video-tg 1:1.0.0.5-3 X.Org X server -- TGA display driv
ii xserver-xorg-video-tr 1:1.0.1.2-2 X.Org X server -- Trident display
ii xserver-xorg-video-ts 1:1.0.0.5-2 X.Org X server -- Tseng display dr
ii xserver-xorg-video-v4 0.0.1.5-1 X.Org X server -- Video 4 Linux di
ii xserver-xorg-video-ve 1:1.0.1.3-2 X.Org X server -- VESA display dri
ii xserver-xorg-video-vg 1:4.0.0.5-2 X.Org X server -- VGA display driv
ii xserver-xorg-video-vi 1:0.1.33.2-3 X.Org X server -- VIA display driv
ii xserver-xorg-video-vm 1:10.11.1.3-2 X.Org X server -- VMware display d
ii xserver-xorg-video-vo 1:1.0.0.5-2 X.Org X server -- Voodoo display d
Versions of packages xserver-xorg recommends:
ii discover1 1.7.18 hardware identification system
ii laptop-detect 0.12.1 attempt to detect a laptop
ii mdetect 0.5.2.1 mouse device autodetection tool
ii xresprobe 0.4.23debian1 X Resolution Probe
-- debconf information:
* xserver-xorg/multiple_possible_x-drivers:
* xserver-xorg/config/monitor/use_sync_ranges: true
* xserver-xorg/config/inputdevice/mouse/port: /dev/input/mice
* xserver-xorg/config/monitor/lcd: true
* xserver-xorg/autodetect_monitor: true
* xserver-xorg/config/display/default_depth: 24
* xserver-xorg/config/display/modes: 1400x1050, 1280x1024, 1024x768
* xserver-xorg/config/inputdevice/keyboard/internal:
* xserver-xorg/config/inputdevice/keyboard/options:
xserver-xorg/config/device/use_fbdev: false
* xserver-xorg/config/inputdevice/keyboard/variant:
* xserver-xorg/config/nonnumeric_string_error:
* xserver-xorg/config/inputdevice/keyboard/layout: us
* xserver-xorg/config/monitor/identifier: DXS:1313
* xserver-xorg/config/inputdevice/mouse/emulate3buttons: true
* xserver-xorg/autodetect_mouse: false
* xserver-xorg/config/monitor/horiz-sync: 30-92
* xserver-xorg/config/monitor/range_input_error:
* xserver-xorg/config/write_dri_section: true
* xserver-xorg/config/inputdevice/keyboard/model: pc104
xserver-xorg/config/device/driver: ati
* xserver-xorg/config/monitor/selection-method: Advanced
* xserver-xorg/config/write_files_section: true
* xserver-xorg/config/monitor/mode-list: 1600x1200 @ 85Hz
* xserver-xorg/config/doublequote_in_string_error:
* xserver-xorg/config/monitor/screen-size: 17 inches (430 mm)
* shared/default-x-server: xserver-xorg
* xserver-xorg/config/inputdevice/mouse/protocol: ImPS/2
* shared/no_known_x-server:
* xserver-xorg/config/device/bus_id_error:
* xserver-xorg/config/monitor/vert-refresh: 50-85
* xserver-xorg/autodetect_keyboard: false
* xserver-xorg/config/modules: bitmap, dbe, ddc, dri, extmod, freetype, glx, int10, record, type1, vbe
xserver-xorg/config/device/video_ram:
xserver-xorg/config/device/identifier: ATI Technologies, Inc. Radeon R250 Lf [FireGL 9000]
* xserver-xorg/config/null_string_error:
* shared/multiple_possible_x-servers:
xserver-xorg/config/device/bus_id: PCI:1:0:0
* xserver-xorg/autodetect_video_card: true
* xserver-xorg/config/inputdevice/keyboard/rules: xorg
--
Bill Wohler <wohler@newt.com> http://www.newt.com/wohler/ GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E.
If you're passed on the right, you're in the wrong lane.
Reply to: