Bug#285871: xdm logrotate script eats logs

2005-03-25 Thread Andrew Suffield
On Fri, Mar 25, 2005 at 05:55:02PM -0500, Branden Robinson wrote:
> On Thu, Dec 16, 2004 at 02:40:00AM +0000, Andrew Suffield wrote:
> > Package: xdm
> > Severity: important
> > 
> > /etc/logrotate.d/xdm manages to delete the /var/log/xdm.log currently
> > in use, and never signals xdm to reopen its log file. Since xdm
> > usually stays running for weeks at a time, and the log is 'rotated'
> > daily, this means that most of the time xdm is writing to a deleted
> > file. Which is less than helpful.
> 
> I've never seen this behavior.

While xdm is running, edit /var/lib/logrotate/status and set the date
on /var/log/xdm.log to a couple of days ago, then run:

logrotate /etc/logrotate.conf

as root. This causes a new rotation, rather than having to wait for
it.

After this, you should see:

[EMAIL PROTECTED]:~$ ls -l /var/log/xdm.log*
-rw-r-  1 root adm0 Mar 25 23:16 /var/log/xdm.log
-rw-r-  1 root adm 1573 Mar 25 23:16 /var/log/xdm.log.1.gz

[EMAIL PROTECTED]:~$ sudo lsof | grep var/log/xdm
xdm1965  root2w  REG3,6   8376 179574 
/var/log/xdm.log.1 (deleted)
XFree862023  root2w  REG3,6   8376 179574 
/var/log/xdm.log.1 (deleted)
xdm2024  root2w  REG3,6   8376 179574 
/var/log/xdm.log.1 (deleted)

xdm will now proceed to log into this deleted file. Eventually
xdm.log.1.gz will be rotated out of existance, and xdm will continue
logging into the deleted file, leaving you with no xdm logs at all.

> > That's the worst logrotate file I've seen in quite a while.
> 
> What looks wrong with it?
> 
> http://necrotic.deadbeast.net/svn/xfree86/trunk/debian/xdm.logrotate
> 
> /var/log/xdm.log {
>   notifempty
>   missingok
> }

No 'delaycompress'. No 'postrotate' to tell xdm to reopen the
file. And it relies on /etc/logrotate.conf for most of its values,
which is kinda sloppy. A more normal logrotate entry looks like this:

/var/log/apache/*.log {
weekly
missingok
rotate 52
compress
delaycompress
notifempty
create 640 root adm
sharedscripts
postrotate
   if [ -f /var/run/apache.pid ]; then \
 if [ -x /usr/sbin/invoke-rc.d ]; then \
invoke-rc.d apache reload > /dev/null; \
 else \
/etc/init.d/apache reload > /dev/null; \
 fi; \
   fi;
endscript
}

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'  |
   `- -><-  |


signature.asc
Description: Digital signature


Bug#285871: xdm logrotate script eats logs

2004-12-15 Thread Andrew Suffield
Package: xdm
Severity: important

/etc/logrotate.d/xdm manages to delete the /var/log/xdm.log currently
in use, and never signals xdm to reopen its log file. Since xdm
usually stays running for weeks at a time, and the log is 'rotated'
daily, this means that most of the time xdm is writing to a deleted
file. Which is less than helpful.

That's the worst logrotate file I've seen in quite a while.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'  |
   `- -><-  |


signature.asc
Description: Digital signature


Bug#254973: alt modifier issues

2004-06-26 Thread Andrew Suffield
Figured out the cause of the problem, if not the "right"
solution. It's this change (-4 to -5):

diff -ru ./symbols/pc/pc /etc/X11/xkb/symbols/pc/pc
--- ./symbols/pc/pc 2004-05-29 08:51:29.0 +0100
+++ /etc/X11/xkb/symbols/pc/pc  2004-06-16 08:12:52.0 +0100
@@ -170,13 +170,28 @@
 key  {   [  KP_Delete,   KP_Decimal ]};
 // End "Keypad" section
 
-
 // begin modifier mappings
 modifier_map Shift  { Shift_L, Shift_R };
 modifier_map Lock   { Caps_Lock, ISO_Lock };
 modifier_map Control{ Control_L, Control_R };
-modifier_map Mod1   { Alt_L, Alt_R };
 modifier_map Mod2   { Num_Lock };
+
+//  Fake keys for virtual<->real modifiers mapping 
+key  {   [ ISO_Level3_Shift  ]   };
+key  {   [ Mode_switch   ]   };
+modifier_map Mod5   { ,  };
+
+key   {   [ Alt_L ]   };
+modifier_map Mod1   {  };
+
+key  {   [ Meta_L]   };
+modifier_map Mod1   {  };
+
+key  {   [ Super_L   ]   };
+modifier_map Mod4   {  };
+
+key  {   [ Hyper_L   ]   };
+modifier_map Mod4   {  };
 };
 
 // definition for the PC-AT type 101 key keyboard


What has happened here is that mod1 is now associated with keycode
 (a key which does not appear to exist on a PC keyboard) instead
of keysyms Alt_L and Alt_R.

Magic elsewhere in the keymap causes Alt_L and Alt_R to still generate
modifier state 1 - but that's not enough. Here's what KDE wants to do:

KeyPress mod1-TAB: display the window selection widget, and shift to
   the next window, focussing it

KeyRelease mod1: remove the window selection widget, raise the
 focussed window

Here's what they actually see:

KeyPress Alt_L: (no binding, ignored)
KeyPress mod1-TAB: <...>
KeyRelease mod1-TAB: (no binding, ignored)
KeyRelease Alt_L: (no binding, ignored)

Since Alt_L is not part of mod1 (it just happens to coincidentally
generate it inside XKB).

I'm not really sure what the right fix to this is, because I don't
understand why the change was made in the first place. Absent a better
explanation, I'd back out this change:

-modifier_map Mod1   { Alt_L, Alt_R };

Restoring that line should fix the problem.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'  |
   `- -><-  |


signature.asc
Description: Digital signature


Bug#251310: compose:caps support for XKB

2004-05-27 Thread Andrew Suffield
Package: xlibs
Severity: wishlist

--- /etc/X11/xkb/symbols/compose~   2004-05-27 16:46:28.0 -0500
+++ /etc/X11/xkb/symbols/compose2004-05-27 16:47:22.0 -0500
@@ -15,3 +15,7 @@
 key  {   [Multi_key, Multi_key   ]   };
 };
 
+partial modifier_keys 
+xkb_symbols "caps" {
+key  {   [Multi_key, Multi_key   ]   };
+};
--- /etc/X11/xkb/rules/xfree86~ 2004-05-27 16:55:39.0 -0500
+++ /etc/X11/xkb/rules/xfree86  2004-05-27 16:55:47.0 -0500
@@ -170,6 +170,7 @@
   compose:ralt =   +compose(ralt)
   compose:rwin =   +compose(rwin)
   compose:menu =   +compose(menu)
+  compose:caps =   +compose(caps)
 
 ! option   =   compat
   grp_led:num  =   +leds(num)

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'  |
   `- -><-  |



Re: using freedesktop.org libs

2003-11-11 Thread Andrew Suffield
On Tue, Nov 11, 2003 at 01:14:30AM +0100, Michel D?nzer wrote:
> > > I found this idea very interesting. I think that the debian project 
> > > should 
> > > take more advantage of the freedesktop.org libs.
> > 
> > Glancing briefly at the packages in sid, we've been using the ones
> > they have released for a while. Unreleased libraries do not belong in
> > unstable.
> 
> It's not about released vs. unreleased but XFree86 vs. freedesktop.org.

Presumably you think freedesktop.org will do a better job of
maintaining them. So why are you so eager to use things which they say
aren't ready for release, if you trust their skills so much?

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'  |
   `- -><-  |


signature.asc
Description: Digital signature


Re: using freedesktop.org libs

2003-11-10 Thread Andrew Suffield
On Mon, Nov 10, 2003 at 09:44:20PM +, Anthraxz __ wrote:
  ^^^

If you don't have a proper From line, everybody will think you're a
dickhead.

> The freebsd developpers are making some changes to the XFree86 ports to 
> reduce the pain associated with upgrading and maintaining XFree86.
> 
> http://www.freebsdforums.org/forums/showthread.php?threadid=16052

Debian doesn't share freebsd's bug of building everything on the
target system, so this doesn't really apply.

> I found this idea very interesting. I think that the debian project should 
> take more advantage of the freedesktop.org libs.

Glancing briefly at the packages in sid, we've been using the ones
they have released for a while. Unreleased libraries do not belong in
unstable.

Please at least make an effort at some research in future, it took me
barely five minutes to note all this stuff and write this mail.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'  |
   `- -><-  |


signature.asc
Description: Digital signature


Bug#165591: debconf shenanigans

2002-10-20 Thread Andrew Suffield
Package: xserver-xfree86
Version: 4.2.1-3

Summary:
Answering "no" to move_existing_nondebconf_config doesn't stop dexconf
from running, and the question is repeatedly asked on every
reinstall/upgrade of xserver-xfree86.


This should be pretty easy to reproduce; replace /etc/X11/XF86Config-4
with an empty file, dpkg-reconfigure xserver-xfree86, say "Yes" to
"Manage config with debconf" and "No" to "Replace existing config
file"; postinst will either write the file or fail (depending on what
random values happened to be in the debconf database), and "Replace
existing config file" will be asked again on the next
installation.

(The workaround is fairly obvious; dpkg-reconfigure xserver-xfree86
and say "no" to the first question)

The basic problem is that, in the config script, if the user replies
"no" to move_existing_nondebconf_config then the script aborts
immediately. However, this does not affect the postinst's behaviour;
it tries to create the file anyway.

My inclination is that config should db_set manage_config_with_debconf
to false if move_existing_nondebconf_config is false. Also, postinst
probably needs to check both values and do something appropriate in
the yes/no case.

FWIW, the output of 
/usr/share/debconf/frontend sh -x /var/lib/dpkg/info/xserver-xfree86.postinst 
configure
and
debconf-show xserver-xfree86
is attached, in the broken state.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ | Dept. of Computing,
 `. `'  | Imperial College,
   `- -><-  | London, UK
+ set -e
+ THIS_PACKAGE=xserver-xfree86
+ THIS_SCRIPT=postinst
+ SOURCE_VERSION=4.2.1-3
+ trap 'message;  message "Received signal.  Aborting xserver-xfree86 
package postinst script.";  message;  exit 1' HUP INT QUIT TERM
+ which readlink
+ . /usr/share/debconf/confmodule
++ '[' '!' 1 ']'
++ '[' -z '' ']'
++ exec
++ DEBCONF_REDIR=1
++ export DEBCONF_REDIR
++ _old_opts=configure
++ set -- capb CAPB
++ eval 'db_capb () {
echo "CAPB $@" >&3
# Set to newline to get whole line.
local IFS='\''
'\''
local _LINE
read -r _LINE
# Disgusting, but it'\''s the only good way to split the line,
# preserving all other whitespace.
RET=${_LINE#*[  ]}
return ${_LINE%%[   ]*}
  }'
++ set -- set SET
++ eval 'db_set () {
echo "SET $@" >&3
# Set to newline to get whole line.
local IFS='\''
'\''
local _LINE
read -r _LINE
# Disgusting, but it'\''s the only good way to split the line,
# preserving all other whitespace.
RET=${_LINE#*[  ]}
return ${_LINE%%[   ]*}
  }'
++ set -- reset RESET
++ eval 'db_reset () {
echo "RESET $@" >&3
# Set to newline to get whole line.
local IFS='\''
'\''
local _LINE
read -r _LINE
# Disgusting, but it'\''s the only good way to split the line,
# preserving all other whitespace.
RET=${_LINE#*[  ]}
return ${_LINE%%[   ]*}
  }'
++ set -- title TITLE
++ eval 'db_title () {
echo "TITLE $@" >&3
# Set to newline to get whole line.
local IFS='\''
'\''
local _LINE
read -r _LINE
# Disgusting, but it'\''s the only good way to split the line,
# preserving all other whitespace.
RET=${_LINE#*[  ]}
return ${_LINE%%[   ]*}
  }'
++ set -- input INPUT
++ eval 'db_input () {
echo "INPUT $@" >&3
# Set to newline to get whole line.
local IFS='\''
'\''
local _LINE
read -r _LINE
# Disgusting, but it'\''s the only good way to split the line,
# preserving all other whitespace.
RET=${_LINE#*[  ]}
return ${_LINE%%[   ]*}
  }'
++ set -- beginblock BEGINBLOCK
++ eval 'db_beginblock () {
echo "BEGINBLOCK $@" >&3
# Set to newline to get whole line.
local IFS='

Bug#165591: debconf shenanigans

2002-10-20 Thread Andrew Suffield
Package: xserver-xfree86
Version: 4.2.1-3

Summary:
Answering "no" to move_existing_nondebconf_config doesn't stop dexconf
from running, and the question is repeatedly asked on every
reinstall/upgrade of xserver-xfree86.


This should be pretty easy to reproduce; replace /etc/X11/XF86Config-4
with an empty file, dpkg-reconfigure xserver-xfree86, say "Yes" to
"Manage config with debconf" and "No" to "Replace existing config
file"; postinst will either write the file or fail (depending on what
random values happened to be in the debconf database), and "Replace
existing config file" will be asked again on the next
installation.

(The workaround is fairly obvious; dpkg-reconfigure xserver-xfree86
and say "no" to the first question)

The basic problem is that, in the config script, if the user replies
"no" to move_existing_nondebconf_config then the script aborts
immediately. However, this does not affect the postinst's behaviour;
it tries to create the file anyway.

My inclination is that config should db_set manage_config_with_debconf
to false if move_existing_nondebconf_config is false. Also, postinst
probably needs to check both values and do something appropriate in
the yes/no case.

FWIW, the output of 
/usr/share/debconf/frontend sh -x /var/lib/dpkg/info/xserver-xfree86.postinst configure
and
debconf-show xserver-xfree86
is attached, in the broken state.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ | Dept. of Computing,
 `. `'  | Imperial College,
   `- -><-  | London, UK

+ set -e
+ THIS_PACKAGE=xserver-xfree86
+ THIS_SCRIPT=postinst
+ SOURCE_VERSION=4.2.1-3
+ trap 'message;  message "Received signal.  Aborting xserver-xfree86 package 
+postinst script.";  message;  exit 1' HUP INT QUIT TERM
+ which readlink
+ . /usr/share/debconf/confmodule
++ '[' '!' 1 ']'
++ '[' -z '' ']'
++ exec
++ DEBCONF_REDIR=1
++ export DEBCONF_REDIR
++ _old_opts=configure
++ set -- capb CAPB
++ eval 'db_capb () {
echo "CAPB $@" >&3
# Set to newline to get whole line.
local IFS='\''
'\''
local _LINE
read -r _LINE
# Disgusting, but it'\''s the only good way to split the line,
# preserving all other whitespace.
RET=${_LINE#*[  ]}
return ${_LINE%%[   ]*}
  }'
++ set -- set SET
++ eval 'db_set () {
echo "SET $@" >&3
# Set to newline to get whole line.
local IFS='\''
'\''
local _LINE
read -r _LINE
# Disgusting, but it'\''s the only good way to split the line,
# preserving all other whitespace.
RET=${_LINE#*[  ]}
return ${_LINE%%[   ]*}
  }'
++ set -- reset RESET
++ eval 'db_reset () {
echo "RESET $@" >&3
# Set to newline to get whole line.
local IFS='\''
'\''
local _LINE
read -r _LINE
# Disgusting, but it'\''s the only good way to split the line,
# preserving all other whitespace.
RET=${_LINE#*[  ]}
return ${_LINE%%[   ]*}
  }'
++ set -- title TITLE
++ eval 'db_title () {
echo "TITLE $@" >&3
# Set to newline to get whole line.
local IFS='\''
'\''
local _LINE
read -r _LINE
# Disgusting, but it'\''s the only good way to split the line,
# preserving all other whitespace.
RET=${_LINE#*[  ]}
return ${_LINE%%[   ]*}
  }'
++ set -- input INPUT
++ eval 'db_input () {
echo "INPUT $@" >&3
# Set to newline to get whole line.
local IFS='\''
'\''
local _LINE
read -r _LINE
# Disgusting, but it'\''s the only good way to split the line,
# preserving all other whitespace.
RET=${_LINE#*[  ]}
return ${_LINE%%[   ]*}
  }'
++ set -- beginblock BEGINBLOCK
++ eval 'db_beginblock () {
echo "BEGINBLOCK $@" >&3
# Set to newline to get whole line.
local IFS='