diff --git a/README.md b/README.md index 698a22b..459d6c4 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ https://www.tundraware.com/TechnicalNotes/Divorce-Your-Linux-Admin + ## How To Use The Makefile This `makefile` handles both the bootstrapping and then the full release of @@ -21,6 +22,7 @@ working on debian or Ubuntu systems. You'll have to update the file if you use `apt-get` package management. + ## Release Versioning Both the bootstrap and full build process create tarballs *and rename @@ -45,6 +47,7 @@ to perform a full build. DAMHIKT. + ## Building The Bootstrap Image 1. Log into your build machine, VM, or`docker`image. @@ -59,25 +62,25 @@ bootstrapping processs, you also initally need some additional perl module support. On CentOS7: - `sudo yum -y groupinstall "Development Tools"` + sudo yum -y groupinstall "Development Tools" - `sudo yum -y install perl-Module-Load-Conditional perl-core` + sudo yum -y install perl-Module-Load-Conditional perl-core 4. Get the linuxbrew image: - `make getbrew` + make getbrew 5. Build the bootstrap image: - `make bootstrap-build` + make bootstrap-build 6. Build a release tarball and export it: - `make bootstrap-release` + make bootstrap-release 7. Cleanup: - `make clean` + make clean ## Building The Full Tools Set @@ -93,11 +96,11 @@ Recall that this was saved with a date revision stamp. So, before proceeding, we have to: - `cd ${INSTALLDIR} && mv -v ${TOOLS}-YYYYMMDD ${TOOLS}` + cd ${INSTALLDIR} && mv -v ${TOOLS}-YYYYMMDD ${TOOLS} 3. Setup the required environment variables: - `. brewenv` + . brewenv 4. Make sure `${MYTOOLS}` and `${PIPMODULES}` include all the packages you want. @@ -105,15 +108,15 @@ 5. Build the full tool set using the bootstrapped compiler we just built: - `make full-build` + make full-build 6. Export it for installation elsewhere: - `make full-release` + make full-release 7. Cleanup: - `make clean` + make clean ## Installing The Tools @@ -128,7 +131,7 @@ libraries and other dependencies. So, if we built the tools under: - `/opt/mydir/tools` + /opt/mydir/tools Every installation on other machines must also install them there (and be added to `$(PATH}` as described in `brewenv`). @@ -136,7 +139,7 @@ Recall that this procedure actually creates the tools directory as: - `/opt/mydir/tools-YYYYMMDD`. + /opt/mydir/tools-YYYYMMDD In this example, you could either symlink `tools` to that directory or just rename the directory accordingly. @@ -149,6 +152,7 @@ OS that is substantially the same as your targets.* Again, `docker` is your friend here. + ## The `brewenv` File The `brewenv` file documents the environment variables that need to be @@ -158,3 +162,32 @@ Just be sure to edit it and change `TOOLSDIR="/opt/TundraWare/tools"` to wherever your tools installation actually lives. + + +# Do I Have To Do This Every Time I Want Newer Tools? + +No! Once you have running installation, you can use `brew` itself to +do upgrades. + +But beware, dragons therein lie (sometimes). When you do this, you +will only be updating the tools that `brew` knows have changed since +you did the last build (or update). That's fine for the major things. +But `brew` doesn't usually know about the `python` modules you've +installed or custom `perl` modules using `cpan`. It's therefore +possible to get weird version incompatibilities when an interpreter +gets upgraded. + +It is therefore recommended that you not do manual upgrading yourself, +but do this instead: + + make upgrade + +This will both upgrade any relevant `brew` components, and also +upgrade the `python` modules it initially installed itself. Obviously, +it cannot catch things you've installed yourself thereafter. You can +just add your own component upgrade commands to that same `makefile` +stanza. + +Even so, you should periodically do a complete rebuild from the very +beginning as outlined above. This will help minimize the accrued +bitrot from incremental upgrades. diff --git a/makefile b/makefile index 3758418..95a3f42 100644 --- a/makefile +++ b/makefile @@ -69,6 +69,11 @@ cd ${INSTALLDIR} && tar -czvf ${EXPORTDIR}/${TOOLS}-${DATESTAMP}.tar.gz ${TOOLS}-${DATESTAMP} cd ${INSTALLDIR} && mv -v ${TOOLS}-${DATESTAMP} ${TOOLS} +upgrade: + brew update + brew upgrade + pip install ${PIPMODULES} -U --ignore-installed + # Housekeeping