diff --git a/README.md b/README.md index c736aa9..6620aa8 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,12 @@ # Build Standard Tools This is automation support for the linuxbrew-based tools procedure -documented at: +documented at +[Divorce Your Linux Admin](https://www.tundraware.com/TechnicalNotes/Divorce-Your-Linux-Admin). - https://www.tundraware.com/TechnicalNotes/Divorce-Your-Linux-Admin +This document is a bit outdated as it does not describe the simplified +build noted below, but the document does describe the overall idea +of what we're trying to accomplish. ## How To Use The Makefile @@ -47,6 +50,36 @@ to perform a full build. DAMHIKT. +## Building The Tools - The Simple Way + +When this process was first defined, we split the build into two +steps. First, we did a "bootstrap" on a machine with a full set of +local development tools and saved the result. Then, we loaded that +minimal `brew` image onto a machine with no local compiler to finish +building the toolset. + +After running this a bunch of times on a variety of VMs and +containers, we discovered that this two-step process is unnecessary, +and may even make it harder for the process to complete. + +That process is still described in the following sections but the +easier - and more likely to succeed - way to do this is to do +everything on a single machine that has system compilers and languages +installed: + + . brewenvs + make getbrew bootstrap-build bootstrap-release full-build full-release clean + +Notice that we still save off a small boostrap tarball. Why? There +may be times when you want to start with a "minimal" `brew` +installation for other work. This process preserves both that minimal- +and then, the full toolset you've defined as separate installable +tarballs + +Take care to read the note below to ensure that your build environment +is the "right" one to build binaries that will work when deployed on +your running systems. + ## Building The Bootstrap Image diff --git a/makefile b/makefile index bc5a1f6..2e11c4b 100644 --- a/makefile +++ b/makefile @@ -15,10 +15,10 @@ TOOLS = tools # Things that have to be built during the bootstrap phase with system tools -BOOTSTRAP = gcc make +BOOTSTRAP = gcc make curl git # Support and languages to install after bootstrap but before other packages -LANGS = curl git go perl python +LANGS = go perl python # Stuff we want pip to install PIPMODULES = pip ansible pew pythonz-bd @@ -48,6 +48,8 @@ @echo "Make sure you have the OS development tools installed!" sudo yum -y install texinfo ${BREW} install --verbose ${BOOTSTRAP} +# ${BREW} reinstall -s --verbose curl + bootstrap-release: tidyup echo "${FULLDATE}" > ${TOOLSDIR}/tools-builder.bootstrap.datetime @@ -63,7 +65,6 @@ @echo "Make sure the bootstrap is installed at ${TOOLSDIR}" sudo yum -y install autoconf automake patch perl texinfo ${BREW} install -s --verbose ${LANGS} -# ${BREW} reinstall -s --verbose curl ${BREW} link --verbose python ln -nfs ${TOOLSDIR}/bin/python3 ${TOOLSDIR}/bin/python ln -nfs ${TOOLSDIR}/bin/pip3 ${TOOLSDIR}/bin/pip