Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 190420 - bug in baselayout-2 path-joining (breaks softlevels)
Summary: bug in baselayout-2 path-joining (breaks softlevels)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-27 16:07 UTC by Thomas Pani
Modified: 2007-09-02 13:17 UTC (History)
0 users

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


Attachments
grep__RC_SVCDIR.txt (grep__RC_SVCDIR.txt,1.37 KB, text/plain)
2007-08-27 16:10 UTC, Thomas Pani
Details
Fix the issue (rc-soft.patch,1.50 KB, patch)
2007-08-28 08:48 UTC, Roy Marples (RETIRED)
Details | Diff
Fix all the issues. (rc-soft.patch,3.55 KB, patch)
2007-08-28 09:13 UTC, Roy Marples (RETIRED)
Details | Diff
grep__RC_SVCDIR.2.txt (grep__RC_SVCDIR.2.txt,375 bytes, text/plain)
2007-08-28 16:15 UTC, Thomas Pani
Details
cupsd/samba init.d conflict (rc.error,278 bytes, text/plain)
2007-08-28 16:22 UTC, Thomas Pani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Pani 2007-08-27 16:07:02 UTC
I get the following error message when booting into a non-default softlevel with baselayout-2:
    * fopen `/lib/rcscripts/init.dksoftlevel': Read-only file system

I guess this happens because RC_SVCDIR is defined as follows
    rc-misc.h:#define RC_SVCDIR     RC_LIBDIR "/init.d"
and the according fopen call doesn't prepend a slash:
    rc.c:   if (! (fp = fopen (RC_SVCDIR "ksoftlevel", "w"))) {
Comment 1 Thomas Pani 2007-08-27 16:10:01 UTC
Created attachment 129338 [details]
grep__RC_SVCDIR.txt

Please note that this affects more concatenations, as listed in the attachement.

Baselayout version is 2.0.0_rc3-r1.
Comment 2 Roy Marples (RETIRED) gentoo-dev 2007-08-28 08:48:00 UTC
Created attachment 129443 [details, diff]
Fix the issue

Please test and report back
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-08-28 09:13:12 UTC
Created attachment 129449 [details, diff]
Fix all the issues.

This fixes everything listed in your log too.
Comment 4 Thomas Pani 2007-08-28 10:16:54 UTC
I think you mixed the RC_{STARTING|STOPPING} <--> softscripts.{new|old} mapping. It's
    RC_STARTING --> softscripts.new
    RC_STOPPING --> softscripts.old
in the first chunk, but inversely in the others.
I'm currently not on the affected system, I'll test & report back as soon as I am.
Comment 5 Roy Marples (RETIRED) gentoo-dev 2007-08-28 10:32:19 UTC
Yes I did, but that shouldn't matter really as it's all #defined and used in the right places.

We could now do this
#define RC_STARTING RC_SVCDIR "/foo"
#define RC_STARTING RC_SVCDIR "/bar"

and it would still work fine.

The only time it would not work fine is if you upgraded whilst rc was changing runlevels.
Comment 6 Roy Marples (RETIRED) gentoo-dev 2007-08-28 10:33:06 UTC
(In reply to comment #5)
> #define RC_STARTING RC_SVCDIR "/foo"
> #define RC_STARTING RC_SVCDIR "/bar"

Erm, obviously should be this
#define RC_STARTING RC_SVCDIR "/foo"
#define RC_STOPPING RC_SVCDIR "/bar"
Comment 7 Thomas Pani 2007-08-28 16:15:52 UTC
Created attachment 129488 [details]
grep__RC_SVCDIR.2.txt

thanks, works for me with the patch applied.

however, please note that this issue still seems to be present in current svn (r2856) as outlined in the attachment.
Comment 8 Thomas Pani 2007-08-28 16:22:35 UTC
Created attachment 129490 [details]
cupsd/samba init.d conflict

FYI, the patch also solved another issue I had with baselayout-2 (see attachment). This now works because samba starts before cupsd.
Comment 9 Roy Marples (RETIRED) gentoo-dev 2007-08-28 16:28:49 UTC
(In reply to comment #7)
> Created an attachment (id=129488) [edit]
> grep__RC_SVCDIR.2.txt
> 
> thanks, works for me with the patch applied.
> 
> however, please note that this issue still seems to be present in current svn
> (r2856) as outlined in the attachment.
> 

Thanks, fixed those now :)
Comment 10 Roy Marples (RETIRED) gentoo-dev 2007-08-28 16:32:35 UTC
(In reply to comment #8)
> Created an attachment (id=129490) [edit]
> cupsd/samba init.d conflict
> 
> FYI, the patch also solved another issue I had with baselayout-2 (see
> attachment). This now works because samba starts before cupsd.

Not sure I understand you - are you saying that our svn/patch fixes or causes the issue?
Comment 11 Thomas Pani 2007-08-28 18:20:53 UTC
The issue was with the unpatched baselayout 2.0.0_rc3-r1:

1) system stuck for some time (~30-60sec) after starting up HAL
2) eerror message "cupsd: timed out waiting for samba"
3) cupsd starts
4) samba (smbd/nmbd) starts
/var/log/messages also only has the eerror message; haven't checked samba/cups logs.

This does no longer happen with the patched ("Fix all the issues") version of baselayout. Now the order is slightly different:
samba->vmware->cupsd, ie samba and cupsd changed places and vmware is in the middle of them (was after both before).

Haven't tried with svn-trunk.

If you need more info on this please tell me and I'll "downgrade" again.
Comment 12 Roy Marples (RETIRED) gentoo-dev 2007-09-02 13:17:05 UTC
Fixed in rc4