Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 285929 - >=x11-base/xinit-1.0.8-r7 oddities
Summary: >=x11-base/xinit-1.0.8-r7 oddities
Status: VERIFIED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-22 10:01 UTC by Fabio Erculiani (RETIRED)
Modified: 2009-09-24 21:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix >=x11-apps/xinit-1.0.8-r7 (messfix.patch,2.15 KB, patch)
2009-09-22 10:11 UTC, Fabio Erculiani (RETIRED)
Details | Diff
Fix >=x11-apps/xinit-1.0.8-r7 (real patch) (messfix.patch,1.83 KB, patch)
2009-09-22 10:17 UTC, Fabio Erculiani (RETIRED)
Details | Diff
>=x11-apps/xinit-1.0.8-r7: critical fixes (messfix2.patch,4.93 KB, patch)
2009-09-22 10:35 UTC, Fabio Erculiani (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Erculiani (RETIRED) gentoo-dev 2009-09-22 10:01:37 UTC
There are several oddities and breakish things in new xdm/xdm-setup init scripts.

0. "nox" option NO LONGER WORKS causing a total mess to already configured systems (it breaks backward compatibility), "gentoo=nox" seems the new way but please, keep compatibility with "nox" boot param.

1. xdm-setup sounds very useless, the only thing it does is touch a file if "gentoo=nox" is passed

2. xdm-setup touches a file in a very very bad place which is /etc/init.d/.noxdm which causes init scripts cache to be tained (bad performance impact)

3. xdm uses xdm-setup only for handing the "gentoo=nox" option, this sounds very mmmmmmmh... (mumble!)

4. xdm removes /etc/init.d/.noxdm afterwards (WTF all these complexity!) and makes the init script to fail if "gentoo=nox" is set (see line 133 => return 1), very insane to me

Thanks.


Reproducible: Always
Comment 1 Fabio Erculiani (RETIRED) gentoo-dev 2009-09-22 10:11:26 UTC
Created attachment 204903 [details, diff]
Fix >=x11-apps/xinit-1.0.8-r7

This patch does fix all BUT gentoo=nox (adding backward compatibility is up to you)
Comment 2 Fabio Erculiani (RETIRED) gentoo-dev 2009-09-22 10:17:33 UTC
Created attachment 204904 [details, diff]
Fix >=x11-apps/xinit-1.0.8-r7 (real patch)

I erroneously attached a wrong patch ;)
Comment 3 Fabio Erculiani (RETIRED) gentoo-dev 2009-09-22 10:35:32 UTC
Created attachment 204906 [details, diff]
>=x11-apps/xinit-1.0.8-r7: critical fixes

This patch only addresses critical issues found in init scripts
Comment 4 Rémi Cardona (RETIRED) gentoo-dev 2009-09-23 06:52:30 UTC
(In reply to comment #3)
> Created an attachment (id=204906) [edit]
> >=x11-apps/xinit-1.0.8-r7: critical fixes
> 
> This patch only addresses critical issues found in init scripts

I've applied this patch without the "return 0".

@William, could you take a look?

Thanks
Comment 5 Fabio Erculiani (RETIRED) gentoo-dev 2009-09-23 08:44:54 UTC
"return 1" causes xdm to be marked as faulty and re-run in other runlevels (thus spawning your XDM, which is an unwanted behaviour when using gentoo=nox).
Example: I have 3 runlevels (boot, mystuff, default). I place xdm in mystuff. xdm is started in mystuff and fails. When init enters into the "default" (last) runlevel, xdm is started again and this time, since ".noxdm" file has been already removed by xdm on the previous run XDM is started and thus the "gentoo=nox" option results broken.

If you tried to fix other issues, these fixes, unfortunately, did more harm than good.

It would be nice to have a list of fixed bugs here that have caused this "regression".

Ready to help ;)
Comment 6 William Hubbs gentoo-dev 2009-09-23 15:16:21 UTC
the reason for creating the .noxdm file in /etc/init.d is that is where
the livecd-tools package creates it if nox is on the command line.  In
the current situation, the .noxdm file gets created in /etc/init.d if
nox alone is on the command line and in / otherwise.  Since the xdm init
script only looks for the one in /, the livecd is now broken.

See bug #156570 for a discussion about nox and gentoo=nox.  Basically,
nox without the gentoo= prefix is to be used on the livecd, and the
gentoo=nox version has been adopted so that on a running system all of
our gentoo specific boot options are consistent.

The reason for using the .noxdm file is so that xdm can be restarted
manually without forcing a reboot, which cannot happen if the xdm init
script is looking at the kernel command line.

I am also concerned about the new location of .noxdm in this patch.
Wouldn't /tmp be a better location than  /?

Comment 7 William Hubbs gentoo-dev 2009-09-23 16:09:49 UTC
All,

I partially reverted the patch due to the livecd-tools creating .noxdm
in /etc/init.d.  For now this needs to be consistent with the way the
livecd-tools package works.

Also, I made the change suggested in comment #5.  Now the xdm setup
script returns 0 when the .noxdm file was touched so that it is now
marked as successfully started.
Comment 8 William Hubbs gentoo-dev 2009-09-23 16:31:27 UTC
All,

I need someone who is running X to do the following:

1)  reboot with gentoo=nox on the command line so X doesn't start.
2) try to start X with /etc/init.d/xdm restart once you get to the shell.

Does this work?  Please report back what happens.

Comment 9 William Hubbs gentoo-dev 2009-09-24 17:10:22 UTC
After talking with Remi on irc, I did another update.

Now the xdm-setup script creates the .noxdm file in /tmp and the xdm
script checks for it in /tmp and /etc/init.d so that it supports
livecd-tools as well as the gentoo=nox option.
Comment 10 Fabio Erculiani (RETIRED) gentoo-dev 2009-09-24 21:57:53 UTC
Thenk we can kill this ;)