On Sun, Jul 02, 2017 at 12:50:36PM -0400, RD Thrush wrote:
> >Synopsis:    reorder_kernel requires writable /usr/share
> >Category:    system
> >Environment:
>       System      : OpenBSD 6.1
>       Details     : OpenBSD 6.1-current (GENERIC.MP) #73: Sat Jul  1 10:53:54 
> MDT 2017
>                        
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> 
>       Architecture: OpenBSD.amd64
>       Machine     : amd64
> >Description:
>       /etc/rc: reorder_kernel() requires /usr/share to be writeable
> >How-To-Repeat:
>       On a system w/ a separate read-only partition containing /usr/share,
>       restart and observe:
>       > cat /var/log/kernel_relink.log
> sh makegap.sh 0xcccccccc
> makegap.sh[69]: cannot create gap.link: Read-only file system
> ld: cannot open output file gap.o: Read-only file system
> *** Error 1 in /usr/share/compile/GENERIC.MP (Makefile:966 'gap.o')
> 
> >Fix:
>       In _reorder_libs() a similar read-only problem was resolved.
>       I used that as the basis for the appended patch:

revision 1.506
date: 2017/06/30 17:06:03;  author: rpe;  state: Exp;  lines: +24 -18;  
commitid: sUDtacXshDGSqeZm;
Improve reorder_kernel()

- check for and exit if /usr/share is on a nfs mounted filesystem
- add trap handlers that mail the logfile to the admin user
- use $_compile instead of $_compile_dir like in the installer
- use $_compile/$_kernel instead of $_kernel_dir
- remove the now redundant sha256 -h ... after make newinstall
- write stdout/stderr of the background subshell to a logfile

OK tb@ deraadt@

Reply via email to