Re: interesting cross-install failure

看板DFBSD_kernel作者時間21年前 (2004/10/27 17:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
On Tue, Oct 26, 2004 at 09:45:18PM -0700, David Frech wrote: > Also, when I tried to installkernel, it complained that I was missing parts > of the directory hierarchy - most of it in fact! So I decided to do > installworld first, thinking it would probably create the missing dirs. Yeah, installkernel fails miserably trying to install something other than /kernel and /modules(actually /modules will be a flat file rather than a directory full of kernel modules!) if you specified an empty directory as $DESTDIR. I remember I wrote a patch to move the installation of a manpage and a few scripts out of installkernel target(need a rework). > Doing that I discovered a subtle issue with the install _program_. It > _implicitly_ refers to the "host" machine's /etc/master.passwd and > /etc/group, and there is no way to override this, and since installworld > uses symbolic rather than numeric uid's and gid's, and since DragonFly > introduces a few new uid's and gid's (compared to FBSD 4.10), install > complains, and installworld fails. > I tried using chroot, but figure out a way to make it work. > > My interim simple solution was to add the necessary id's to > /etc/master.passwd and /etc/group. Doing that, the installworld and > installkernel were successful. I wrote a simple bourne-shell script http://les.ath.cx/DragonFly/pwmerge.sh to add missing entries from /usr/src/etc/{master.passwd,group} into ${DESTDIR}/etc using pw(8) and run pwd_mkdb afterwards. It probably need more sanity checks (e.g. refuse to proceed if it found corrupted entries, or if a predefined uid/gid is already used in $DESTDIR/etc) and rewrite(using pw is probably a bit too far). After running this script in the earlier stage of installworld, you can point the updated password file via install -L $DESTDIR/etc ...
文章代碼(AID): #11VsiL00 (DFBSD_kernel)
文章代碼(AID): #11VsiL00 (DFBSD_kernel)