pkgsrc-Bugs archive

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

Re: kern/53490 (sysutils/grub2: module loaded even if feature is builtin)



The following reply was made to PR pkg/53490; it has been noted by GNATS.

From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <triaxx%NetBSD.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: pkg-manager%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, pkgsrc-bugs%netbsd.org@localhost
Subject: Re: kern/53490 (sysutils/grub2: module loaded even if feature is  builtin)
Date: Sat, 11 Aug 2018 07:10:53 +0200

 Le 2018-08-09 01:00, Paul Goyette a écrit :
 > The following reply was made to PR pkg/53490; it has been noted by 
 > GNATS.
 > 
 > From: Paul Goyette <paul%whooppee.com@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc:
 > Subject: Re: kern/53490 (sysutils/grub2: module loaded even if feature 
 > is
 >  builtin)
 > Date: Thu, 9 Aug 2018 06:56:22 +0800 (+08)
 > 
 >  This does not appear to be a problem with the kernel's module system,
 >  as detection of duplicate modules "pushed" from the bootloader already
 >  works.
 
 Nice.
 
 >  So, this is most likely a problem with grub2 itself, and probably is a
 >  result of directly trying to load a module rather than proper "push"
 >  of the module via module_prime().
 > 
 >  I still cannot get the grub2 package to build, so I'm unable to do any
 >  further debug on this.  I'll return the category to "pkg" and owner to
 >  "pkg-manager"
 
 A solution could be to inspect kernel config during grub-mkconfig 
 through helper script:
 
 $NetBSD$
 
 --- util/grub.d/10_netbsd.in.orig 2016-02-28 14:22:21.000000000 +0000
 +++ util/grub.d/10_netbsd.in
 @@ -68,8 +68,9 @@ netbsd_load_fs_module ()
 
     kversion=$(zcat -f "${kernel}" | strings | sed -n -e '/^@(#)NetBSD/ { 
 s/^@(#)NetBSD \([0-9\.]*\) .*$/\1/g ; p ; q ; }')
     kmodule="/stand/${karch}/${kversion}/modules/${kmod}/${kmod}.kmod"
 +  builtin=$(if config -x /netbsd | grep "^file-system[[:space:]]*$(echo 
 ${kmod} | tr [a-z] [A-Z])" > /dev/null 2>&1 ; then echo yes ; else echo 
 no ; fi)
 
 -  if test -z "$karch" || test -z "$kversion" || test ! -f "${kmodule}"; 
 then
 +  if test -z "$karch" || test -z "$kversion" || test ! -f "${kmodule}" 
 || test "x${builtin}" = "xyes" ; then
       return
     fi
 


Home | Main Index | Thread Index | Old Index