On 10/2/20 8:46 AM, John Burrell via lfs-dev wrote:
If you use a script(s) to install LFS (majority here?) you might
consider it best to download the sources through the scripts rather
than storing them all up front before running the scripts. I've been
playing with this and found that it is straightforward to do. What I
did:

You need to install wget at the end of Ch 6. This requires openssl to
be installed first.

The commands for openssl are:

./config --prefix=/usr         \
          --openssldir=/etc/ssl \
          --libdir=lib          \
          shared

make

sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile
make DESTDIR=$LFS MANSUFFIX=ssl install

I don't know if all these are strictly necessary, but these are what I
used, based on what is in Ch 8.

I added these as 058-openssl at the end of lfs-commands/chapter06,
after gcc-pass2.

The commands for wget are:

PKG_CONFIG_PATH=$LFS/usr/lib/pkgconfig \
                 ./configure --prefix=/usr \
                 --with-ssl=openssl \
                 --host=$LFS_TGT \
                 --build=$(build-aux/config.guess)

make

make DESTDIR=$LFS install

These were added as 059-wget in chapter06. I needed PKG_CONFIG_PATH in
order for wget to find openssl.

Notice that openssl doesn't have a config.guess script but this didn't
stop it compiling.

Once wget is installed all you need is /etc/resolv.conf, specifying
the nameserver, to connect to the web in Ch 7 and 8. Easy?

There are no certificates installed but sites like Perl need
--no-check-certificate to download.

So it's a fairly painless solution to get your scripts to download the
sources at install time when you're in chroot. Of course, where a
source file is needed more than once, gcc, binutils and some in Ch 8,
you don't need to download them again.

Downsides?

Seems pretty complicated for a first time user. An experienced user knows that many of the packages do not change often and they would already have those unchanged packages.

Also it is easier to just use the wget-list at http://www.linuxfromscratch.org/lfs/downloads/development/ (or the stable version) and get everything right up front in chapter 3.

For stable versions of LFS the user can download all packages in one tarball at ftp://ftp.osuosl.org/pub/lfs/lfs-packages/

Another alternative is to use jhalfs which has the option of downloading sources for you.

That said, if you want to roll your own methods, that's fine.

  -- Bruce

--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to