tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: 5.1 install-from-source



On Sat, 12 Nov 2011, Mouse wrote:
 [using build.sh ... -x ... install=/]

Every time, the install step complains

2011-11-12 23:24:26.01 rc check:
2011-11-12 23:24:26.80  ///etc/rc.d/xdm does not exist
2011-11-12 23:24:26.80  ///etc/rc.d/xfs does not exist

and tells me

2011-11-12 23:24:30.72 postinstall checks failed: rc
2011-11-12 23:24:30.77 To fix, run:
2011-11-12 23:24:30.77     /usr/src/usr.sbin/postinstall/postinstall -s 
'/usr/src' -d // fix rc

Using postinstall with "-s srcdir" is unlikely to do the right thing in general, due to differences between the build environment and the environment in which postinstall is run, but that should not be such a problem when it's run under build.sh. I always recommend using "-s /path/to/etc.tgz -s /path/to/xetc.tgz".

It also seems wrong to run postinstall from the src tree, but
build.sh is using ${HOST_SH} so it will work.

but this is doubly wrong: first, the postinstall script under /usr/src has no execute bits and thus that command won't do anything but complain about their lack,

If build.sh were to run postinstall from the objdir or destdir, then it would have execute bits.

and second, even after prepending "sh" to it, it doesn't help; it runs, but /etc/rc.d/xdm and /etc/rc.d/xfs still don't exist, and the next run produces the same complaints.

When postinstall is run with "-s srcdir", it attempts to detect whether X11 should be included using "get_makevar MKX11 X11ROOTDIR X11SRCDIR". This gives different results depending on whether or not it's run from build.sh, because build.sh sets MKX11=yes.

Oddly, manually running the command printed just above the postinstall check run,

AWK=/home/mouse/i386/OBJDIR/tooldir.NetBSD-5.1-i386/bin/nbawk 
MAKE=/home/mouse/i386/OBJDIR/tooldir.NetBSD-5.1-i386/bin/nbmake /bin/sh 
/usr/src/usr.sbin/postinstall/postinstall -s /usr/src -d // check; if [ $? -gt 
1 ]; then exit 1; fi

does not produce any complaints during the "rc check" portion. I don't know why; the files don't exist, and the next "sh build.sh ... install" run complains.

When you run it by hand, it thinks MKX11 is unset, so it doesn't check for those files. When you run it from build.sh, it thinks MKX11=yes, so it does check for those files. This doesn't explain why the files don't exist or why postinstall fix doesn't install them, but it does explain why the behaviour changes under build.sh.

Is this known and won't be fixed in 5.x, known and fixed in the 5 branch and will appear in the next 5.x release if any, something that needs a PR, something that should be asked elsewhere (where?), something else, what?

Please submit a PR, and I'll try to improve the behaviour in -current. Meanwhile, I suggest that you manually install those files for 5.x.

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index