Re: make-ca-1.16.1 in chroot

"Xi Ruoyao" ([email protected] via blfs-dev Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.beyond.devel
Message-ID <[email protected]>
On Thu, 2025-07-17 at 20:26 -0500, Randy McMurchy wrote:
> Hello all,
> 
> My name is Randy McMurchy. I have not posted to any {b}lfs list in a 
> long time.
> Around 15 years or so, I'm guessing. So consider me a newbie and give
> me 
> some time
> to get back acquainted. I was surprised to see my name still on the
> very 
> first page
> of the BLFS book, the Foreword. Thanks Bruce.
> 
> Now to the fun part. I've built all the packages of the current LFS 
> Devel book,
> except Grub and the kernel, and much of BLFS while still in the chroot
> section of
> creating an LFS system. Install and configure both the Linux kernel
> and 
> Grub is
> still left to do before I can boot it.
> 
> As a precursor to the wget installation, I installed the make-ca 
> package. All the
> packages I've used are the ones in the current development books. The 
> make-ca -g
> command failed due to the exact message shown in the Note at the 
> beginning of the
> make-ca instructions. I was a bit confused after seeing this was an 
> issue recently
> and the newest release of make-ca fixed it.
> 
> But make-ca -g failed. Initially, I used the make-ca --name <full 
> pathname to
> the certdata.txt file> in the nss package tarball. It succeeded. I 
> emailed to Doug
> and Bruce saying I thought the make-ca package was still broken, but
> now 
> I know
> better. I am still in the chroot environment and there is no 
> /etc/resolv.conf file
> so DNS services do not work. Therefore, make-ca fails.
> 
> After creating a proper /etc/resolv.conf file, DNS was happy again and
> make-ca -g
> worked as it should.
> 
> So, the package is not broken. I have an idea which I'll share in 
> another email
> that would say something very brief about building the make-ca package
> in chroot
> (I'd bet many folks do, especially the experienced ones) and you need 
> the needed
> file in /etc. Or insuring that DNS services are working properly.
> 
> Anyway, this post is mostly noise so I promise I won't spam the list
> again.

Again the correct way is noticing this issue in LFS, because the issue
is not limited to make-ca, but also affecting all packages requiring an
Internet connection to build.

For LFS sysv it's not an issue because in LFS sysv we always create
/etc/resolv.conf in chapter 9, but for LFS systemd people who decided to
use systemd-resolved will not create it as we already have:

   When using systemd-resolved for DNS configuration, it creates the
   file /run/systemd/resolve/stub-resolv.conf. And, if /etc/resolv.conf
   does not exist, it will be created by systemd-resolved as a symlink
   to /run/systemd/resolve/stub-resolv.conf. So it's unnecessary to
   create a /etc/resolv.conf manually.
   
We can add something like

   If you are building some BLFS (or beyond BLFS) package of which the
   build process requires an Internet connection in the LFS chroot
   environment, you need to create /etc/resolv.conf as systemd-resolved
   cannot run in a chroot environment.  Then remove it before exiting from
   the chroot environment so systemd-resolved will create it as the symlink
   on the boot.

-- 
Xi Ruoyao <[email protected]>

-- 
http://lists.linuxfromscratch.org/sympa/info/blfs-dev
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.