X Strike Force X.Org X11 SVN commit: r162 - trunk/debian/local
Author: branden
Date: 2005-06-09 15:03:32 -0500 (Thu, 09 Jun 2005)
New Revision: 162
Modified:
trunk/debian/local/dexconf
trunk/debian/local/dexconf.1
Log:
Tidy up dexconf:
+ Update comments and usage message to document support for both XFree86
4.x and XOrg X servers.
+ Rename the XF86CONFIG variable to CONFIGFILE and use it instead of the
kludgey "REALCONFIG" variable introduced by Ubuntu.
+ Add a variable, SERVERNAME, which documents the X server executable's
name (used for writing an intelligible comment block at the top of the
configuration file.)
+ Support the xserver-xorg-dbg package.
+ Add a variable, TEMPLATE_BASE, which is used to determine the top level
of the debconf template namespace, and calculate it based on the name of
the default X server package.
+ Improve comments in miscellaneous ways.
+ Restore original documentation of how to restore automatic updates of the
configuration file, as Ubuntu's replacement assumed 1) unprivileged users
would be able to create files in /etc/X11 and 2) the optional "sudo"
package would be installed.
+ Remove defoma-related FontPaths (see Message-ID:
<20050308165334.GA30259@redwald.deadbeast.net>
<URL: http://lists.debian.org/debian-x/2005/03/msg00063.html >).
+ Restore original meanings of "Configured Mouse" and "Generic Mouse".
+ Add extensive comments documenting Ubuntu kludges and my thoughts on how
to better solve the same problems.
+ Make shell style and whitespace usage consistent.
Update dexconf manpage:
+ Mention support for XOrg X server as well as XFree86 4.x.
+ Provide both xorg-x11-era path to the Debian X FAQ in /usr/share/doc.
+ Provide URL to xorg-x11 SVN trunk for Debian X FAQ.
+ Update revision date.
+ Update copyright notice.
Modified: trunk/debian/local/dexconf
===================================================================
--- trunk/debian/local/dexconf 2005-06-09 18:34:46 UTC (rev 161)
+++ trunk/debian/local/dexconf 2005-06-09 20:03:32 UTC (rev 162)
@@ -1,11 +1,12 @@
#!/bin/sh
-# $Id: dexconf 1750M 2004-09-21 11:31:44Z (local) $
+# $Id$
# dexconf: Debian X server configuration file writer
#
# This tool is a backend which uses debconf database values. It writes an
-# XFree86 X server configuration file based on the information in the database.
+# XFree86 or X.Org X server configuration file based on the information in the
+# database.
#
# Author: Branden Robinson
@@ -35,7 +36,8 @@
usage () {
cat <<EOF
Usage: $PROGNAME [OPTION ...]
- write an Xorg X server configuration file based on debconf database values
+Write an XFree86 or XOrg X server configuration file based on debconf database
+values.
Options:
-h, --help display this usage message and exit
-o FILE, --output=FILE write configuration file to FILE
@@ -130,7 +132,7 @@
bomb "This option, and XFree86 3.x output, are no longer supported."
;;
-h|--help) SHOWHELP=yes EARLYEXIT=yes ;;
- -o|--output) XF86CONFIG="$2"; shift ;;
+ -o|--output) CONFIGFILE="$2"; shift ;;
--) shift; break ;;
*)
bomb "unrecognized option \"$1\"; use \"$PROGNAME --help\" for help"
@@ -147,17 +149,10 @@
exit 0
fi
-
-if [ "`which laptop-detect`" ]; then
- if laptop-detect > /dev/null ; then
- LAPTOP=true
- fi
-fi
-
DEXCONFTMPDIR=
-trap 'if [ -e "$DEXCONFTMPDIR/backup" ] && [ -n "$XF86CONFIG" ]; then \
- cat "$DEXCONFTMPDIR/backup" >"$XF86CONFIG"; \
+trap 'if [ -e "$DEXCONFTMPDIR/backup" ] && [ -n "$CONFIGFILE" ]; then \
+ cat "$DEXCONFTMPDIR/backup" >"$CONFIGFILE"; \
fi; \
rm -rf "$DEXCONFTMPDIR"; \
bomb "received signal; aborting"' HUP INT QUIT TERM
@@ -166,21 +161,23 @@
fetch shared/default-x-server
XSERVERPKG="$RET"
case "$XSERVERPKG" in
- xserver-xorg)
- : ${XF86CONFIG:=/etc/X11/xorg.conf}
- REALCONFIG="/etc/X11/xorg.conf"
- SERVER="xorg"
- ;;
xserver-xfree86|xserver-xfree86-dbg)
- : ${XF86CONFIG:=/etc/X11/XF86Config-4}
- REALCONFIG="/etc/X11/XF86Config-4"
- SERVER="xfree86"
+ : ${CONFIGFILE:=/etc/X11/XF86Config-4}
+ SERVERNAME=XFree86
;;
+ xserver-xorg|xserver-xorg-dbg)
+ : ${CONFIGFILE:=/etc/X11/xorg.conf}
+ SERVERNAME=XOrg
+ ;;
*)
bomb "this program does not know how to configure the \"$XSERVERPKG\" X" \
"server"
esac
+# Determine the base template name, which is the same as the package name, with
+# any -dbg suffix removed.
+TEMPLATE_BASE=${XSERVERPKG%-dbg}
+
# Set up a temporary directory for the files we'll be writing.
TDIR_PARENT="${TMPDIR:-/tmp}"
TDIR="${TMPDIR:-/tmp}/dexconf-tmp-$$"
@@ -203,7 +200,8 @@
bomb "creation of temporary work directory \"$TDIR\" failed"
fi
-# XF86Config-4/xorg.conf sections:
+# The following section names are recognized by the XFree86 4.x and XOrg X
+# servers:
# Files File pathnames
# ServerFlags Server flags NOT USED BY DEXCONF
# Module Dynamic module loading
@@ -225,29 +223,29 @@
exec 4>"$DEXCONFTMPDIR/Header"
cat >&4 <<SECTION
-# $REALCONFIG ($SERVER X Window System server configuration file)
+# ${CONFIGFILE##*/} ($SERVERNAME X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
-# Edit this file with caution, and see the $REALCONFIG manual page.
-# (Type "man $REALCONFIG" at the shell prompt.)
+# Edit this file with caution, and see the ${CONFIGFILE##*/} manual page.
+# (Type "man ${CONFIGFILE##*/}" at the shell prompt.)
#
# This file is automatically updated on $XSERVERPKG package upgrades *only*
# if it has not been modified since the last upgrade of the $XSERVERPKG
# package.
#
# If you have edited this file but would like it to be automatically updated
-# again, run the following commands:
+# again, run the following commands as root:
#
-# cp $REALCONFIG $REALCONFIG.custom
-# sudo sh -c 'md5sum $REALCONFIG >/var/lib/xfree86/${REALCONFIG##*/}.md5sum'
-# sudo dpkg-reconfigure $XSERVERPKG
+# cp $CONFIGFILE $CONFIGFILE.custom
+# md5sum $CONFIGFILE >/var/lib/xfree86/${CONFIGFILE##*/}.md5sum
+# dpkg-reconfigure $XSERVERPKG
SECTION
### FILES
-fetch xserver-$SERVER/config/write_files_section
+fetch $TEMPLATE_BASE/config/write_files_section
if [ "$RET" = "true" ]; then
exec 4>"$DEXCONFTMPDIR/Files"
cat >&4 <<SECTION
@@ -262,9 +260,6 @@
FontPath "/usr/lib/X11/fonts/CID"
FontPath "/usr/lib/X11/fonts/100dpi"
FontPath "/usr/lib/X11/fonts/75dpi"
- # paths to defoma fonts
- FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
- FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
EndSection
SECTION
fi
@@ -272,7 +267,7 @@
### MODULE
# The module list is permitted to be null.
-db_get xserver-$SERVER/config/modules || true
+db_get $TEMPLATE_BASE/config/modules || true
if [ -n "$RET" ]; then
MODULES=$(list_convert "$RET")
exec 4>"$DEXCONFTMPDIR/Module"
@@ -285,16 +280,16 @@
### KEYBOARD / INPUTDEVICE
-fetch xserver-$SERVER/config/inputdevice/keyboard/rules
+fetch $TEMPLATE_BASE/config/inputdevice/keyboard/rules
XKB_RULES="$RET"
-fetch xserver-$SERVER/config/inputdevice/keyboard/model
+fetch $TEMPLATE_BASE/config/inputdevice/keyboard/model
XKB_MODEL="$RET"
-fetch xserver-$SERVER/config/inputdevice/keyboard/layout
+fetch $TEMPLATE_BASE/config/inputdevice/keyboard/layout
XKB_LAYOUT="$RET"
# XkbVariant and XkbOptions are permitted to be null.
-db_get xserver-$SERVER/config/inputdevice/keyboard/variant
+db_get $TEMPLATE_BASE/config/inputdevice/keyboard/variant
XKB_VARIANT="$RET"
-db_get xserver-$SERVER/config/inputdevice/keyboard/options
+db_get $TEMPLATE_BASE/config/inputdevice/keyboard/options
XKB_OPTIONS="$RET"
exec 4>"$DEXCONFTMPDIR/InputDeviceKeyboard"
@@ -320,15 +315,15 @@
DO_EMULATE3BUTTONS=
DO_ZAXISMAPPING=
-fetch xserver-$SERVER/config/inputdevice/mouse/port
+fetch $TEMPLATE_BASE/config/inputdevice/mouse/port
MOUSE_PORT="$RET"
-fetch xserver-$SERVER/config/inputdevice/mouse/protocol
+fetch $TEMPLATE_BASE/config/inputdevice/mouse/protocol
MOUSE_PROTOCOL="$RET"
-fetch xserver-$SERVER/config/inputdevice/mouse/emulate3buttons
+fetch $TEMPLATE_BASE/config/inputdevice/mouse/emulate3buttons
if [ "$RET" = "true" ]; then
DO_EMULATE3BUTTONS=true
fi
-fetch xserver-$SERVER/config/inputdevice/mouse/zaxismapping
+fetch $TEMPLATE_BASE/config/inputdevice/mouse/zaxismapping
if [ "$RET" = "true" ]; then
DO_ZAXISMAPPING=true
fi
@@ -339,8 +334,8 @@
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
- Option "Device" "/dev/input/mice"
- Option "Protocol" "ImPS/2"
+ Option "Device" "$MOUSE_PORT"
+ Option "Protocol" "$MOUSE_PROTOCOL"
SECTION
if [ -n "$DO_EMULATE3BUTTONS" ]; then
printf "\tOption\t\t\"Emulate3Buttons\"\t\"true\"\n" >&4
@@ -377,8 +372,8 @@
Identifier "Generic Mouse"
Driver "mouse"
Option "SendCoreEvents" "true"
- Option "Device" "$MOUSE_PORT"
- Option "Protocol" "$MOUSE_PROTOCOL"
+ Option "Device" "/dev/input/mice"
+ Option "Protocol" "ImPS/2"
SECTION
if [ -n "$DO_EMULATE3BUTTONS" ]; then
printf "\tOption\t\t\"Emulate3Buttons\"\t\"true\"\n" >&4
@@ -389,31 +384,48 @@
printf "EndSection\n" >&4
fi
+# XXX: Kludge warning: This is used to bolt on an InputDevice section for a
+# Synaptics touchpad. This should be 1) moved to a debconf template; 2) made
+# configurable; and 3) more specifically detected (so that the answer to the
+# debconf question can be predetermined). It's not dexconf's business to
+# perform any hardware detection whatsoever.
+#
+# laptop-detect doesn't appear to be packaged for Debian, so this is a no-op for
+# now. See below for further caveats if/when this code comes alive.
+if which laptop-detect >/dev/null 2>&1; then
+ if laptop-detect >/dev/null 2>&1; then
+ LAPTOP=true
+ fi
+fi
+
+# Adding this section may cause event doubling; Ubuntu had kludged around this
+# by swapping the meaning of "Configured Mouse" and "Generic Mouse", but that's
+# not really a suitable fix.
if [ -n "$LAPTOP" ]; then
cat >&4 <<SECTION
Section "InputDevice"
- Identifier "Synaptics Touchpad"
- Driver "synaptics"
- Option "SendCoreEvents" "true"
- Option "Device" "/dev/psaux"
- Option "Protocol" "auto-dev"
- Option "HorizScrollDelta" "0"
+ Identifier "Synaptics Touchpad"
+ Driver "synaptics"
+ Option "SendCoreEvents" "true"
+ Option "Device" "/dev/psaux"
+ Option "Protocol" "auto-dev"
+ Option "HorizScrollDelta" "0"
EndSection
SECTION
fi
### DEVICE
-fetch xserver-$SERVER/config/device/identifier
+fetch $TEMPLATE_BASE/config/device/identifier
DEVICE_IDENTIFIER="$RET"
-fetch xserver-$SERVER/config/device/driver
+fetch $TEMPLATE_BASE/config/device/driver
DEVICE_DRIVER="$RET"
# BusID, VideoRam, and UseFBDev are permitted to be null.
-db_get xserver-$SERVER/config/device/bus_id
+db_get $TEMPLATE_BASE/config/device/bus_id
DEVICE_BUSID="$RET"
-db_get xserver-$SERVER/config/device/video_ram
+db_get $TEMPLATE_BASE/config/device/video_ram
DEVICE_VIDEO_RAM="$RET"
-db_get xserver-$SERVER/config/device/use_fbdev
+db_get $TEMPLATE_BASE/config/device/use_fbdev
DEVICE_USE_FBDEV="$RET"
exec 4>"$DEXCONFTMPDIR/Device"
cat >&4 <<SECTION
@@ -434,13 +446,16 @@
### MONITOR
-fetch xserver-$SERVER/config/monitor/identifier
+fetch $TEMPLATE_BASE/config/monitor/identifier
MONITOR_IDENTIFIER="$RET"
-fetch xserver-$SERVER/config/monitor/horiz-sync
+fetch $TEMPLATE_BASE/config/monitor/horiz-sync
MONITOR_HORIZ_SYNC="$RET"
-fetch xserver-$SERVER/config/monitor/vert-refresh
+fetch $TEMPLATE_BASE/config/monitor/vert-refresh
MONITOR_VERT_REFRESH="$RET"
-db_get xserver-$SERVER/config/monitor/use_sync_ranges
+# XXX: This is some new template Ubuntu added. Probably better solved by just
+# making empty entries for sync ranges syntatically valid, as Sven Luther
+# suggested.
+db_get $TEMPLATE_BASE/config/monitor/use_sync_ranges
MONITOR_SYNC_RANGES="$RET"
exec 4>"$DEXCONFTMPDIR/Monitor"
@@ -450,6 +465,7 @@
Option "DPMS"
SECTION
+# XXX: Sync ranges kludge continued. See "use_sync_ranges" above.
if [ -n "$MONITOR_SYNC_RANGES" ]; then
cat >&4 <<SECTION
HorizSync $MONITOR_HORIZ_SYNC
@@ -457,23 +473,29 @@
SECTION
fi
-db_get xserver-$SERVER/config/display/modes
+### SCREEN
+
+# The mode list is permitted to be null.
+db_get $TEMPLATE_BASE/config/display/modes
if [ -n "$RET" ]; then
DISPLAY_MODES=$(list_convert "$RET")
fi
+# XXX: Hoo-ha. Another awful kludge. If this mode isn't defined upstream (or
+# is defined wrongly) in either of
+# xc/programs/Xserver/hw/xfree86/etc/{vesa,extra}modes, that should be patched.
+# Furthermore, because everyone hates the limited mode selection list in the
+# debconf template, we probably ought to generate it at package build time by
+# grepping those files. (Of course, for laptop/flat panel users, what we really
+# want to do is query the monitor from the X server's config script, and
+# pre-answer the question with the display's native resolution so that people
+# with a high question priority won't be blitzed with the truckload of modes
+# that the aforementioned grep method would present them with.)
if [ "$(echo "$DISPLAY_MODES" | grep 1280x800)" ]; then
printf "\tModeline\t\"1280x800@60\" 83.91 1280 1312 1624 1656 800 816 824 841\n" >&4
fi
printf "EndSection\n" >&4
-### SCREEN
-
-# The mode list is permitted to be null.
-#db_get xserver-$SERVER/config/display/modes
-#if [ -n "$RET" ]; then
-# DISPLAY_MODES=$(list_convert "$RET")
-#fi
-fetch xserver-$SERVER/config/display/default_depth
+fetch $TEMPLATE_BASE/config/display/default_depth
DISPLAY_DEFAULT_DEPTH="$RET"
exec 4>"$DEXCONFTMPDIR/Screen"
cat >&4 <<SECTION
@@ -506,6 +528,7 @@
if ! has_multiplexed_mouse; then
printf "\tInputDevice\t\"Generic Mouse\"\n" >&4
fi
+# XXX: Synaptics touchpad kludge; see above.
if [ -n "$LAPTOP" ]; then
printf "\tInputDevice\t\"Synaptics Touchpad\"\n" >&4
fi
@@ -513,7 +536,7 @@
### DRI
-fetch xserver-$SERVER/config/write_dri_section
+fetch $TEMPLATE_BASE/config/write_dri_section
if [ "$RET" = "true" ]; then
exec 4>"$DEXCONFTMPDIR/DRI"
cat >&4 <<SECTION
@@ -544,24 +567,24 @@
done
# Ensure we can write to our destination if it already exits.
-if [ -e "$XF86CONFIG" ]; then
- if [ ! -w "$XF86CONFIG" ]; then
- bomb "unable to write to \"$XF86CONFIG\""
+if [ -e "$CONFIGFILE" ]; then
+ if [ ! -w "$CONFIGFILE" ]; then
+ bomb "unable to write to \"$CONFIGFILE\""
fi
fi
BACKUP=
# Create a backup of the existing configuration file if it already exists.
-if [ -e "$XF86CONFIG" ]; then
- cat "$XF86CONFIG" >"$DEXCONFTMPDIR/backup"
+if [ -e "$CONFIGFILE" ]; then
+ cat "$CONFIGFILE" >"$DEXCONFTMPDIR/backup"
BACKUP=true
fi
# Move the new file into place.
-if ! cat "$OUTFILE" >"$XF86CONFIG"; then
+if ! cat "$OUTFILE" >"$CONFIGFILE"; then
# Failed; try to restore the backup.
if [ -n "$BACKUP" ]; then
- cat "$DEXCONFTMPDIR/backup" >"$XF86CONFIG"
+ cat "$DEXCONFTMPDIR/backup" >"$CONFIGFILE"
fi
fi
Modified: trunk/debian/local/dexconf.1
===================================================================
--- trunk/debian/local/dexconf.1 2005-06-09 18:34:46 UTC (rev 161)
+++ trunk/debian/local/dexconf.1 2005-06-09 20:03:32 UTC (rev 162)
@@ -1,9 +1,8 @@
-.\" This manpage is copyright (C) 2000, 2001, 2003, 2004 Progeny Linux
-.\" Systems, Inc.
+.\" $Id: dexconf.1 1746 2004-08-23 14:50:25Z branden $
+.\"
+.\" Copyright 2000-2005 Progeny Linux Systems, Inc.
.\" Author: Branden Robinson <branden@progeny.com>
.\"
-.\" $Id: dexconf.1 1746 2004-08-23 14:50:25Z branden $
-.\"
.\" This is free software; you may redistribute it and/or modify
.\" it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2,
@@ -27,9 +26,9 @@
\\$2 \(laURL: \\$1 \(ra\\$3
..
.if \n[.g] .mso www.tmac
-.TH dexconf 1 "2004\-10\-31" "Debian Project"
+.TH dexconf 1 "2005\-06\-09" "Debian Project"
.SH NAME
-dexconf \- generate XFree86 X server configuration file from debconf data
+dexconf \- generate XOrg or XFree86 X server configuration file from debconf data
.SH SYNOPSIS
.B dexconf
[
@@ -40,13 +39,20 @@
retrieves values from
.BR debconf (7)'s
database and uses them to build an
+.I xorg.conf
+or
.I XF86Config\-4
file.
+The former is used by the
+.BR XOrg (1x)
+X server, and the latter by the
+.BR XFree86 (1x)
+X server (version 4.0 and later).
.PP
The information that
.B dexconf
uses is typically entered via a debconf frontend (or possibly in part by
-hardware autodetection tools).
+hardware detection tools).
Note that
.B dexconf
itself does
@@ -59,16 +65,28 @@
It is also important to note that
.BR dexconf ,
and the corresponding debconf questions whose answers it retrieves, are not
-intended to replace a full\-featured XFree86 X server configuration tool;
-that is the province of
-.BR xf86cfg (1),
-currently under development by the XFree86 Project, Inc.
+intended to replace a full\-featured X server configuration tool; that is the
+province of
+.BR xorgcfg (1x)
+(for
+.BR XOrg )
+and
+.BR xf86cfg (1x)
+(for
+.BR XFree86 ),
+currently under development.
In the meantime, however, users inexperienced with the syntax of the
+.I xorg.conf
+and
.I XF86Config\-4
-file may use
+files can use
.B dexconf
-to generate the XFree86 X server configuration file with a minimal amount
-of detailed knowledge of their hardware characteristics.
+to generate the
+.B XOrg
+and
+.B XFree86
+X server configuration file with a minimal amount of detailed knowledge of their
+hardware characteristics.
.PP
More experienced users should feel free to use
.BR dexconf \-generated
@@ -82,8 +100,11 @@
.BI \-o\ file \fR,\fB\ \-\-output= file
By default,
.B dexconf
-writes to
-.IR /etc/X11/XF86Config\-4 .
+writes to either
+.I /etc/X11/xorg.conf
+or
+.IR /etc/X11/XF86Config\-4 ,
+depending on the selected default X server.
This option instructs
.B dexconf
to write to
@@ -110,8 +131,14 @@
.SH "OUTPUT FILES"
.TP
.I /etc/X11/XF86Config\-4
-is the configuration file for the XFree86
-.RI 4. x
+is the configuration file for the
+.B XFree86
+X server (version
+.RI 4. x ).
+.TP
+.I /etc/X11/xorg.conf
+is the configuration file for the
+.B XOrg
X server.
.SH DIAGNOSTICS
.B dexconf
@@ -197,8 +224,12 @@
.TP
.BI "this program does not know how to configure the " package " X server"
.B dexconf
-only knows how to write configuration files for XFree86 version
-.RI 4. x
+only knows how to write configuration files for the
+.B XOrg
+and
+.B XFree86
+(version
+.RI 4. x )
X servers.
The value of the
.B shared/default\-x\-server
@@ -304,13 +335,21 @@
command.
.SH AUTHOR
.B dexconf
-was written by Branden Robinson with sponsorship from Progeny Linux Systems.
+was written by Branden Robinson with sponsorship from Progeny Linux Systems,
+Inc.
.SH "SEE ALSO"
+.BR xorg.conf (5x),
+.BR xorgcfg (1x),
.BR XF86Config\-4 (5x),
.BR xf86cfg (1x),
.BR dpkg\-reconfigure (8),
.BR debconf (7)
.PP
.IR "Debian X Window System Frequently Asked Questions" :
+.br
/usr/share/doc/xfree86\-common/FAQ.xhtml
+.br
+/usr/share/doc/x11\-common/FAQ.xhtml
+.br
+.URL "http://necrotic.deadbeast.net/svn/xorg-x11/trunk/debian/local/FAQ.xhtml"
.\" vim:set et tw=80:
Reply to: