force source code builds for most tools, document library compatibility issues
1 parent 6ac317a commit cc7f2b38c299a94e0b83a2249979102ee1c99590
@tundra tundra authored on 22 Dec 2020
Showing 2 changed files
View
21
README.md
https://www.tundraware.com/TechnicalNotes/Divorce-Your-Linux-Admin
 
 
## How To Use The Makefile
 
NOTE: As of 12-20-2020 there is a new `make` target called `insecure`.
If you see a problem with `git clone` failing during builds, run `make
insecure` and this should fix it. This is caused by some problem with
how `openssl@1.1` finds its certs.
 
This "fix" works by telling both `curl` and `git` to ignore
certificate validation of https. So ... DON'T do this on a
production environment. It's really there for building inside containers
to produce release tarballs.
 
This `makefile` handles both the bootstrapping and then the full release of
a custom linuxbrew based toolset, installed at any location you wish
(so long as you have write permission there).
versions. That's because the bootstrap phase makes use of native
OS header files that are kernel-dependent. If, say, you try to
build this on a CentOS 7 instance, but then attempt to deploy to
CentOS 5, expect problems. *Always build your deploy image on an
OS that is substantially the same as your targets.* Again,
OS that is substantially the same as your targets.* Again,
`docker` is your friend here.
 
3. In general, you will get into trouble if you try to build the
tools on an OS whose libraries are newer than the target
machines'. The binaries you build will not be able to find these
newer libraries on the target machines and will fail. So, if you
cannot match your targets exactly, build for the same machine
architecture, but do it on an *older* revision of the OS. The
newer targets usually have backward compatibility with the older
libraries referenced and the tools should run fine.
 
 
## The `brewenv` File
 
View
12
makefile
# Name of the tools directory
TOOLS = tools
 
# Things that have to be built during the bootstrap phase with system tools
BOOTSTRAP = gcc make curl git
BOOTSTRAP = gcc make
 
# Languages to install after bootstrap but before other packages
LANGS = go perl python
# Support and languages to install after bootstrap but before other packages
LANGS = curl git go perl python
 
# Stuff we want pip to install
PIPMODULES = pip ansible pew pythonz-bd
 
 
full-build:
@echo "Make sure the bootstrap is installed at ${TOOLSDIR}"
sudo yum -y install autoconf automake patch perl texinfo
${BREW} install --verbose ${LANGS}
${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
pip install ${PIPMODULES} -U --ignore-installed
${BREW} install --verbose ${MYTOOLS}
${BREW} install -s --verbose ${MYTOOLS}
ln -nfs ${TOOLSDIR}/bin/vim ${TOOLSDIR}/bin/vi
 
full-release: tidyup
echo "${FULLDATE}" > ${TOOLSDIR}/tools-builder.full.datetime