xorg: Changes to 'debian-unstable'
debian/changelog | 10 ++++++---
debian/xserver-xorg.postinst.in | 4 +++
debian/xserver-xorg.postrm.in | 35 -------------------------------
debian/xserver-xorg.preinst.in | 44 ----------------------------------------
debian/xserver-xorg.prerm.in | 42 --------------------------------------
5 files changed, 12 insertions(+), 123 deletions(-)
New commits:
commit d2c1a9e5cbb37be2b8112fdb9be912de965691ce
Author: David Nusinow <dnusinow@debian.org>
Date: Mon Nov 26 23:07:28 2007 -0500
Prepare changelog for upload
diff --git a/debian/changelog b/debian/changelog
index 3fb92bf..dfc3473 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-xorg (1:7.3+7) UNRELEASED; urgency=low
+xorg (1:7.3+7) unstable; urgency=low
* Don't set driver-specific depths in xserver postinst
+ For newport, vga, savage, suncg6, and tdfx. These should all be handled
@@ -8,7 +8,7 @@ xorg (1:7.3+7) UNRELEASED; urgency=low
This situation was created if you had installed the previous package
from scratch. Closes: #452897
- -- David Nusinow <dnusinow@debian.org> Mon, 26 Nov 2007 22:06:02 -0500
+ -- David Nusinow <dnusinow@debian.org> Mon, 26 Nov 2007 23:07:19 -0500
xorg (1:7.3+6) unstable; urgency=low
commit c2a1c75bec727d232b6dd8a81ff4ff247bd98f10
Author: David Nusinow <dnusinow@debian.org>
Date: Mon Nov 26 22:53:25 2007 -0500
+ For newport, vga, savage, suncg6, and tdfx. These should all be handled
* Get rid of old server symlink stuff that was left behind
+ Make sure we replace symlinks pointing to /bin/true in the postinst.
This situation was created if you had installed the previous package
from scratch. Closes: #452897
diff --git a/debian/changelog b/debian/changelog
index ddfd561..3fb92bf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,14 @@
xorg (1:7.3+7) UNRELEASED; urgency=low
* Don't set driver-specific depths in xserver postinst
- + For newport, vga, savage, suncg6, and tdfx. These should all be handled
+ + For newport, vga, savage, suncg6, and tdfx. These should all be handled
in the drivers themselves
+ * Get rid of old server symlink stuff that was left behind
+ + Make sure we replace symlinks pointing to /bin/true in the postinst.
+ This situation was created if you had installed the previous package
+ from scratch. Closes: #452897
- -- David Nusinow <dnusinow@debian.org> Sun, 25 Nov 2007 23:41:08 -0500
+ -- David Nusinow <dnusinow@debian.org> Mon, 26 Nov 2007 22:06:02 -0500
xorg (1:7.3+6) unstable; urgency=low
diff --git a/debian/xserver-xorg.postinst.in b/debian/xserver-xorg.postinst.in
index 91fd136..c0fb730 100644
--- a/debian/xserver-xorg.postinst.in
+++ b/debian/xserver-xorg.postinst.in
@@ -1644,6 +1644,10 @@ done
# not exist. otherwise, assume that's the way the user wants it.
if ! [ -e "$SERVER_SYMLINK" ]; then
ln -s "$THIS_SERVER" "$SERVER_SYMLINK"
+# recover from an old bug
+elif [ `readlink "$SERVER_SYMLINK"` = "/bin/true" ]; then
+ rm -f "$SERVER_SYMLINK"
+ ln -s "$THIS_SERVER" "$SERVER_SYMLINK"
fi
# Don't touch the config on upgrades except to deal with known issues with old
diff --git a/debian/xserver-xorg.postrm.in b/debian/xserver-xorg.postrm.in
index b0a5378..0946d8a 100644
--- a/debian/xserver-xorg.postrm.in
+++ b/debian/xserver-xorg.postrm.in
@@ -28,40 +28,7 @@ THIS_SERVER=/usr/bin/Xorg
# clean up non-conffile configuration files and related materials on purge
if [ "$1" = "purge" ]; then
- # de-register this file as a handler of the X server symlink
- if [ -e "$SERVER_SYMLINK_ROSTER" ]; then
- # check existing roster file for our package name
- if fgrep -qx "$THIS_PACKAGE" "$SERVER_SYMLINK_ROSTER"; then
- # construct temporary roster file with our package name removed, ignoring
- # failure
- fgrep -vx "$THIS_PACKAGE" "$SERVER_SYMLINK_ROSTER" > \
- "$SERVER_SYMLINK_ROSTER.dpkg-tmp" || true
- # is there anything left?
- if [ -s "$SERVER_SYMLINK_ROSTER.dpkg-tmp" ]; then
- # yes, replace the roster file
- mv "$SERVER_SYMLINK_ROSTER.dpkg-tmp" "$SERVER_SYMLINK_ROSTER"
- else
- # no; remove both the roster and our temporary copy
- rm -f "$SERVER_SYMLINK_ROSTER" "$SERVER_SYMLINK_ROSTER.dpkg-tmp"
- # remove the X server symlink if it was still managed by the package
- if [ -e "$SERVER_SYMLINK_CHECKSUM" ]; then
- # does it exist?
- if [ -e "$SERVER_SYMLINK" ]; then
- # does the current MD5 checksum match the stored checksum?
- if [ "$(readlink "$SERVER_SYMLINK" | md5sum)" \
- = "$(cat "$SERVER_SYMLINK_CHECKSUM")" ]; then
- # yes; remove the symlink
- rm -f "$SERVER_SYMLINK"
- fi
- fi
- # remove the checksum file; any remaining X server symlink still on
- # the system at this point is no longer being managed (local user
- # customization)
- rm -f "$SERVER_SYMLINK_CHECKSUM"
- fi
- fi
- fi
- fi
+ rm -f "$SERVER_SYMLINK"
# de-register this file as a handler of the Xorg 4.x X server configuration
# file
diff --git a/debian/xserver-xorg.preinst.in b/debian/xserver-xorg.preinst.in
index 696537d..9dc06d0 100644
--- a/debian/xserver-xorg.preinst.in
+++ b/debian/xserver-xorg.preinst.in
@@ -43,42 +43,6 @@ if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
if [ -n "$2" ] && \
dpkg --compare-versions "$2" lt "1:7.0.11"; then
if [ -e "/var/lib/xfree86" ]; then
- if [ -e "/var/lib/xfree86/$SERVER_SYMLINK_ROSTER_BASE" ]; then
- if fgrep -qx "$THIS_PACKAGE" \
- "/var/lib/xfree86/$SERVER_SYMLINK_ROSTER_BASE"; then
- # construct temporary roster file with our package name removed, ignoring
- # failure
- fgrep -vx "$THIS_PACKAGE" \
- "/var/lib/xfree86/$SERVER_SYMLINK_ROSTER_BASE" > \
- "/var/lib/xfree86/$SERVER_SYMLINK_ROSTER_BASE.dpkg-tmp" 2>/dev/null \
- || true
-
- # is there anything left?
- if [ -s "/var/lib/xfree86/$SERVER_SYMLINK_ROSTER_BASE.dpkg-tmp" ]; then
- # yes, replace the roster file
- mv "/var/lib/xfree86/$SERVER_SYMLINK_ROSTER_BASE.dpkg-tmp" \
- "$CONFIG_AUX_DIR/$SERVER_SYMLINK_ROSTER_BASE"
- else
- # no; remove both the original and our temporary copy
- rm -f "/var/lib/xfree86/$SERVER_SYMLINK_ROSTER_BASE" \
- "/var/lib/xfree86/$SERVER_SYMLINK_ROSTER_BASE.dpkg-tmp"
- fi
- fi
- fi
-
- if [ -e "/var/lib/xfree86/$SERVER_SYMLINK_CHECKSUM_BASE" ]; then
- # migrate the checksum if it doesn't exist
- if [ -e "$SERVER_SYMLINK_CHECKSUM" ]; then
- message "Removing obsolete server symlink in /var/lib/xfree86"
- rm "/var/lib/xfree86/$SERVER_SYMLINK_CHECKSUM_BASE"
- else
- message "Migrating server symlink"
- mv "/var/lib/xfree86/$SERVER_SYMLINK_CHECKSUM_BASE" \
- "$CONFIG_AUX_DIR"
- fi
- fi
-
-
if [ -e "/var/lib/xfree86/$XORGCONFIG_ROSTER_BASE" ]; then \
if fgrep -qx "$THIS_PACKAGE" \
"/var/lib/xfree86/$XORGCONFIG_ROSTER_BASE"; then
@@ -122,14 +86,6 @@ if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
# if performing a fresh install, place config files under management if they
# do *not* already exist
if [ "$1" = "install" ]; then
- # first, create and checksum the X server symlink; only do this if it
- # both does not exist and is not a symbolic link
- if ! [ -e "$SERVER_SYMLINK" ] && ! [ -L "$SERVER_SYMLINK" ]; then
- # set the target to the unconfigured default
- ln -s "$UNCONFIGURED_LINK_TARGET" "$SERVER_SYMLINK"
- readlink "$SERVER_SYMLINK" | md5sum > "$SERVER_SYMLINK_CHECKSUM"
- fi
- # next, xorg.conf
if ! [ -e "$XORGCONFIG" ]; then
# cheap, fork()-free version of "touch"
: > "$XORGCONFIG"
diff --git a/debian/xserver-xorg.prerm.in b/debian/xserver-xorg.prerm.in
index 55ad9b2..f45708d 100644
--- a/debian/xserver-xorg.prerm.in
+++ b/debian/xserver-xorg.prerm.in
@@ -26,48 +26,6 @@ CONFIG_AUX_DIR=/var/lib/x11
SERVER_SYMLINK_CHECKSUM="$CONFIG_AUX_DIR/${SERVER_SYMLINK##*/}.md5sum"
UNCONFIGURED_LINK_TARGET=$(which true)
-if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
- # if the X server symlink is under automatic management, we are removing its
- # target; we must re-set it to its "unconfigured default"
-
- # first, only mess with config files if the configuration file auxiliary
- # directory exists; if it does not, assume that's the way the user wants it
- if [ -d "$CONFIG_AUX_DIR" ]; then
- # only mess with the server symlink file it exists and is actually a
- # symlink; otherwise, assume that's the way the user wants it
- if [ -L "$SERVER_SYMLINK" ]; then
- # similarly, check for the existence of the checksum file; if it doesn't
- # exist, assume that's the way the user wants it
- if [ -e "$SERVER_SYMLINK_CHECKSUM" ]; then
- # compare the current and stored checksums; if they do not match,
- # assume that's the way the user wants it
- if [ "$(readlink "$SERVER_SYMLINK" | md5sum)" = \
- "$(cat "$SERVER_SYMLINK_CHECKSUM")" ]; then
- # prepare a new version of the config file; this is a symlink, so we
- # can't use the tempfile command for it (we'd have to subsequently
- # use ln -sf, which is subject to race condition attacks)
- NEW_SERVER_SYMLINK="$SERVER_SYMLINK.dpkg-new"
- ln -sf "$UNCONFIGURED_LINK_TARGET" "$NEW_SERVER_SYMLINK"
- if ! cmp -s "$SERVER_SYMLINK" "$NEW_SERVER_SYMLINK"; then
- if [ "$(readlink "$SERVER_SYMLINK")" \
- != "$(readlink "$NEW_SERVER_SYMLINK")" ]; then
- if ! [ -d "$SERVER_SYMLINK" ]; then
- warn "X server provided by $THIS_PACKAGE package is being" \
- "removed; setting $SERVER_SYMLINK to point to" \
- "$UNCONFIGURED_LINK_TARGET"
- mv "$NEW_SERVER_SYMLINK" "$SERVER_SYMLINK"
- readlink "$SERVER_SYMLINK" | md5sum > \
- "$SERVER_SYMLINK_CHECKSUM"
- fi
- fi
- fi
- rm -f "$NEW_SERVER_SYMLINK"
- fi
- fi
- fi
- fi
-fi
-
#DEBHELPER#
exit 0
Reply to: