Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 342d9894f5 | |||
| 4403901d8f | |||
| fc0a1ec94a | |||
| eca04c2140 | |||
| 6c4634a11d | |||
| 7fb7871daf | |||
| 43cd3ab4b9 | |||
| ef664d39b9 | |||
| 411a544d4b | |||
| 7fb6e77c32 | |||
| 0153d38a33 | |||
| 52cb0ea321 | |||
| 67aba34ed1 | |||
| b4d619f2f9 | |||
| 3d5e724bd5 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -24,7 +24,7 @@
|
|||||||
/logs
|
/logs
|
||||||
*.swp
|
*.swp
|
||||||
*.lck
|
*.lck
|
||||||
#src/ipxe/src/
|
/extrasrc
|
||||||
|
|
||||||
# You should really generate local copies of these, as they're pretty private.
|
# You should really generate local copies of these, as they're pretty private.
|
||||||
extra/pre-build.d/etc/openvpn/client.conf
|
extra/pre-build.d/etc/openvpn/client.conf
|
||||||
|
|||||||
10
TODO
10
TODO
@@ -15,6 +15,9 @@
|
|||||||
-autodetection/configuration of network. DHCP is currently running by default, but does it need to support IPv6? if so, how would the user configure their network?
|
-autodetection/configuration of network. DHCP is currently running by default, but does it need to support IPv6? if so, how would the user configure their network?
|
||||||
-SECURE SSH: https://stribika.github.io/2015/01/04/secure-secure-shell.html
|
-SECURE SSH: https://stribika.github.io/2015/01/04/secure-secure-shell.html
|
||||||
-DISABLE NETWORKMANAGER AND "fi.w1.wpa_supplicant1"??? keeps spawning wpa_supplicant (and thusly killing networking proper)
|
-DISABLE NETWORKMANAGER AND "fi.w1.wpa_supplicant1"??? keeps spawning wpa_supplicant (and thusly killing networking proper)
|
||||||
|
-for netboot, custom user agent (should be defined by build.conf)
|
||||||
|
--iPXE's curl
|
||||||
|
--initrd's curl
|
||||||
|
|
||||||
|
|
||||||
## Building ##
|
## Building ##
|
||||||
@@ -31,12 +34,13 @@
|
|||||||
--http://ipxe.org/crypto
|
--http://ipxe.org/crypto
|
||||||
--http://ipxe.org/cmd/imgtrust
|
--http://ipxe.org/cmd/imgtrust
|
||||||
--http://ipxe.org/cmd/imgverify
|
--http://ipxe.org/cmd/imgverify
|
||||||
--https://aur.archlinux.org/packages/ip/ipxe-git/PKGBUILD (NOTE the patches- banner and efi iso specifically)
|
--enable use of custom CA/self-signed certs for HTTPS etc.
|
||||||
--add conf option to specify EMBED uri
|
|
||||||
-X-platform
|
-X-platform
|
||||||
--what distros are supported?
|
--what distros are supported?
|
||||||
--automatically install what we need for buildtime
|
--automatically install what we need for buildtime
|
||||||
--hardcode list of runtime dependencies (e.g. openssh, vim, etc.)
|
---need to finish pkg lists and then test, but meta files should be done as well as lib script
|
||||||
|
--hardcode list of runtime (e.g. live media) dependencies (e.g. openssh, vim, etc.)
|
||||||
|
--...and create separate list for after-the-fact e.g. goodies
|
||||||
|
|
||||||
## Split into Separate Tools CD ##
|
## Split into Separate Tools CD ##
|
||||||
|
|
||||||
|
|||||||
45
bin/build.sh
45
bin/build.sh
@@ -7,6 +7,8 @@
|
|||||||
#DEBUG
|
#DEBUG
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
|
echo "Starting at $(date)..."
|
||||||
|
|
||||||
## Import settings
|
## Import settings
|
||||||
if [ -f "build.conf" ];
|
if [ -f "build.conf" ];
|
||||||
then
|
then
|
||||||
@@ -72,6 +74,8 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
source ${BASEDIR}/lib/00-depcheck.func.sh
|
||||||
|
|
||||||
if [ ! -f "./BUILDNO" ];
|
if [ ! -f "./BUILDNO" ];
|
||||||
then
|
then
|
||||||
echo '0' > ./BUILDNO
|
echo '0' > ./BUILDNO
|
||||||
@@ -86,7 +90,7 @@ BUILD="$(cat BUILDNO)"
|
|||||||
BUILD="$(expr ${BUILD} + 1)"
|
BUILD="$(expr ${BUILD} + 1)"
|
||||||
echo ${BUILD} > ./BUILDNO
|
echo ${BUILD} > ./BUILDNO
|
||||||
BUILDTIME="$(date)"
|
BUILDTIME="$(date)"
|
||||||
BUILD_MACHINE="$(hostname -f)"
|
BUILD_MACHINE="$(hostname -f) (${HOST_DIST})"
|
||||||
#BUILD_USERNAME="${SUDO_USER}"
|
#BUILD_USERNAME="${SUDO_USER}"
|
||||||
#BUILD_USERNAME="$(who am i | awk '{print $1}')"
|
#BUILD_USERNAME="$(who am i | awk '{print $1}')"
|
||||||
set +e ; logname > /dev/null 2>&1
|
set +e ; logname > /dev/null 2>&1
|
||||||
@@ -99,7 +103,7 @@ fi
|
|||||||
set -e
|
set -e
|
||||||
USERNAME_REAL="$(grep ${BUILD_USERNAME} /etc/passwd | cut -f5 -d':')"
|
USERNAME_REAL="$(grep ${BUILD_USERNAME} /etc/passwd | cut -f5 -d':')"
|
||||||
|
|
||||||
cat > VERSION_INFO.txt << EOF
|
cat > ${BASEDIR}/VERSION_INFO.txt << EOF
|
||||||
Version: ${VERSION}
|
Version: ${VERSION}
|
||||||
Build: ${BUILD}
|
Build: ${BUILD}
|
||||||
Time: ${BUILDTIME}
|
Time: ${BUILDTIME}
|
||||||
@@ -109,17 +113,18 @@ EOF
|
|||||||
|
|
||||||
## FUNCTIONS ##
|
## FUNCTIONS ##
|
||||||
|
|
||||||
source lib/02-im_batman.func.sh
|
#source ${BASEDIR}/lib/00-depcheck.func.sh ## this should be called like, VERYYYY first thing, right after sanity/safety checks and such.
|
||||||
source lib/03-holla_atcha_boi.func.sh
|
source ${BASEDIR}/lib/01-mk.chroot.func.sh ## this is called automatically and only if no chroot exists
|
||||||
source lib/04-release_me.func.sh
|
source ${BASEDIR}/lib/02-holla_atcha_boi.func.sh
|
||||||
source lib/05-facehugger.func.sh
|
source ${BASEDIR}/lib/03-release_me.func.sh
|
||||||
source lib/06-chroot_wrapper.func.sh
|
source ${BASEDIR}/lib/04-facehugger.func.sh
|
||||||
source lib/07-jenny_craig.func.sh
|
source ${BASEDIR}/lib/05-chroot_wrapper.func.sh
|
||||||
source lib/08-centos_is_stupid.func.sh
|
source ${BASEDIR}/lib/06-jenny_craig.func.sh
|
||||||
source lib/09-will_it_blend.func.sh
|
source ${BASEDIR}/lib/07-centos_is_stupid.func.sh
|
||||||
source lib/10-stuffy.func.sh
|
source ${BASEDIR}/lib/08-will_it_blend.func.sh
|
||||||
source lib/11-yo_dj.func.sh
|
source ${BASEDIR}/lib/09-stuffy.func.sh
|
||||||
source lib/12-mentos.func.sh
|
source ${BASEDIR}/lib/10-yo_dj.func.sh
|
||||||
|
source ${BASEDIR}/lib/11-mentos.func.sh
|
||||||
|
|
||||||
## The Business-End(TM) ##
|
## The Business-End(TM) ##
|
||||||
|
|
||||||
@@ -132,16 +137,6 @@ release_me 64 > /dev/null 2>&1
|
|||||||
release_me 32 > /dev/null 2>&1
|
release_me 32 > /dev/null 2>&1
|
||||||
|
|
||||||
# do we need to perform any updates?
|
# do we need to perform any updates?
|
||||||
if [[ -f "${CHROOTDIR}root.x86_64/root/chroot" || -f "${CHROOTDIR}root.i686/root/chroot" ]];
|
|
||||||
then
|
|
||||||
chroot_wrapper 64
|
|
||||||
chroot_wrapper 32
|
|
||||||
centos_is_stupid
|
|
||||||
will_it_blend 64
|
|
||||||
will_it_blend 32
|
|
||||||
yo_dj
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${1} == "update" ]];
|
if [[ ${1} == "update" ]];
|
||||||
then
|
then
|
||||||
mentos
|
mentos
|
||||||
@@ -161,7 +156,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# or are we just building?
|
# or are we just building?
|
||||||
if [[ ${1} == "build" ]] || [ -z ${1} ] || [[ ${1} == "all" ]];
|
if [[ ${1} == "build" || -z ${1} || ${1} == "all" ]];
|
||||||
then
|
then
|
||||||
if [[ "${MULTIARCH}" == "y" ]];
|
if [[ "${MULTIARCH}" == "y" ]];
|
||||||
then
|
then
|
||||||
@@ -194,4 +189,4 @@ fi
|
|||||||
|
|
||||||
# yay! we're done!
|
# yay! we're done!
|
||||||
rm -f ${LOCKFILE}
|
rm -f ${LOCKFILE}
|
||||||
echo "Finished successfully!"
|
echo "Finished successfully at $(date)!"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "Started at $(date)..."
|
||||||
|
|
||||||
## Import settings
|
## Import settings
|
||||||
if [ -f "build.conf" ];
|
if [ -f "build.conf" ];
|
||||||
then
|
then
|
||||||
@@ -82,3 +84,5 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
rm -f ${LOCKFILE}
|
rm -f ${LOCKFILE}
|
||||||
|
|
||||||
|
echo "Finished successfully at $(date)!"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#####################################################
|
#####################################################
|
||||||
#
|
#
|
||||||
# This file is used to define various variables/settings used by the build script.
|
# This file is used to define various variables/settings used by the build script.
|
||||||
#
|
#
|
||||||
|
|
||||||
# This should be an alpha-numeric string less than 8 characters. No spaces, etc.
|
# This should be an alpha-numeric string less than 8 characters. No spaces, etc.
|
||||||
# Used for metainfo
|
# Used for metainfo
|
||||||
@@ -61,7 +61,17 @@ MULTIARCH="yes"
|
|||||||
# set this to "yes". Otherwise, just build the full ISO.
|
# set this to "yes". Otherwise, just build the full ISO.
|
||||||
BUILDMINI="no"
|
BUILDMINI="no"
|
||||||
|
|
||||||
# set to "yes" to enable pushing new changes to a git repo/committing to a local repo
|
# What URI should iPXE's EMBED script use?
|
||||||
|
# Only used if BUILDMINI is set to yes.
|
||||||
|
# DO NOT USE A ',' (comma); instead, replace it with:
|
||||||
|
# %%COMMA%%
|
||||||
|
# If you require HTTP BASIC Authentication or HTTP Digest Authentication (untested), you can
|
||||||
|
# format it via the following:
|
||||||
|
# https://user:password@domain.tld/page.php
|
||||||
|
# This currently does not work for HTTPS with self-signed certificates.
|
||||||
|
IPXE_URI="https://bdisk.square-r00t.net"
|
||||||
|
|
||||||
|
# Set to "yes" to enable pushing new changes to a git repo/committing to a local repo
|
||||||
GIT="no"
|
GIT="no"
|
||||||
|
|
||||||
# If this is set, use rsync to copy the http and iso files. This is the rsync destination host.
|
# If this is set, use rsync to copy the http and iso files. This is the rsync destination host.
|
||||||
@@ -119,17 +129,19 @@ I_AM_A_RACECAR="no"
|
|||||||
|
|
||||||
# ________________________________________________________________________________________________
|
# ________________________________________________________________________________________________
|
||||||
## RECOMMENDED DEFALTS ##
|
## RECOMMENDED DEFALTS ##
|
||||||
# The following shoult not be changed unless you are ABSOLUTELY, 100% SURE and COMPLETELY POSITIVE
|
# The following should not be changed unless you are ABSOLUTELY, 100% SURE and COMPLETELY POSITIVE
|
||||||
# about what you are doing!!!
|
# about what you are doing!!!
|
||||||
|
|
||||||
# Legacy support.
|
# This can be used to override automatic distro-detection.
|
||||||
BASEDIR="${BASEDIR}"
|
# If you DO set this, be sure that you have a matching profile in
|
||||||
|
# ${BASEDIR}/lib/prereqs/<Distro>/meta !!
|
||||||
|
HOST_DIST=""
|
||||||
|
|
||||||
# This used to be defined statically (e.g. CHBASEDIR="${BASEDIR}/chroot"),
|
# This used to be defined statically, but is now dynamically appended. Please don't alter this
|
||||||
# but is now dynamically appended. Please don't alter this unless you renamed the chroot directory paths.
|
# unless you renamed the chroot directory paths.
|
||||||
CHROOTDIR="${BASEDIR}/"
|
CHROOTDIR="${BASEDIR}/"
|
||||||
CHROOTDIR32="${CHBASEDIR}root.i686"
|
CHROOTDIR32="${CHROOTDIR}root.i686"
|
||||||
CHROOTDIR64="${CHBASEDIR}root.x86_64"
|
CHROOTDIR64="${CHROOTDIR}root.x86_64"
|
||||||
|
|
||||||
# This is a directory we use for staging. It definitely should not be checked into git.
|
# This is a directory we use for staging. It definitely should not be checked into git.
|
||||||
# It used to be defined statically (e.g. BUILDDIR="${BASEDIR}/build"),
|
# It used to be defined statically (e.g. BUILDDIR="${BASEDIR}/build"),
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ afflib
|
|||||||
aircrack-ng
|
aircrack-ng
|
||||||
apr
|
apr
|
||||||
apr-util
|
apr-util
|
||||||
arch-install-scripts
|
|
||||||
archiso
|
|
||||||
arj
|
arj
|
||||||
asciidoc
|
asciidoc
|
||||||
atop
|
atop
|
||||||
@@ -23,7 +21,6 @@ bonnie++
|
|||||||
bozocrack-git
|
bozocrack-git
|
||||||
bridge-utils
|
bridge-utils
|
||||||
btrfs-progs
|
btrfs-progs
|
||||||
bzip2
|
|
||||||
cabextract
|
cabextract
|
||||||
cdrtools
|
cdrtools
|
||||||
cdw
|
cdw
|
||||||
@@ -35,13 +32,11 @@ ckermit
|
|||||||
clamav
|
clamav
|
||||||
cmospwd
|
cmospwd
|
||||||
colordiff
|
colordiff
|
||||||
coreutils
|
|
||||||
cowpatty
|
cowpatty
|
||||||
cpio
|
cpio
|
||||||
cpuburn
|
cpuburn
|
||||||
cpupower
|
cpupower
|
||||||
crackpkcs12
|
crackpkcs12
|
||||||
cronie
|
|
||||||
#cryptcat
|
#cryptcat
|
||||||
cryptsetup
|
cryptsetup
|
||||||
customizepkg-scripting
|
customizepkg-scripting
|
||||||
@@ -52,9 +47,6 @@ dd_rescue
|
|||||||
dd_rhelp
|
dd_rhelp
|
||||||
debianutils
|
debianutils
|
||||||
debootstrap
|
debootstrap
|
||||||
dhclient
|
|
||||||
dhcp
|
|
||||||
dhcpcd
|
|
||||||
dialog
|
dialog
|
||||||
diffutils
|
diffutils
|
||||||
djohn
|
djohn
|
||||||
@@ -63,7 +55,6 @@ dnssec-anchors
|
|||||||
dnstracer
|
dnstracer
|
||||||
#dnsutils #replaced by bind-tools, https://www.archlinux.org/packages/extra/x86_64/bind-tools/
|
#dnsutils #replaced by bind-tools, https://www.archlinux.org/packages/extra/x86_64/bind-tools/
|
||||||
dos2unix
|
dos2unix
|
||||||
dosfstools
|
|
||||||
dropbear
|
dropbear
|
||||||
dstat
|
dstat
|
||||||
dump
|
dump
|
||||||
@@ -73,8 +64,6 @@ dvd+rw-tools
|
|||||||
e2fsprogs
|
e2fsprogs
|
||||||
ecryptfs-utils
|
ecryptfs-utils
|
||||||
ed
|
ed
|
||||||
efibootmgr
|
|
||||||
efivar
|
|
||||||
elfutils
|
elfutils
|
||||||
#elilo-efi
|
#elilo-efi
|
||||||
elinks
|
elinks
|
||||||
@@ -110,7 +99,6 @@ gpm
|
|||||||
gptfdisk
|
gptfdisk
|
||||||
gst-libav
|
gst-libav
|
||||||
gst-plugins-ugly
|
gst-plugins-ugly
|
||||||
gummiboot
|
|
||||||
hashcat
|
hashcat
|
||||||
hddtemp
|
hddtemp
|
||||||
hdparm
|
hdparm
|
||||||
@@ -132,10 +120,8 @@ iozone
|
|||||||
ipcalc
|
ipcalc
|
||||||
iperf
|
iperf
|
||||||
iperf3
|
iperf3
|
||||||
iproute2
|
|
||||||
ipsec-tools
|
ipsec-tools
|
||||||
iptraf-ng
|
iptraf-ng
|
||||||
iputils
|
|
||||||
irssi
|
irssi
|
||||||
iso-codes
|
iso-codes
|
||||||
isomaster
|
isomaster
|
||||||
@@ -145,10 +131,8 @@ jfsutils
|
|||||||
john
|
john
|
||||||
keyutils
|
keyutils
|
||||||
kismet-allplugins
|
kismet-allplugins
|
||||||
libisoburn
|
|
||||||
lftp
|
lftp
|
||||||
links
|
links
|
||||||
localepurge
|
|
||||||
#logkeys
|
#logkeys
|
||||||
logkeys-keymaps
|
logkeys-keymaps
|
||||||
lm_sensors
|
lm_sensors
|
||||||
@@ -159,10 +143,7 @@ lsof
|
|||||||
lsscsi
|
lsscsi
|
||||||
lxde
|
lxde
|
||||||
lynx
|
lynx
|
||||||
lz4
|
|
||||||
#lzip
|
#lzip
|
||||||
lzo
|
|
||||||
lzop
|
|
||||||
macchanger
|
macchanger
|
||||||
magicrescue
|
magicrescue
|
||||||
mbr
|
mbr
|
||||||
@@ -175,10 +156,7 @@ megaraid-cli
|
|||||||
memtester
|
memtester
|
||||||
mfoc
|
mfoc
|
||||||
minicom
|
minicom
|
||||||
mkinitcpio-nfs-utils
|
|
||||||
ms-sys
|
|
||||||
mtd-utils
|
mtd-utils
|
||||||
mtools
|
|
||||||
mtr
|
mtr
|
||||||
mtree
|
mtree
|
||||||
#mtx
|
#mtx
|
||||||
@@ -189,11 +167,8 @@ ncftp
|
|||||||
ncompress
|
ncompress
|
||||||
ncrack
|
ncrack
|
||||||
net-snmp
|
net-snmp
|
||||||
net-tools
|
|
||||||
netctl
|
|
||||||
netselect
|
netselect
|
||||||
nettle
|
nettle
|
||||||
networkmanager
|
|
||||||
networkmanager-pptp
|
networkmanager-pptp
|
||||||
nginx-devel
|
nginx-devel
|
||||||
ngrep
|
ngrep
|
||||||
@@ -204,8 +179,6 @@ ntfsfixboot
|
|||||||
nwipe
|
nwipe
|
||||||
open-iscsi
|
open-iscsi
|
||||||
openipmi
|
openipmi
|
||||||
openssh
|
|
||||||
openvpn
|
|
||||||
ophcrack
|
ophcrack
|
||||||
os-prober
|
os-prober
|
||||||
p7zip
|
p7zip
|
||||||
@@ -233,7 +206,6 @@ procinfo-ng
|
|||||||
procps-ng
|
procps-ng
|
||||||
progsreiserfs
|
progsreiserfs
|
||||||
psmisc
|
psmisc
|
||||||
pv
|
|
||||||
pwgen
|
pwgen
|
||||||
pxz
|
pxz
|
||||||
pyrit-svn
|
pyrit-svn
|
||||||
@@ -251,7 +223,6 @@ rpcbind
|
|||||||
rpmextract
|
rpmextract
|
||||||
rp-pppoe
|
rp-pppoe
|
||||||
rsnapshot
|
rsnapshot
|
||||||
rsync
|
|
||||||
rygel
|
rygel
|
||||||
safecopy
|
safecopy
|
||||||
samba
|
samba
|
||||||
@@ -261,27 +232,20 @@ scrounge-ntfs
|
|||||||
scrub
|
scrub
|
||||||
scsiadd
|
scsiadd
|
||||||
sdparm
|
sdparm
|
||||||
sed
|
|
||||||
setserial
|
setserial
|
||||||
sg3_utils
|
sg3_utils
|
||||||
sharutils
|
sharutils
|
||||||
shorewall
|
|
||||||
sipcalc
|
sipcalc
|
||||||
sipcrack
|
sipcrack
|
||||||
smartmontools
|
smartmontools
|
||||||
smbclient
|
smbclient
|
||||||
s-nail
|
s-nail
|
||||||
socat
|
socat
|
||||||
squashfs3-tools
|
|
||||||
squashfs-tools
|
|
||||||
#star
|
#star
|
||||||
strace
|
strace
|
||||||
stress
|
stress
|
||||||
sucrack
|
sucrack
|
||||||
sudo
|
|
||||||
symlinks
|
symlinks
|
||||||
sysfsutils
|
|
||||||
syslinux
|
|
||||||
sysstat
|
sysstat
|
||||||
tcpdump
|
tcpdump
|
||||||
tcpslice
|
tcpslice
|
||||||
@@ -292,7 +256,6 @@ thin-provisioning-tools
|
|||||||
thttpd
|
thttpd
|
||||||
tmon
|
tmon
|
||||||
tmux
|
tmux
|
||||||
traceroute
|
|
||||||
tre
|
tre
|
||||||
truecrack-svn
|
truecrack-svn
|
||||||
truecrypt
|
truecrypt
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ noedit=1
|
|||||||
skipinteg=1
|
skipinteg=1
|
||||||
#skiptest=1
|
#skiptest=1
|
||||||
#warn=1
|
#warn=1
|
||||||
tmpdir=/var/tmp/apacman
|
#tmpdir=/var/tmp/apacman
|
||||||
TMPDIR=/var/tmp/apacman
|
#TMPDIR=/var/tmp/apacman
|
||||||
|
|
||||||
#
|
#
|
||||||
# CONFIGURATION
|
# CONFIGURATION
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ build() {
|
|||||||
add_runscript
|
add_runscript
|
||||||
|
|
||||||
add_binary curl
|
add_binary curl
|
||||||
|
|
||||||
|
add_full_dir /etc/ssl
|
||||||
|
add_full_dir /etc/ca-certificates
|
||||||
}
|
}
|
||||||
|
|
||||||
help() {
|
help() {
|
||||||
|
|||||||
@@ -1,3 +1,91 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# placeholder...
|
function so_check_me_out {
|
||||||
|
|
||||||
|
FUNCNAME="depcheck"
|
||||||
|
|
||||||
|
if [[ -n ${HOST_DIST} ]];
|
||||||
|
then
|
||||||
|
if [[ ! -f ${BASEDIR}/lib/prereqs/${HOST_DIST}/meta || ! -f ${BASEDIR}/lib/prereqs/${HOST_DIST}/pkgs ]];
|
||||||
|
then
|
||||||
|
echo "ERROR: You have specified ${HOST_DIST} as your host system's distro, but it is missing a meta and/or pkgs profile."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
set +e
|
||||||
|
if [[ -z "${HOST_DIST}" ]];
|
||||||
|
then
|
||||||
|
for dist_profile in $(find "${BASEDIR}"/lib/prereqs -type f -name 'meta');
|
||||||
|
do
|
||||||
|
source ${dist_profile}
|
||||||
|
if [[ "${SUPPORTED}" != "yes" ]];
|
||||||
|
then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
eval "${CHECK_METHOD}" > /dev/null 2>&1
|
||||||
|
if [[ "${?}" == "0" ]];
|
||||||
|
then
|
||||||
|
export HOST_DIST="${NAME}"
|
||||||
|
echo "Detected distro as ${HOST_DIST}."
|
||||||
|
break 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
set -e
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Sanity is important.
|
||||||
|
if [[ -z "${HOST_DIST}" ]];
|
||||||
|
then
|
||||||
|
echo "ERROR: Your distro was not found/detected, or is flagged as unsupported."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# So we've validated the distro. Here, check for packages and install if necessary. maybe use an array, but it'd be better to soft-fail if one of the packages is missing.
|
||||||
|
|
||||||
|
DISTRO_DIR="${BASEDIR}/lib/prereqs/${HOST_DIST}"
|
||||||
|
META="${DISTRO_DIR}/meta"
|
||||||
|
PKGLIST="${DISTRO_DIR}/pkgs"
|
||||||
|
|
||||||
|
# And once more, just to be safe.
|
||||||
|
source ${META}
|
||||||
|
|
||||||
|
## TWEAKS GET RUN HERE.
|
||||||
|
distro_specific_tweaks
|
||||||
|
|
||||||
|
if [[ "${PRE_RUN}" != 'none' ]];
|
||||||
|
then
|
||||||
|
echo "Now updating your local package cache..."
|
||||||
|
set +e
|
||||||
|
eval "${PRE_RUN}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
echo "ERROR: Syncing your local package cache via ${PRE_RUN} command failed."
|
||||||
|
echo "Please ensure you are connected to the Internet/have repositories configured correctly."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
while read pkgname;
|
||||||
|
do
|
||||||
|
eval "${PKG_CHK}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
echo "Installing ${pkgname}..."
|
||||||
|
eval "${PKG_MGR}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
echo "ERROR: ${pkgname} was not found to be installed and we can't install it."
|
||||||
|
echo "This usually means you aren't connected to the Internet or your package repositories"
|
||||||
|
echo "are not configured correctly. Review the list of packages in ${PKGLIST} and ensure"
|
||||||
|
echo "they are all available to be installed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done < ${PKGLIST}
|
||||||
|
|
||||||
|
set -e
|
||||||
|
rm -f "${LOCKFILE}"
|
||||||
|
}
|
||||||
|
|
||||||
|
so_check_me_out
|
||||||
|
|||||||
@@ -109,10 +109,10 @@ function mkchroot {
|
|||||||
echo "Local: ${LOCSUM32}"
|
echo "Local: ${LOCSUM32}"
|
||||||
echo "Remote: ${CKSUM32}"
|
echo "Remote: ${CKSUM32}"
|
||||||
echo "Fetching fresh copy."
|
echo "Fetching fresh copy."
|
||||||
curl -o latest.32.tar.gz "${RLSDIR}/${CURRLS32}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
curl -o latest.32.tar.gz "${RLSDIR}/${CURRLS32}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
curl -o latest.32.tar.gz "${RLSDIR}/${CURRLS32}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
curl -o latest.32.tar.gz "${RLSDIR}/${CURRLS32}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "${CHROOTDIR32}/etc/pacman.d/gnupg/trustdb.gpg" ] || [ ! -f "${CHROOTDIR64}/etc/pacman.d/gnupg/trustdb.gpg" ];
|
if [ ! -f "${CHROOTDIR32}/etc/pacman.d/gnupg/trustdb.gpg" ] || [ ! -f "${CHROOTDIR64}/etc/pacman.d/gnupg/trustdb.gpg" ];
|
||||||
@@ -147,6 +147,7 @@ HOME_URL="https://www.archlinux.org/"
|
|||||||
SUPPORT_URL="https://bbs.archlinux.org/"
|
SUPPORT_URL="https://bbs.archlinux.org/"
|
||||||
BUG_REPORT_URL="https://bugs.archlinux.org/"
|
BUG_REPORT_URL="https://bugs.archlinux.org/"
|
||||||
EOF
|
EOF
|
||||||
|
cp ${BASEDIR}/VERSION_INFO.txt ${BASEDIR}/root.${i}/.
|
||||||
done
|
done
|
||||||
|
|
||||||
# And make it usable.
|
# And make it usable.
|
||||||
@@ -212,10 +213,42 @@ EOF
|
|||||||
sed -i -e "/^[[:space:]]*#*MAKEFLAGS=.*$/aMAKEFLAGS=\"-j${CPUCNT}\"" ${CHROOTDIR32}/etc/makepkg.conf
|
sed -i -e "/^[[:space:]]*#*MAKEFLAGS=.*$/aMAKEFLAGS=\"-j${CPUCNT}\"" ${CHROOTDIR32}/etc/makepkg.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Baseline packages
|
||||||
|
echo "Installing baseline packages..."
|
||||||
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/lib/prereqs/iso.pkgs.lst | tr '\n' ' ')
|
||||||
|
for i in ${CHROOTDIR32} ${CHROOTDIR64};
|
||||||
|
do
|
||||||
|
set +e
|
||||||
|
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
||||||
|
set -e
|
||||||
|
${CHROOTCMD} ${i}/ bash -c "yes '' | apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
set +e
|
||||||
|
for x in $(find ${i}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%%.pacorig} ; done
|
||||||
|
set -e
|
||||||
|
done
|
||||||
|
# 32-bit
|
||||||
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/lib/prereqs/iso.pkgs.lst.32 | tr '\n' ' ')
|
||||||
|
if [ -n "${PKGLIST}" ];
|
||||||
|
then
|
||||||
|
${CHROOTCMD} ${CHROOTDIR32}/ /usr/bin/bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
fi
|
||||||
|
set +e
|
||||||
|
for x in $(find ${CHROOTDIR32}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
||||||
|
set -e
|
||||||
|
# 64-bit
|
||||||
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/lib/prereqs/iso.pkgs.lst.64 | tr '\n' ' ')
|
||||||
|
if [ -n "${PKGLIST}" ];
|
||||||
|
then
|
||||||
|
${CHROOTCMD} ${CHROOTDIR64}/ /usr/bin/bash -c "apacman --noconfirm --noedit --skipinteg -S --needed ${PKGLIST}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
fi
|
||||||
|
set +e
|
||||||
|
for x in $(find ${CHROOTDIR64}/etc/ -type f -iname "*.pacorig");do mv -f ${x} ${x%.pacorig} ; done
|
||||||
|
set -e
|
||||||
|
|
||||||
# preprocessing
|
# preprocessing
|
||||||
sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.*
|
sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.*
|
||||||
# both
|
# both
|
||||||
echo "Installing common packages..."
|
echo "Installing extra common packages..."
|
||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.both | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.both | tr '\n' ' ')
|
||||||
for i in ${CHROOTDIR32} ${CHROOTDIR64};
|
for i in ${CHROOTDIR32} ${CHROOTDIR64};
|
||||||
do
|
do
|
||||||
@@ -278,7 +311,7 @@ EOF
|
|||||||
done
|
done
|
||||||
|
|
||||||
# 32-bit
|
# 32-bit
|
||||||
echo "Installing packages for 32-bit..."
|
echo "Installing extra packages for 32-bit..."
|
||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.32 | tr '\n' ' ')
|
||||||
if [ -n "${PKGLIST}" ];
|
if [ -n "${PKGLIST}" ];
|
||||||
then
|
then
|
||||||
@@ -290,7 +323,7 @@ EOF
|
|||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
# 64-bit
|
# 64-bit
|
||||||
echo "Installing packages for 64-bit..."
|
echo "Installing estra packages for 64-bit..."
|
||||||
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ')
|
PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' ${BASEDIR}/extra/packages.64 | tr '\n' ' ')
|
||||||
if [ -n "${PKGLIST}" ];
|
if [ -n "${PKGLIST}" ];
|
||||||
then
|
then
|
||||||
@@ -332,4 +365,7 @@ EOF
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mkchroot
|
if [[ ! -f "${BASEDIR}/root.x86_64/VERSION_INFO.txt" && ! -f "${BASEDIR}/root.x86_64/VERSION_INFO.txt" ]];
|
||||||
|
then
|
||||||
|
mkchroot
|
||||||
|
fi
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
function holla_atcha_boi {
|
function holla_atcha_boi {
|
||||||
|
|
||||||
|
FUNCNAME="holla_atcha_boi"
|
||||||
|
|
||||||
if [[ "${I_AM_A_RACECAR}" == "y" ]];
|
if [[ "${I_AM_A_RACECAR}" == "y" ]];
|
||||||
then
|
then
|
||||||
RACECAR_CHK='nice -n -19 '
|
RACECAR_CHK='nice -n -19 '
|
||||||
@@ -7,6 +9,7 @@ function holla_atcha_boi {
|
|||||||
RACECAR_CHK=""
|
RACECAR_CHK=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
so_check_me_out
|
||||||
|
|
||||||
# Do we have an existing chroot set up yet? If not, create.
|
# Do we have an existing chroot set up yet? If not, create.
|
||||||
if [[ ! -d "root.x86_64/root" || ! -d "root.i686/root" ]];
|
if [[ ! -d "root.x86_64/root" || ! -d "root.i686/root" ]];
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
function im_batman {
|
|
||||||
set +e # false errors are bad mmk
|
|
||||||
# Detect the distro and set some vars
|
|
||||||
if [ -f "/usr/bin/yum" ]; # CentOS/Redhat, etc.
|
|
||||||
then
|
|
||||||
OS_STRING='RHEL-like'
|
|
||||||
DISTRO='RHEL'
|
|
||||||
INST_CMD='yum -y install '
|
|
||||||
elif [ -f "/usr/bin/pacman" ]; # Arch, Manjaro, etc.
|
|
||||||
then
|
|
||||||
OS_STRING='Arch-like'
|
|
||||||
DISTRO='Arch'
|
|
||||||
INST_CMD='pacman -S '
|
|
||||||
elif [ -f "/usr/bin/emerge" ]; # Gentoo
|
|
||||||
then
|
|
||||||
OS_STRING='Gentoo-like'
|
|
||||||
DISTRO='Gentoo'
|
|
||||||
INST_CMD='emerge '
|
|
||||||
elif [ -f "/usr/bin/apt-get" ]; # Debian, Ubuntu (and derivatives), etc.
|
|
||||||
then
|
|
||||||
OS_STRING='Debian-like'
|
|
||||||
DISTRO="Debian"
|
|
||||||
INST_CMD='apt-get install '
|
|
||||||
else
|
|
||||||
echo 'Sorry, I cannot detect which distro you are running. Please report this along with what distro you are running. Dying now.'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -e # and turn this back on lolz
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
function release_me () {
|
function release_me () {
|
||||||
|
|
||||||
|
FUNCNAME="release_me"
|
||||||
|
|
||||||
## check for mountpoints from a manual chroot and umount them if they're still mounted.
|
## check for mountpoints from a manual chroot and umount them if they're still mounted.
|
||||||
## NOTE: you can use findmnt(8) to view a tree of mountpoints, including bindmounts etc.
|
## NOTE: you can use findmnt(8) to view a tree of mountpoints, including bindmounts etc.
|
||||||
# Is there an active chroot?
|
# Is there an active chroot?
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
function facehugger () {
|
function facehugger () {
|
||||||
|
|
||||||
|
FUNCNAME="facehugger"
|
||||||
|
|
||||||
local ARCHSUFFIX="${1}"
|
local ARCHSUFFIX="${1}"
|
||||||
if [[ "${1}" == "64" ]];
|
if [[ "${1}" == "64" ]];
|
||||||
then
|
then
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
function chroot_wrapper () {
|
function chroot_wrapper () {
|
||||||
|
|
||||||
|
FUNCNAME="chroot_wrapper"
|
||||||
|
|
||||||
local ARCHSUFFIX="${1}"
|
local ARCHSUFFIX="${1}"
|
||||||
if [[ "${1}" == "64" ]];
|
if [[ "${1}" == "64" ]];
|
||||||
then
|
then
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
function jenny_craig () {
|
function jenny_craig () {
|
||||||
|
|
||||||
|
FUNCNAME="jenny_craig"
|
||||||
|
|
||||||
BUILDDIR="${BUILDDIR_GLOB}"
|
BUILDDIR="${BUILDDIR_GLOB}"
|
||||||
if [[ "${1}" == "64" ]];
|
if [[ "${1}" == "64" ]];
|
||||||
then
|
then
|
||||||
98
lib/07-centos_is_stupid.func.sh
Normal file
98
lib/07-centos_is_stupid.func.sh
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
function centos_is_stupid {
|
||||||
|
|
||||||
|
FUNCNAME="centos_is_stupid"
|
||||||
|
|
||||||
|
if [[ "${HOST_DIST}" == "CentOS" || "${HOST_DIST}" == "RHEL" ]];
|
||||||
|
then
|
||||||
|
rpm -qa | egrep -q "^xorriso-[0-9]"
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
# Download/install the proper xorriso
|
||||||
|
EL_VER="$(rpm -qa coreutils | sed -re 's/^coreutils-[0-9.-]*el([0-9])*.*$/\1/g')"
|
||||||
|
if (("${EL_VER}" < "7"));
|
||||||
|
then
|
||||||
|
echo "Wow. Your CentOS/RHEL is too old. Sorry; this is only supported on CentOS/RHEL 7 and up."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
XORRISO_RPM=$(curl -s http://pkgs.repoforge.org/xorriso/ | egrep "\"xorriso-[0-9.-]*el${EL_VER}.rf.x86_64.rpm\"" | sed -re "s/^.*\"(xorriso[0-9.-]*el${EL_VER}.rf.x86_64.rpm).*$/\1/g")
|
||||||
|
echo "Since you're using either CentOS or RHEL, we need to install xorriso directly from an RPM. Please wait while we do this..."
|
||||||
|
curl -sLo /tmp/${XORRISO_RPM} http://pkgs.repoforge.org/xorriso/${XORRISO_RPM}
|
||||||
|
yum -y install /tmp/${XORRISO_RPM} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
echo "Done."
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
# We used to fetch and compile mksquashfs from source here, but no longer- because a new enough version is *finally* in CentOS repos as of CentOS 7.
|
||||||
|
# This also lets us cut out the crufty version check and replace it with the one above.
|
||||||
|
fi
|
||||||
|
|
||||||
|
# UGH. And you know what? Fuck SUSE too.
|
||||||
|
if [[ "${HOST_DIST}" == "openSUSE" || "${HOST_DIST}" == "SUSE" ]];
|
||||||
|
then
|
||||||
|
rpm -qa | egrep -q "^xorriso-[0-9]"
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
# Download/install the proper xorriso
|
||||||
|
source /etc/os-release
|
||||||
|
SUSE_VER="${VERSION_ID}"
|
||||||
|
XORRISO_RPM=$(curl -s "http://software.opensuse.org/download.html?project=home%3AKnolleblau&package=xorriso" | egrep "/openSUSE_${SUSE_VER}/x86_64/xorriso-[0-9.-]" | tail -n1 | sed -re 's|^.*x86_64/(xorriso-[0-9.-]*.x86_64.rpm).*$|\1|g')
|
||||||
|
echo "Since you're using openSUSE or SLED/SLES, we need to install xorriso directly from an RPM. Please wait while we do this..."
|
||||||
|
curl -sLo /tmp/${XORRISO_RPM} "http://download.opensuse.org/repositories/home:/Knolleblau/openSUSE_${SUSE_VER}/x86_64/${XORRISO_RPM}"
|
||||||
|
zypper install --no-confirm -l /tmp/${XORRISO_RPM} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
echo "Done."
|
||||||
|
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# And a double fuck-you to SLED/SLES.
|
||||||
|
if [[ "${HOST_DIST}" == "SUSE" ]];
|
||||||
|
then
|
||||||
|
source /etc/os-release
|
||||||
|
source ${BASEDIR}/lib/prereqs/SUSE/meta
|
||||||
|
SUSE_VER="${VERSION_ID}"
|
||||||
|
SUSE_REL="${ID}"
|
||||||
|
SDK_PKGS=(binutils-devel git xz-devel xz-devel-32bit zlib-devel zlib-devel-32bit)
|
||||||
|
|
||||||
|
if [[ "${PRE_RUN}" != 'none' ]];
|
||||||
|
then
|
||||||
|
echo "Now updating your local package cache..."
|
||||||
|
set +e
|
||||||
|
eval "${PRE_RUN}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
echo "ERROR: Syncing your local package cache via ${PRE_RUN} command failed."
|
||||||
|
echo "Please ensure you are connected to the Internet/have repositories configured correctly."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
zypper search binutils-devel | egrep -q '^[[:space:]]*|[[:space:]]*binutils-devel[[:space:]]*'
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
echo
|
||||||
|
echo "In order to install some of the necessary packages on the host, you will need to add the SLE SDK repository."
|
||||||
|
echo "It can be downloaded by visiting http://download.suse.com/ and search for 'SUSE Linux Enterprise Software Development Kit'"
|
||||||
|
echo "(or add it to your subscriptions)."
|
||||||
|
echo "See https://www.suse.com/documentation/${SUSE_REL}-${SUSE_VER}/book_sle_deployment/data/sec_add-ons_sdk.html for more information."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
for pkgname in "${SDK_PKGS[@]}";
|
||||||
|
do
|
||||||
|
eval "${PKG_CHK}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
echo "Installing ${pkgname}..."
|
||||||
|
eval "${PKG_MGR}" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
echo "ERROR: ${pkgname} was not found to be installed and we can't install it."
|
||||||
|
echo "This usually means you aren't connected to the Internet or your package repositories"
|
||||||
|
echo "are not configured correctly. Review the list of packages in ${PKGLIST} and ensure"
|
||||||
|
echo "they are all available to be installed."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
function centos_is_stupid {
|
|
||||||
echo "Checking for appropriate kernel version and mksquashfs version..."
|
|
||||||
SQFS_VER=$(mksquashfs -version 2>&1 | head -n1 | awk '{print $3}' | sed -re 's/(^[0-9]*\.[0-9]*).*$/\1/g')
|
|
||||||
KERN_VER=$(uname -r | cut -f1 -d"-")
|
|
||||||
SQUASH_OPTS="-noappend -comp xz"
|
|
||||||
|
|
||||||
set +e
|
|
||||||
ver_check() {
|
|
||||||
[ "$1" == "$2" ] && return 10
|
|
||||||
ver1front=`echo $1 | cut -d "." -f -1`
|
|
||||||
ver1back=`echo $1 | cut -d "." -f 2-`
|
|
||||||
ver2front=`echo $2 | cut -d "." -f -1`
|
|
||||||
ver2back=`echo $2 | cut -d "." -f 2-`
|
|
||||||
if [ "$ver1front" != "$1" ] || [ "$ver2front" != "$2" ]; then
|
|
||||||
[ "$ver1front" -gt "$ver2front" ] && return 11
|
|
||||||
[ "$ver1front" -lt "$ver2front" ] && return 9
|
|
||||||
[ "$ver1front" == "$1" ] || [ -z "$ver1back" ] && ver1back=0
|
|
||||||
[ "$ver2front" == "$2" ] || [ -z "$ver2back" ] && ver2back=0
|
|
||||||
ver_check "$ver1back" "$ver2back"
|
|
||||||
return $?
|
|
||||||
else
|
|
||||||
[ "$1" -gt "$2" ] && return 11 || return 9
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
ver_check ${KERN_VER} "2.6.38"
|
|
||||||
KERNTEST=${?}
|
|
||||||
ver_check ${SQFS_VER} "4.2"
|
|
||||||
SQFSTEST=${?}
|
|
||||||
if [ ${KERNTEST} -lt "10" ];
|
|
||||||
then
|
|
||||||
echo "You need a newer kernel to even think about doing this. (>= 2.6.38)"
|
|
||||||
echo "If you're on CentOS, there are 3.x branches available via the elrepo repository."
|
|
||||||
echo "I recommend the 'kernel-lt' package from there."
|
|
||||||
echo "Bailing out."
|
|
||||||
exit 1
|
|
||||||
#elif [ ${SQFS_VER} -ge "4.2" ] && [ ${KERN_VER} -ge "2.6.38" ];
|
|
||||||
elif [ ${SQFSTEST} -ge "10" ] && [ ${KERNTEST} -ge "10" ];
|
|
||||||
then
|
|
||||||
#echo "Awesome; your mksquashfs (if found) is not less than v4.2."
|
|
||||||
SQUASH_CMD=$(which mksquashfs)
|
|
||||||
if [ ${?} != "0" ];
|
|
||||||
then
|
|
||||||
echo "...Except you need to install whatever package you need to for mksquashfs."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
SQUASH_CMD=$(which mksquashfs)
|
|
||||||
fi
|
|
||||||
elif [ ${SQFSTEST} -lt "10" ] && [ ${KERNTEST} -ge "10" ];
|
|
||||||
then
|
|
||||||
if [ ! -f ${SRCDIR}/squashfs4.2/squashfs-tools/mksquashfs ];
|
|
||||||
then
|
|
||||||
echo "Boy howdy. We need to compile a custom version of the squashfs-tools because you aren't running a version that supports XZ. Give me a second."
|
|
||||||
set -e
|
|
||||||
mkdir -p ${SRCDIR} ${BASEDIR}/bin
|
|
||||||
cd ${SRCDIR}
|
|
||||||
#wget --quiet -O squashfs4.2.tar.gz "http://downloads.sourceforge.net/project/squashfs/squashfs/squashfs4.2/squashfs4.2.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsquashfs%2Ffiles%2F&ts=1387047818&use_mirror=hivelocity"
|
|
||||||
curl -o squashfs4.2.tar.gz "http://downloads.sourceforge.net/project/squashfs/squashfs/squashfs4.2/squashfs4.2.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fsquashfs%2Ffiles%2F&ts=1387047818&use_mirror=hivelocity" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
|
||||||
tar -zxf squashfs4.2.tar.gz
|
|
||||||
cd squashfs4.2/squashfs-tools
|
|
||||||
make clean
|
|
||||||
sed -i -e 's/^#\(XZ_SUPPORT\)/\1/g' Makefile
|
|
||||||
make
|
|
||||||
SQUASH_CMD="${SRCDIR}/squashfs4.2/squashfs-tools/mksquashfs"
|
|
||||||
else
|
|
||||||
echo "Using custom-compiled mksquashfs from an earlier run."
|
|
||||||
SQUASH_CMD="${SRCDIR}/squashfs4.2/squashfs-tools/mksquashfs"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
set -e
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,10 @@
|
|||||||
function will_it_blend () {
|
function will_it_blend () {
|
||||||
|
|
||||||
|
FUNCNAME="will_it_blend"
|
||||||
|
|
||||||
|
SQUASH_CMD="mksquashfs"
|
||||||
|
SQUASH_OPTS="-noappend -comp xz"
|
||||||
|
|
||||||
local ARCHSUFFIX="${1}"
|
local ARCHSUFFIX="${1}"
|
||||||
if [[ "${1}" == "64" ]];
|
if [[ "${1}" == "64" ]];
|
||||||
then
|
then
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
function stuffy {
|
function stuffy {
|
||||||
|
|
||||||
|
FUNCNAME="stuffy"
|
||||||
|
|
||||||
cp -f ${BASEDIR}/VERSION_INFO.txt ${TEMPDIR}/.
|
cp -f ${BASEDIR}/VERSION_INFO.txt ${TEMPDIR}/.
|
||||||
|
|
||||||
if [[ "${I_AM_A_RACECAR}" == "y" ]];
|
if [[ "${I_AM_A_RACECAR}" == "y" ]];
|
||||||
@@ -21,12 +23,12 @@ function stuffy {
|
|||||||
if [ ! -f "${TEMPDIR}/EFI/shellx64_v2.efi" ];
|
if [ ! -f "${TEMPDIR}/EFI/shellx64_v2.efi" ];
|
||||||
then
|
then
|
||||||
# EFI Shell 2.0 for UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UEFI_Shell )
|
# EFI Shell 2.0 for UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=UEFI_Shell )
|
||||||
curl -o ${TEMPDIR}/EFI/shellx64_v2.efi https://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
curl -o ${TEMPDIR}/EFI/shellx64_v2.efi "https://github.com/tianocore/edk2/blob/master/ShellBinPkg/UefiShell/X64/Shell.efi?raw=true" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
fi
|
fi
|
||||||
if [ ! -f "${TEMPDIR}/EFI/shellx64_v1.efi" ];
|
if [ ! -f "${TEMPDIR}/EFI/shellx64_v1.efi" ];
|
||||||
then
|
then
|
||||||
# EFI Shell 1.0 for non UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Efi-shell )
|
# EFI Shell 1.0 for non UEFI 2.3+ ( http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Efi-shell )
|
||||||
curl -o ${TEMPDIR}/EFI/shellx64_v1.efi https://svn.code.sf.net/p/edk2/code/trunk/edk2/EdkShellBinPkg/FullShell/X64/Shell_Full.efi >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
curl -o ${TEMPDIR}/EFI/shellx64_v1.efi "https://github.com/tianocore/edk2/blob/master/EdkShellBinPkg/FullShell/X64/Shell_Full.efi?raw=true" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# now for setting up loader config/entries. maybe add memtest or something in the future? i dunno.
|
# now for setting up loader config/entries. maybe add memtest or something in the future? i dunno.
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
function yo_dj () {
|
function yo_dj () {
|
||||||
|
|
||||||
|
FUNCNAME="yo_dj"
|
||||||
|
|
||||||
ARCH="${1}"
|
ARCH="${1}"
|
||||||
echo "Building the actual .iso image. This may take a while."
|
echo "Building the actual .iso image. This may take a while."
|
||||||
im_batman
|
#im_batman ## WHYTF IS THIS HERE?!
|
||||||
ISOFILENAME="${UXNAME}-${VERSION}.iso"
|
ISOFILENAME="${UXNAME}-${VERSION}.iso"
|
||||||
#MINIFILENAME="${UXNAME}-${VERSION}-mini.iso"
|
#MINIFILENAME="${UXNAME}-${VERSION}-mini.iso"
|
||||||
MINIFILENAME="${UXNAME}-mini.iso"
|
MINIFILENAME="${UXNAME}-mini.iso"
|
||||||
@@ -293,9 +296,12 @@ EOF
|
|||||||
do
|
do
|
||||||
patch -Np2 < ${BASEDIR}/src/ipxe_local/patches/${i} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
patch -Np2 < ${BASEDIR}/src/ipxe_local/patches/${i} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
done
|
done
|
||||||
#make everything EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
# Generate the iPXE EMBED script...
|
||||||
make bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
sed -re "s,^(chain\ ).*$,\1${IPXE_URI},g" \
|
||||||
make bin/ipxe.eiso bin/ipxe.usb EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
-e 's/%%COMMA%%/,/g' ${BASEDIR}/src/ipxe_local/EMBED > ${SRCDIR}/EMBED
|
||||||
|
#make everything EMBED="${SRCDIR}/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
make bin-i386-efi/ipxe.efi bin-x86_64-efi/ipxe.efi EMBED="${SRCDIR}/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
make bin/ipxe.eiso bin/ipxe.usb EMBED="${SRCDIR}/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
# Change this to USB-only...
|
# Change this to USB-only...
|
||||||
#make all EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
#make all EMBED="${BASEDIR}/src/ipxe_local/EMBED" >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
mv -f ${BASEDIR}/src/ipxe/src/bin/ipxe.usb ${ISODIR}/${USBFILENAME}
|
mv -f ${BASEDIR}/src/ipxe/src/bin/ipxe.usb ${ISODIR}/${USBFILENAME}
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
function mentos {
|
function mentos {
|
||||||
|
|
||||||
|
FUNCNAME="mentos"
|
||||||
|
|
||||||
# Freshen up the chroots to git's HEAD. Package lists, overlay, etc.
|
# Freshen up the chroots to git's HEAD. Package lists, overlay, etc.
|
||||||
sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.*
|
sed -i -e '/base-devel/d ; /multilib-devel/d' ${BASEDIR}/extra/packages.*
|
||||||
# both
|
# both
|
||||||
27
lib/prereqs/Antergos/meta
Normal file
27
lib/prereqs/Antergos/meta
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
NAME='Antergos'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
CHECK_METHOD='egrep "^NAME=\"Antergos Linux\"$" /etc/os-release'
|
||||||
|
PKG_MGR='pacman -S --needed --noconfirm ${pkgname}'
|
||||||
|
PRE_RUN='pacman -Syyy'
|
||||||
|
PKG_CHK='pacman -Q ${pkgname}'
|
||||||
|
URL='http://antergos.com/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
# For some reason, I can't get "yes y | " to parse correctly with eval. And Arch isn't smart enough
|
||||||
|
# to figure out that if I enable the multilib repos, *I want multilib gcc*. Fuck it. We'll just remove it first.
|
||||||
|
|
||||||
|
pacman -S --needed haveged >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
haveged
|
||||||
|
|
||||||
|
set +e
|
||||||
|
for pkg_override in gcc gcc-libs;
|
||||||
|
do
|
||||||
|
pacman -Q ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
if [[ "${?}" == "0" ]];
|
||||||
|
then
|
||||||
|
pacman -Rdd --noconfirm ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
set -e
|
||||||
|
|
||||||
|
}
|
||||||
1
lib/prereqs/Antergos/pkgs
Symbolic link
1
lib/prereqs/Antergos/pkgs
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../Arch/pkgs
|
||||||
27
lib/prereqs/Arch/meta
Normal file
27
lib/prereqs/Arch/meta
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
NAME='Arch'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
CHECK_METHOD='egrep "^NAME=\"Arch Linux\"$" /etc/os-release'
|
||||||
|
PKG_MGR='pacman -S --needed --noconfirm ${pkgname}'
|
||||||
|
PRE_RUN='pacman -Syyy'
|
||||||
|
PKG_CHK='pacman -Q ${pkgname}'
|
||||||
|
URL='https://www.archlinux.org/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
# For some reason, I can't get "yes y | " to parse correctly with eval. And Arch isn't smart enough
|
||||||
|
# to figure out that if I enable the multilib repos, *I want multilib gcc*. Fuck it. We'll just remove it first.
|
||||||
|
|
||||||
|
pacman -S --needed haveged >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
haveged
|
||||||
|
|
||||||
|
set +e
|
||||||
|
for pkg_override in gcc gcc-libs;
|
||||||
|
do
|
||||||
|
pacman -Q ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
if [[ "${?}" == "0" ]];
|
||||||
|
then
|
||||||
|
pacman -Rdd --noconfirm ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
set -e
|
||||||
|
|
||||||
|
}
|
||||||
18
lib/prereqs/Arch/pkgs
Normal file
18
lib/prereqs/Arch/pkgs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
binutils
|
||||||
|
curl
|
||||||
|
findutils
|
||||||
|
gcc-libs-multilib
|
||||||
|
gcc-multilib
|
||||||
|
git
|
||||||
|
libisoburn
|
||||||
|
lynx
|
||||||
|
make
|
||||||
|
mtools
|
||||||
|
patch
|
||||||
|
perl
|
||||||
|
rsync
|
||||||
|
sed
|
||||||
|
squashfs-tools
|
||||||
|
syslinux
|
||||||
|
xz
|
||||||
|
zlib
|
||||||
15
lib/prereqs/CentOS/meta
Normal file
15
lib/prereqs/CentOS/meta
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
NAME='CentOS'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
CHECK_METHOD='egrep "^CentOS" /etc/redhat-release'
|
||||||
|
PKG_MGR='yum -y install ${pkgname}'
|
||||||
|
PRE_RUN='none'
|
||||||
|
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||||
|
URL='http://centos.org/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
# NOTE: we handle installing of squashfs-tools (maybe) and xorriso in centos_is_stupid function.
|
||||||
|
# because they *suck*. Seriously. I need to install tk just to install xorriso. I mean, what?
|
||||||
|
|
||||||
|
echo "No tweaks found."
|
||||||
|
|
||||||
|
}
|
||||||
1
lib/prereqs/CentOS/pkgs
Symbolic link
1
lib/prereqs/CentOS/pkgs
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../RHEL/pkgs
|
||||||
13
lib/prereqs/Debian/meta
Normal file
13
lib/prereqs/Debian/meta
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
NAME='Debian'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
CHECK_METHOD='egrep "^NAME=\"Debian\ GNU/Linux\"$" /etc/os-release'
|
||||||
|
PKG_MGR='apt-get -y install ${pkgname}'
|
||||||
|
PRE_RUN='apt-get update'
|
||||||
|
PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"'
|
||||||
|
URL='http://www.debian.org/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
|
||||||
|
echo "No tweaks found."
|
||||||
|
|
||||||
|
}
|
||||||
26
lib/prereqs/Debian/pkgs
Normal file
26
lib/prereqs/Debian/pkgs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
binutils
|
||||||
|
binutils-dev
|
||||||
|
curl
|
||||||
|
dosfstools
|
||||||
|
gcc
|
||||||
|
gcc-multilib
|
||||||
|
git
|
||||||
|
isolinux
|
||||||
|
libiberty-dev
|
||||||
|
libisoburn1
|
||||||
|
lynx
|
||||||
|
liblzma5
|
||||||
|
liblsma-dev
|
||||||
|
make
|
||||||
|
mtools
|
||||||
|
patch
|
||||||
|
perl
|
||||||
|
rsync
|
||||||
|
sed
|
||||||
|
squashfs-tools
|
||||||
|
syslinux
|
||||||
|
syslinux-efi
|
||||||
|
xorriso
|
||||||
|
xz-utils
|
||||||
|
zlib1g
|
||||||
|
zlib1g-dev
|
||||||
14
lib/prereqs/Devuan/meta
Normal file
14
lib/prereqs/Devuan/meta
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
NAME='Devuan'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
CHECK_METHOD='egrep "^NAME=\"Devuan\ GNU/Linux\"$" /etc/os-release'
|
||||||
|
PKG_MGR='apt-get -y install ${pkgname}'
|
||||||
|
PRE_RUN='apt-get update'
|
||||||
|
PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"'
|
||||||
|
URL='http://www.debian.org/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
|
||||||
|
echo "No tweaks found."
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
1
lib/prereqs/Devuan/pkgs
Symbolic link
1
lib/prereqs/Devuan/pkgs
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../Debian/pkgs
|
||||||
14
lib/prereqs/Fedora/meta
Normal file
14
lib/prereqs/Fedora/meta
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
NAME='Fedora'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
CHECK_METHOD='egrep '^Fedora' /etc/redhat-release'
|
||||||
|
PKG_MGR='dnf -y install ${pkgname}'
|
||||||
|
PRE_RUN='none'
|
||||||
|
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||||
|
URL='https://getfedora.org/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
|
||||||
|
echo "No tweaks found."
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
22
lib/prereqs/Fedora/pkgs
Normal file
22
lib/prereqs/Fedora/pkgs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
binutils
|
||||||
|
binutils-devel
|
||||||
|
curl
|
||||||
|
gcc
|
||||||
|
git
|
||||||
|
libisofs
|
||||||
|
lynx
|
||||||
|
make
|
||||||
|
mtools
|
||||||
|
patch
|
||||||
|
perl
|
||||||
|
rsync
|
||||||
|
sed
|
||||||
|
squashfs-tools
|
||||||
|
syslinux
|
||||||
|
syslinux-devel
|
||||||
|
tar
|
||||||
|
xorriso
|
||||||
|
xz
|
||||||
|
xz-devel
|
||||||
|
zlib
|
||||||
|
zlib-devel
|
||||||
20
lib/prereqs/Gentoo/meta
Normal file
20
lib/prereqs/Gentoo/meta
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
NAME='Gentoo'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
CHECK_METHOD='egrep "^Gentoo\ Base\ System" /etc/gentoo-release'
|
||||||
|
PKG_MGR='emerge -q1Dn ${pkgname}'
|
||||||
|
PRE_RUN='emerge -q --sync'
|
||||||
|
PKG_CHK='emerge -qp @installed 2>/dev/null | egrep -E "/${pkgname}-[0-9.]+"'
|
||||||
|
URL='https://www.gentoo.org/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
# WHY IS THIS EVEN MASKED?!
|
||||||
|
|
||||||
|
set +e
|
||||||
|
grep -q 'app-arch/lzma' /etc/portage/package.accept_keywords
|
||||||
|
if [[ "${?}" != "0" ]];
|
||||||
|
then
|
||||||
|
echo 'app-arch/lzma' >> /etc/portage/package.accept_keywords
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
|
||||||
|
}
|
||||||
17
lib/prereqs/Gentoo/pkgs
Normal file
17
lib/prereqs/Gentoo/pkgs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
sys-devel/binutils
|
||||||
|
net-misc/curl
|
||||||
|
sys-devel/gcc
|
||||||
|
dev-vcs/git
|
||||||
|
dev-libs/libisoburn
|
||||||
|
www-client/lynx
|
||||||
|
app-arch/lzma
|
||||||
|
sys-devel/make
|
||||||
|
sys-fs/mtools
|
||||||
|
sys-devel/patch
|
||||||
|
dev-lang/perl
|
||||||
|
net-misc/rsync
|
||||||
|
sys-apps/sed
|
||||||
|
sys-fs/squashfs-tools
|
||||||
|
sys-boot/syslinux
|
||||||
|
app-arch/xz-utils
|
||||||
|
sys-libs/zlib
|
||||||
19
lib/prereqs/HUMAN
Normal file
19
lib/prereqs/HUMAN
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
This directory is used to enable cross-distro support and set baseline ISO packages needed for it to boot. A list of packages is needed for the *host* to build the ISO as well, which you'll find detailed below. Adding distro support is easy; there simply needs to be the following added:
|
||||||
|
|
||||||
|
<basedir>/lib/prereqs/<Distro>/{meta,pkgs}
|
||||||
|
|
||||||
|
"pkgs" should contain a list of the specific package names needed to install for that specific distro (as this isn't always standardized).
|
||||||
|
|
||||||
|
"meta" is a file consisting of the following variables (enclosed in single or double quotes, please:
|
||||||
|
|
||||||
|
NAME=<Distro - this should match the name of the directory this file is in!>
|
||||||
|
SUPPORTED=<yes or no- yes by default>
|
||||||
|
CHECK_METHOD=<a command that will be run that should return '0' (success) on *only* this specific distro
|
||||||
|
(or fully compatible derivatives, i.e. CentOS/RHEL)>
|
||||||
|
PKG_MGR=<a command used to prefix installation of packages e.g. for RHEL, "yum -y install">
|
||||||
|
PRE_RUN=<a command to be run before PKG_MGR (e.g. on Ubuntu, "apt-get update"). commonly used to update package caches/metadata.
|
||||||
|
if your distro does not require this, set PRE_RUN=none >
|
||||||
|
PKG_CHK=<a command that will be run that should return '0' (success) *only* if any given package in the pkgs file is installed. e.g. for RHEL, "rpm -q">
|
||||||
|
URL=<the URL for the distro. optional, as it isn't really used as any active part of the scripts- at least not presently.>
|
||||||
|
|
||||||
|
Oh- and your distro *must be able to install the package*. That means if you need to enable/add additional repositories, be sure to do so ahead of time.
|
||||||
14
lib/prereqs/Mageia/meta
Normal file
14
lib/prereqs/Mageia/meta
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
NAME='Mageia'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
CHECK_METHOD='egrep "^Mageia\ release\ " /etc/mageia-release'
|
||||||
|
PKG_MGR='urpmi --force --auto ${pkgname}'
|
||||||
|
PRE_RUN='urpmi.update -a'
|
||||||
|
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||||
|
URL='https://www.mageia.org/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
|
||||||
|
echo "No tweaks found."
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
27
lib/prereqs/Mageia/pkgs
Normal file
27
lib/prereqs/Mageia/pkgs
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
binutils
|
||||||
|
binutils-devel
|
||||||
|
curl
|
||||||
|
gcc
|
||||||
|
git
|
||||||
|
lib64isofs6
|
||||||
|
lib64apr1_0
|
||||||
|
lib64apr-util1_0
|
||||||
|
lib64lzma5
|
||||||
|
lib64lzma-devel
|
||||||
|
lib64lzmalib1
|
||||||
|
lib64lzmalib-devel
|
||||||
|
libstdc++-devel
|
||||||
|
lynx
|
||||||
|
make
|
||||||
|
mtools
|
||||||
|
patch
|
||||||
|
perl
|
||||||
|
rsync
|
||||||
|
sed
|
||||||
|
squashfs-tools
|
||||||
|
syslinux
|
||||||
|
syslinux-devel
|
||||||
|
xorriso
|
||||||
|
xz
|
||||||
|
zlib
|
||||||
|
zlib-devel
|
||||||
27
lib/prereqs/Manjaro/meta
Normal file
27
lib/prereqs/Manjaro/meta
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
NAME='Manjaro'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
CHECK_METHOD='egrep "^NAME=\"Manjaro Linux\"$" /etc/os-release'
|
||||||
|
PKG_MGR='pacman -S --needed --noconfirm ${pkgname}'
|
||||||
|
PRE_RUN='pacman -Syyyu'
|
||||||
|
PKG_CHK='pacman -Q ${pkgname}'
|
||||||
|
URL='https://manjaro.org/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
# For some reason, I can't get "yes y | " to parse correctly with eval. And Arch isn't smart enough
|
||||||
|
# to figure out that if I enable the multilib repos, *I want multilib gcc*. Fuck it. We'll just remove it first.
|
||||||
|
|
||||||
|
pacman -S --needed haveged >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
haveged
|
||||||
|
|
||||||
|
set +e
|
||||||
|
for pkg_override in gcc gcc-libs;
|
||||||
|
do
|
||||||
|
pacman -Q ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
if [[ "${?}" == "0" ]];
|
||||||
|
then
|
||||||
|
pacman -Rdd --noconfirm ${pkg_override} >> "${LOGFILE}.${FUNCNAME}" 2>&1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
set -e
|
||||||
|
|
||||||
|
}
|
||||||
1
lib/prereqs/Manjaro/pkgs
Symbolic link
1
lib/prereqs/Manjaro/pkgs
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../Arch/pkgs
|
||||||
13
lib/prereqs/Mint/meta
Normal file
13
lib/prereqs/Mint/meta
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
NAME='Mint'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
CHECK_METHOD='egrep "^DESCRIPTION=\"Linux\ Mint\"" /etc/linuxmint/info'
|
||||||
|
PKG_MGR='apt-get -y install ${pkgname}'
|
||||||
|
PRE_RUN='apt-get -y update'
|
||||||
|
PKG_CHK='dpkg-query -l ${pkgname}'
|
||||||
|
URL='http://www.linuxmint.com/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
|
||||||
|
echo "No tweaks found."
|
||||||
|
|
||||||
|
}
|
||||||
1
lib/prereqs/Mint/pkgs
Symbolic link
1
lib/prereqs/Mint/pkgs
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../Ubuntu/pkgs
|
||||||
15
lib/prereqs/RHEL/meta
Normal file
15
lib/prereqs/RHEL/meta
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
NAME=RHEL
|
||||||
|
SUPPORTED=yes
|
||||||
|
# Red Hat Enterprise Linux Server release 6.5 (Santiago)
|
||||||
|
CHECK_METHOD='egrep "^Red\ Hat\ Enterprise\ Linux" /etc/redhat-release'
|
||||||
|
PKG_MGR='yum -y install'
|
||||||
|
PRE_RUN='none'
|
||||||
|
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||||
|
URL='http://www.redhat.com/en/technologies/linux-platforms/enterprise-linux'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
|
||||||
|
echo "No tweaks found."
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
20
lib/prereqs/RHEL/pkgs
Normal file
20
lib/prereqs/RHEL/pkgs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
binutils
|
||||||
|
binutils-devel
|
||||||
|
curl
|
||||||
|
gcc
|
||||||
|
git
|
||||||
|
libisofs
|
||||||
|
lynx
|
||||||
|
make
|
||||||
|
mtools
|
||||||
|
patch
|
||||||
|
perl
|
||||||
|
rsync
|
||||||
|
sed
|
||||||
|
squashfs-tools
|
||||||
|
syslinux
|
||||||
|
syslinux-devel
|
||||||
|
xz
|
||||||
|
xz-devel
|
||||||
|
zlib
|
||||||
|
zlib-devel
|
||||||
16
lib/prereqs/SUSE/meta
Normal file
16
lib/prereqs/SUSE/meta
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
NAME='SUSE'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
# Both SLED and SLES. We can probably safely combine them.
|
||||||
|
CHECK_METHOD='egrep "^NAME=\"SLE(D|S)\"$" /etc/os-release'
|
||||||
|
PKG_MGR='zypper install --no-confirm -l ${pkgname}'
|
||||||
|
PRE_RUN='zypper refresh'
|
||||||
|
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||||
|
URL='https://www.suse.com/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
# See the centos_is_stupid function. we do some tweaks there since -devel pkgs require the SDK on SLES/SLED.
|
||||||
|
|
||||||
|
echo "No tweaks found."
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
1
lib/prereqs/SUSE/pkgs
Symbolic link
1
lib/prereqs/SUSE/pkgs
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../openSUSE/pkgs
|
||||||
14
lib/prereqs/Ubuntu/meta
Normal file
14
lib/prereqs/Ubuntu/meta
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
NAME='Ubuntu'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
CHECK_METHOD='egrep "^DISTRIB_ID=Ubuntu$" /etc/lsb-release'
|
||||||
|
PKG_MGR='apt-get -y install ${pkgname}'
|
||||||
|
PRE_RUN='apt-get -y update'
|
||||||
|
PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"'
|
||||||
|
URL='http://www.ubuntu.com/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
|
||||||
|
echo "No tweaks found."
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
26
lib/prereqs/Ubuntu/pkgs
Normal file
26
lib/prereqs/Ubuntu/pkgs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
binutils
|
||||||
|
binutils-dev
|
||||||
|
curl
|
||||||
|
dosfstools
|
||||||
|
gcc
|
||||||
|
gcc-multilib
|
||||||
|
git
|
||||||
|
isolinux
|
||||||
|
libiberty-dev
|
||||||
|
libisoburn1
|
||||||
|
lynx
|
||||||
|
liblzma5
|
||||||
|
liblsma-dev
|
||||||
|
make
|
||||||
|
mtools
|
||||||
|
patch
|
||||||
|
perl
|
||||||
|
rsync
|
||||||
|
sed
|
||||||
|
squashfs-tools
|
||||||
|
syslinux
|
||||||
|
syslinux-efi
|
||||||
|
xorriso
|
||||||
|
xz-utils
|
||||||
|
zlib1g
|
||||||
|
zlib1g-dev
|
||||||
14
lib/prereqs/elementaryOS/meta
Normal file
14
lib/prereqs/elementaryOS/meta
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
NAME='elementaryOS'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
CHECK_METHOD='egrep "^DISTRIB_ID=\"elementary OS\"$" /etc/lsb-release'
|
||||||
|
PKG_MGR='apt-get -y install ${pkgname}'
|
||||||
|
PRE_RUN='apt-get -y update'
|
||||||
|
PKG_CHK='dpkg-query -l ${pkgname} | egrep "^ii[[:space:]]*${pkgname}"'
|
||||||
|
URL='https://elementary.io/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
|
||||||
|
echo "No tweaks found."
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
1
lib/prereqs/elementaryOS/pkgs
Symbolic link
1
lib/prereqs/elementaryOS/pkgs
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../Ubuntu/pkgs
|
||||||
40
lib/prereqs/iso.pkgs.lst
Normal file
40
lib/prereqs/iso.pkgs.lst
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
arch-install-scripts
|
||||||
|
archiso
|
||||||
|
bzip2
|
||||||
|
coreutils
|
||||||
|
cronie
|
||||||
|
dhclient
|
||||||
|
dhcp
|
||||||
|
dhcpcd
|
||||||
|
dosfstools
|
||||||
|
efibootmgr
|
||||||
|
efivar
|
||||||
|
ethtool
|
||||||
|
file
|
||||||
|
findutils
|
||||||
|
gummiboot
|
||||||
|
iproute2
|
||||||
|
iputils
|
||||||
|
libisoburn
|
||||||
|
localepurge
|
||||||
|
lz4
|
||||||
|
lzo
|
||||||
|
lzop
|
||||||
|
mkinitcpio-nfs-utils
|
||||||
|
ms-sys
|
||||||
|
mtools
|
||||||
|
net-tools
|
||||||
|
netctl
|
||||||
|
networkmanager
|
||||||
|
openssh
|
||||||
|
openvpn
|
||||||
|
pv
|
||||||
|
rsync
|
||||||
|
sed
|
||||||
|
shorewall
|
||||||
|
squashfs3-tools
|
||||||
|
squashfs-tools
|
||||||
|
sudo
|
||||||
|
sysfsutils
|
||||||
|
syslinux
|
||||||
|
traceroute
|
||||||
1
lib/prereqs/iso.pkgs.lst.32
Normal file
1
lib/prereqs/iso.pkgs.lst.32
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# This can be used for 32-bit only packages
|
||||||
1
lib/prereqs/iso.pkgs.lst.64
Normal file
1
lib/prereqs/iso.pkgs.lst.64
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# This can be used for 64-bit only packages
|
||||||
15
lib/prereqs/openSUSE/meta
Normal file
15
lib/prereqs/openSUSE/meta
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
NAME='openSUSE'
|
||||||
|
SUPPORTED='yes'
|
||||||
|
# Default doesn't have the quotes around the value, but I have a feeling that's a bug that will get "fixed" soon.
|
||||||
|
CHECK_METHOD='egrep "^NAME=\"?openSUSE\"?$" /etc/os-release'
|
||||||
|
PKG_MGR='zypper install --no-confirm -l ${pkgname}'
|
||||||
|
PRE_RUN='zypper refresh'
|
||||||
|
PKG_CHK='rpm -q ${pkgname} | egrep "^${pkgname}-[0-9]"'
|
||||||
|
URL='https://www.opensuse.org/'
|
||||||
|
|
||||||
|
function distro_specific_tweaks {
|
||||||
|
|
||||||
|
echo "No tweaks found."
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
17
lib/prereqs/openSUSE/pkgs
Normal file
17
lib/prereqs/openSUSE/pkgs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
binutils
|
||||||
|
curl
|
||||||
|
gcc
|
||||||
|
gcc-32bit
|
||||||
|
git
|
||||||
|
libisoburn1
|
||||||
|
libisofs6
|
||||||
|
lynx
|
||||||
|
make
|
||||||
|
mtools
|
||||||
|
patch
|
||||||
|
perl
|
||||||
|
rsync
|
||||||
|
sed
|
||||||
|
squashfs
|
||||||
|
syslinux
|
||||||
|
xz
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!ipxe
|
#!ipxe
|
||||||
|
|
||||||
dhcp
|
dhcp
|
||||||
chain http://bdisk.square-r00t.net
|
chain https://bdisk.square-r00t.net
|
||||||
|
|||||||
Reference in New Issue
Block a user