From 28e5a55bb555d127c40d21f6e01a7e945b2f0c8b Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Fri, 15 Aug 2008 21:01:34 +0200 Subject: [PATCH 1/2] Add three xrandr patches from upstream git * xrandr: Fix for 64bit: feed a pointer to the right size variable to scanf(). * xrandr: update the manpage. * xrandr: manpage typo fixes. --- debian/changelog | 10 + ...eed-a-pointer-to-the-right-size-vari.patch | 29 ++ .../05_xrandr-update-the-manpage.patch | 270 ++++++++++++++++++ .../06_xrandr-Manpage-typo-fixes.patch | 45 +++ debian/patches/series | 3 + 5 files changed, 357 insertions(+) create mode 100644 debian/patches/04_xrandr-Fix-for-64bit-feed-a-pointer-to-the-right-size-vari.patch create mode 100644 debian/patches/05_xrandr-update-the-manpage.patch create mode 100644 debian/patches/06_xrandr-Manpage-typo-fixes.patch diff --git a/debian/changelog b/debian/changelog index 4c1bc58..35d6f00 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +x11-xserver-utils (7.3+5) UNRELEASED; urgency=low + + * xrandr: Fix for 64bit: feed a pointer to the right size variable to + scanf(). + * xrandr: update the manpage. + * xrandr: manpage typo fixes. + (all patches from upstream git) + + -- Julien Cristau Fri, 15 Aug 2008 20:58:12 +0200 + x11-xserver-utils (7.3+4) unstable; urgency=low * xrandr: move outputs among CRTCs as necessary (closes: #486142). diff --git a/debian/patches/04_xrandr-Fix-for-64bit-feed-a-pointer-to-the-right-size-vari.patch b/debian/patches/04_xrandr-Fix-for-64bit-feed-a-pointer-to-the-right-size-vari.patch new file mode 100644 index 0000000..2a2fdf7 --- /dev/null +++ b/debian/patches/04_xrandr-Fix-for-64bit-feed-a-pointer-to-the-right-size-vari.patch @@ -0,0 +1,29 @@ +From 3046799a06ecb79211ef0f4a2db9de4eec7233fb Mon Sep 17 00:00:00 2001 +From: Egbert Eich +Date: Sun, 3 Aug 2008 13:24:49 +0200 +Subject: [PATCH] Fix for 64bit: feed a pointer to the right size variable to scanf(). + +XID is unsigned long, however %x in scanf takes a pointer to an unsigned int. +Thus with XID xid, a sscanf(..., "0x%x", &xid) will most likely produce the +wrong results. +--- + xrandr.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/xrandr.c b/xrandr.c +index 41e15dd..b1e133e 100644 +--- a/xrandr/xrandr.c ++++ b/xrandr/xrandr.c +@@ -428,7 +428,8 @@ set_name_all (name_t *name, name_t *old) + static void + set_name (name_t *name, char *string, name_kind_t valid) + { +- XID xid; ++ unsigned int xid; /* don't make it XID (which is unsigned long): ++ scanf() takes unsigned int */ + int index; + + if ((valid & name_xid) && sscanf (string, "0x%x", &xid) == 1) +-- +1.5.6.3 + diff --git a/debian/patches/05_xrandr-update-the-manpage.patch b/debian/patches/05_xrandr-update-the-manpage.patch new file mode 100644 index 0000000..45630f5 --- /dev/null +++ b/debian/patches/05_xrandr-update-the-manpage.patch @@ -0,0 +1,270 @@ +From 977275a13be0687efc3db1fd3763174ff1256210 Mon Sep 17 00:00:00 2001 +From: Eric Piel +Date: Sun, 10 Aug 2008 23:28:25 +0200 +Subject: [PATCH] update the manpage + +Describe all the options supported, including: --dryrun, -display, +--q1, --q12, and --rate for 1.1 +Describe all short and long version of the option. +Use the usual man style for the option arugments. +Move the four --*mode options out of the output section as they are +independant of an output. +Mention cvt for computing modelines. +Gives some examples. +--- + xrandr.man | 143 +++++++++++++++++++++++++++++++++++++---------------------- + 1 files changed, 90 insertions(+), 53 deletions(-) + +diff --git a/xrandr.man b/xrandr.man +index c6bbd42..ac29367 100644 +--- a/xrandr/xrandr.man ++++ b/xrandr/xrandr.man +@@ -29,42 +29,46 @@ xrandr \- primitive command line interface to RandR extension + [\-help] [\-display \fIdisplay\fP] + [\-q] [\-v] + [\-\-verbose] ++[\-\-dryrun] + [\-\-screen \fIsnum\fP] ++[\-\-q1] ++[\-\-q12] + .br + .B RandR version 1.2 options + .br + [\-\-prop] +-[\-\-fb x] +-[\-\-fbmm x] +-[\-\-dpi ] ++[\-\-fb \fIwidth\fPx\fIheight\fP] ++[\-\-fbmm \fIwidth\fPx\fIheight\fP] ++[\-\-dpi \fIdpi\fP] ++[\-\-newmode \fIname\fP \fImode\fP] ++[\-\-rmmode \fIname\fP] ++[\-\-addmode \fIoutput\fP \fIname\fP] ++[\-\-delmode \fIoutput\fP \fIname\fP] + .br + .B Per-output options + .br +-[\-\-output ] ++[\-\-output \fIoutput\fP] + [\-\-auto] +-[\-\-mode ] ++[\-\-mode \fImode\fP] + [\-\-preferred] +-[\-\-pos x] +-[\-\-rate ] ++[\-\-pos \fIx\fPx\fIy\fP] ++[\-\-rate \fIrate\fP] + [\-\-reflect \fIreflection\fP] + [\-\-rotate \fIorientation\fP] +-[\-\-left\-of \] +-[\-\-right\-of \] +-[\-\-above \] +-[\-\-below \] +-[\-\-same-as \] +-[\-\-set ] ++[\-\-left\-of \fIoutput\fP\] ++[\-\-right\-of \fIoutput\fP\] ++[\-\-above \fIoutput\fP\] ++[\-\-below \fIoutput\fP\] ++[\-\-same-as \fIoutput\fP\] ++[\-\-set \fIproperty\fP \fIvalue\fP] + [\-\-off] +-[\-\-crtc ] +-[\-\-newmode \fImode\fP] +-[\-\-rmmode ] +-[\-\-addmode ] +-[\-\-delmode ] ++[\-\-crtc \fIcrtc\fP] + .br + .B RandR version 1.0 and version 1.1 options + .br + [\-o \fIorientation\fP] + [\-s \fIsize\fP] ++[\-r \fIrate\fP] + [\-x] [\-y] + .SH DESCRIPTION + .I Xrandr +@@ -79,57 +83,83 @@ There are a few global options. Other options modify the last output that is + specified in earlier parameters in the command line. Multiple outputs may + be modified at the same time by passing mutiple \-\-output options followed + immediately by their corresponding modifying options. +-.IP \-\-help ++.IP \-help + Print out a summary of the usage and exit. +-.IP \-v ++.IP "\-v, \-\-version" + Print out the RandR version reported by the X server and exit. + .IP \-\-verbose +-causes xrandr to be more verbose. When used with \-q (or without other ++Causes xrandr to be more verbose. When used with \-q (or without other + options), xrandr will display more information about the server state. When + used along with options that reconfigure the system, progress will be + reported while executing the configuration changes. +-.IP \-q ++.IP "\-q, \-\-query" + When this option is present, or when no configuration changes are requested, +-xrandr will display the current state of the system. +-.IP "\-screen \fIsnum\fP" ++xrandr will display the current state of the system. ++.IP "\-\-dryrun" ++Performs all the actions specified excepted that not changes are made. ++.IP "\-d, \-display \fIname\fP" ++This option selects the X display to use. Note this refers to the X ++screen abstraction, not the monitor (or output). ++.IP "\-\-screen \fIsnum\fP" + This option selects which screen to manipulate. Note this refers to the X + screen abstraction, not the monitor (or output). ++.IP \-\-q1 ++Forces the usage of the RandR version 1.1 protocol, even if a higher version ++is available. ++.IP \-\-q12 ++Forces the usage of the RandR version 1.2 protocol, even the display does not ++report it as supported or a higher version is available. + .SH "RandR version 1.2 options" + These options are only available for X server supporting RandR version 1.2 + or newer. +-.IP \-\-prop ++.IP "\-\-prop, \-\-properties" + This option causes xrandr to display the contents of properties for each + output. \-\-verbose also enables \-\-prop. +-.IP "\-\-fb x" ++.IP "\-\-fb \fIwidth\fPx\fIheight\fP" + Reconfigures the screen to the specified size. All configured monitors must + fit within this size. When this option is not provided, xrandr computes the + smallest screen size that will hold the set of configured outputs; this + option provides a way to override that behaviour. +-.IP "\-\-fbmm x" ++.IP "\-\-fbmm \fIwidth\fPx\fIheight\fP" + Sets the reported values for the physical size of the screen. Normally, + xrandr resets the reported physical size values to keep the DPI constant. + This overrides that computation. +-.IP "\-\-dpi " ++.IP "\-\-dpi \fIdpi\fP" + This also sets the reported physical size values of the screen, it uses the + specified DPI value to compute an appropriate physical size using whatever + pixel size will be set. ++.IP "\-\-newmode \fIname\fP \fImode\fP" ++New modelines can be added to the server and then associated with outputs. ++This option does the former. The \fImode\fP is specified using the ModeLine ++syntax for xorg.conf: hdisp hsyncstart hsyncend htotal vdisp vsyncstart ++vsyncend vtotal \fIflags\fP. \fIflags\fP can be zero or more of +HSync, ++-HSync, +VSync, -VSync, Interlace, DoubleScan, CSync, +CSync, -CSync. Several ++tools permit to compute the usual modeline from a heigh, width, and refresh ++rate, for instance you can use \fBcvt\fR. ++.IP "\-\-rmmode \fIname\fP" ++This removes a mode from the server if it is otherwise unused. ++.IP "\-\-addmode \fIoutput\fP \fIname\fP" ++Add a mode to the set of valid modes for an output. ++.IP "\-\-delmode \fIoutput\fP \fIname\fP" ++Remove a mode from the set of valid modes for an output. + .PP + .B "Per-output options" +-.IP "\-\-output " ++.IP "\-\-output \fIoutput\fP" + Selects an output to reconfigure. Use either the name of the output or the + XID. + .IP \-\-auto + For connected but disabled outputs, this will enable them using their + preferred mode (or, something close to 96dpi if they have no preferred + mode). For disconnected but enabled outputs, this will disable them. +-.IP "\-\-mode " +-This selects a mode. Use either the name or the XID for ++.IP "\-\-mode \fImode\fP" ++This selects a mode. Use either the name or the XID for \fImode\fP + .IP "\-\-preferred" + This selects the same mode as \-\-auto, but it doesn't automatically enable or + disable the output. +-.IP "\-\-pos x" +-Position the output within the screen using pixel coordinates. +-.IP "\-\-rate " ++.IP "\-\-pos \fIx\fPx\fIy\fP" ++Position the output within the screen using pixel coordinates. In case reflection ++or rotation is applied, the translation is applied after the effects. ++.IP "\-\-rate \fIrate\fP" + This marks a preference for refresh rates close to the specified value, when + multiple modes have the same name, this will select the one with the nearest + refresh rate. +@@ -138,54 +168,61 @@ Reflection can be one of 'normal' 'x', 'y' or 'xy'. This causes the output + contents to be reflected across the specified axes. + .IP "\-\-rotate \fIrotation\fP" + Rotation can be one of 'normal', 'left', 'right' or 'inverted'. This causes +-the output contents to be rotated in the specified direction. +-.IP "\-\-left\-of, \-\-right\-of, \-\-above, \-\-below, \-\-same-as " ++the output contents to be rotated in the specified direction. 'right' specifies ++a clockwise rotation of the picture and 'left' specifies a counter-clockwise ++rotation. ++.IP "\-\-left\-of, \-\-right\-of, \-\-above, \-\-below, \-\-same-as \fIanother-output\fP" + Use one of these options to position the output relative to the position of + another output. This allows convenient tiling of outputs within the screen. + The position is always computed relative to the new position of the other + output, so it is not valid to say \-\-output a \-\-left\-of b \-\-output + b \-\-left\-of a. +-.IP "\-\-set " ++.IP "\-\-set \fIproperty\fP \fIvalue\fP" + Sets an output property. Integer properties may be specified as a valid + (see \-\-prop) decimal or hexadecimal (with a leading 0x) value. Atom properties + may be set to any of the valid atoms (see \-\-prop). String properties may be + set to any value. + .IP "\-\-off" + Disables the output. +-.IP "\-\-crtc " ++.IP "\-\-crtc \fIcrtc\fP" + Uses the specified crtc (either as an index in the list of CRTCs or XID). + In normal usage, this option is not required as xrandr tries to make + sensible choices about which crtc to use with each output. When that fails + for some reason, this option can override the normal selection. +-.IP "\-\-newmode \fImode\fP" +-New modelines can be added to the server and then associated with outputs. +-This option does the former. The \fImode\fP is specified using the ModeLine +-syntax for xorg.conf: hdisp hsyncstart hsyncend htotal vdisp vsyncstart +-vsyncend vtotal \fIflags\fP. \fIflags\fP can be zero or more of +HSync, +--HSync, +VSync, -VSync, Interlace, DoubleScan, CSync, +CSync, -CSync. +-.IP "\-\-rmmode " +-This removes a mode from the server if it is otherwise unused. +-.IP "\-\-addmode " +-Add a mode to the set of valid modes for an output. +-.IP "\-\-delmode " +-Remove a mode from the set of valid modes for an output. + .PP + .SH "RandR version 1.1 options" + These options are available for X servers supporting RandR version 1.1 or + older. They are still valid for newer X servers, but they don't interact + sensibly with version 1.2 options on the same command line. +-.IP "\-s or \-s x" ++.IP "\-s, \-\-size \fIsize-index\fP or \-\-size \fIwidth\fPx\fIheight\fP" + This sets the screen size, either matching by size or using the index into + the list of available sizes. +-.IP "\-o \fIrotation\fP" ++.IP "\-r, \-\-rate, \-\-refresh \fIrate\fP" ++This sets the refresh rate closest to the specified value. ++.IP "\-o, \-\-orientation \fIrotation\fP" + This specifies the orientation of the screen, + and can be one of normal, inverted, left or right. + .IP \-x + Reflect across the X axis. + .IP \-y + Reflect across the Y axis. ++.SH EXAMPLES ++Sets an output called LVDS to its preferred mode, and on its right put an ++output called VGA to preferred mode of a screen which has been physically rotated clockwise: ++.RS ++xrandr --output LVDS --auto --rotate normal --pos 0x0 --output VGA --auto --rotate left --right-of LVDS ++.RE ++.PP ++Forces to use a 1024x768 mode on an output called VGA: ++.RS ++xrandr --newmode "1024x768" 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync ++.br ++xrandr --addmode VGA 1024x768 ++.br ++xrandr --output VGA --mode 1024x768 ++.RE + .SH "SEE ALSO" +-Xrandr(3) ++Xrandr(3), cvt(1) + .SH AUTHORS + Keith Packard, + Open Source Technology Center, Intel Corporation. +-- +1.5.6.3 + diff --git a/debian/patches/06_xrandr-Manpage-typo-fixes.patch b/debian/patches/06_xrandr-Manpage-typo-fixes.patch new file mode 100644 index 0000000..4b76f47 --- /dev/null +++ b/debian/patches/06_xrandr-Manpage-typo-fixes.patch @@ -0,0 +1,45 @@ +From 8ef4595aef15b7326822849a50c273f2a2b4ba30 Mon Sep 17 00:00:00 2001 +From: Julien Cristau +Date: Fri, 15 Aug 2008 21:23:13 +0200 +Subject: [PATCH] Manpage typo fixes + +--- + xrandr.man | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/xrandr.man b/xrandr.man +index ac29367..9b6378c 100644 +--- a/xrandr/xrandr.man ++++ b/xrandr/xrandr.man +@@ -96,7 +96,7 @@ reported while executing the configuration changes. + When this option is present, or when no configuration changes are requested, + xrandr will display the current state of the system. + .IP "\-\-dryrun" +-Performs all the actions specified excepted that not changes are made. ++Performs all the actions specified except that no changes are made. + .IP "\-d, \-display \fIname\fP" + This option selects the X display to use. Note this refers to the X + screen abstraction, not the monitor (or output). +@@ -107,8 +107,8 @@ screen abstraction, not the monitor (or output). + Forces the usage of the RandR version 1.1 protocol, even if a higher version + is available. + .IP \-\-q12 +-Forces the usage of the RandR version 1.2 protocol, even the display does not +-report it as supported or a higher version is available. ++Forces the usage of the RandR version 1.2 protocol, even if the display does ++not report it as supported or a higher version is available. + .SH "RandR version 1.2 options" + These options are only available for X server supporting RandR version 1.2 + or newer. +@@ -134,7 +134,7 @@ This option does the former. The \fImode\fP is specified using the ModeLine + syntax for xorg.conf: hdisp hsyncstart hsyncend htotal vdisp vsyncstart + vsyncend vtotal \fIflags\fP. \fIflags\fP can be zero or more of +HSync, + -HSync, +VSync, -VSync, Interlace, DoubleScan, CSync, +CSync, -CSync. Several +-tools permit to compute the usual modeline from a heigh, width, and refresh ++tools permit to compute the usual modeline from a height, width, and refresh + rate, for instance you can use \fBcvt\fR. + .IP "\-\-rmmode \fIname\fP" + This removes a mode from the server if it is otherwise unused. +-- +1.5.6.3 + diff --git a/debian/patches/series b/debian/patches/series index 4e9118b..543c5a7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,6 @@ 01_sessreg_implement_hostname_hashing.diff -p0 02_xmodmap_manpage.diff 03_xrandr-Move-outputs-among-crtcs-as-necessary.-Fixes-14570.patch +04_xrandr-Fix-for-64bit-feed-a-pointer-to-the-right-size-vari.patch +05_xrandr-update-the-manpage.patch +06_xrandr-Manpage-typo-fixes.patch From a43952f9bfaf464530c74c623bb637f0da9393e9 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Fri, 15 Aug 2008 21:03:58 +0200 Subject: [PATCH 2/2] Prepare changelog for upload --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 35d6f00..fe607d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -x11-xserver-utils (7.3+5) UNRELEASED; urgency=low +x11-xserver-utils (7.3+5) unstable; urgency=low * xrandr: Fix for 64bit: feed a pointer to the right size variable to scanf(). @@ -6,7 +6,7 @@ x11-xserver-utils (7.3+5) UNRELEASED; urgency=low * xrandr: manpage typo fixes. (all patches from upstream git) - -- Julien Cristau Fri, 15 Aug 2008 20:58:12 +0200 + -- Julien Cristau Fri, 15 Aug 2008 22:02:17 +0200 x11-xserver-utils (7.3+4) unstable; urgency=low