diff --git a/.gitignore b/.gitignore index 80eaceb..cb1e7b6 100644 --- a/.gitignore +++ b/.gitignore @@ -22,13 +22,13 @@ /extrasrc # You should really generate local copies of these, as they're pretty private. -extra/pre-build.d/etc/openvpn/client.conf -overlay/etc/ssh/* -overlay/home/* -overlay/etc/systemd/system/multi-user.target.wants/openvpn@client.service -ssl/ -!ssl/.keepme -!ssl/openssl.cnf +**/etc/openvpn +**/etc/ssh +**/home +etc/systemd/system/multi-user.target.wants/openvpn@client.service +**ssl/ +!**ssl/.keepme +!**ssl/openssl.cnf # and we DEFINITELY don't need these. __pycache__/ diff --git a/bdisk/prep.py b/bdisk/prep.py index 1f0e14e..d90cb1b 100755 --- a/bdisk/prep.py +++ b/bdisk/prep.py @@ -179,9 +179,14 @@ def prepChroot(build, bdisk): tpl = env.get_template('VERSION_INFO.txt.j2') tpl_out = tpl.render(build = build, bdisk = bdisk, hostname = host.getHostname()) for a in arch: - with open('{0}/root.{1}/root/VERSION_INFO.txt'.format(chrootdir, a), "w+") as f: + with open('{0}/root.{1}/root/VERSION_INFO.txt'.format(chrootdir, a), 'w+') as f: f.write(tpl_out) - with open(tempdir + '/VERSION_INFO.txt', "w+") as f: + with open(tempdir + '/VERSION_INFO.txt', 'w+') as f: + f.write(tpl_out) + tpl = env.get_template('VARS.txt.j2') + tpl_out = tpl.render(bdisk = bdisk) + for a in arch: + with open('{0}/root.{1}/root/VARS.txt'.format(chrootdir, a), 'w+') as f: f.write(tpl_out) return(build) diff --git a/extra/pre-build.d/etc/apacman.conf b/extra/pre-build.d/etc/apacman.conf index f9e124a..2223aee 100644 --- a/extra/pre-build.d/etc/apacman.conf +++ b/extra/pre-build.d/etc/apacman.conf @@ -11,10 +11,11 @@ #buildonly=1 #cachevcs=1 #ignorearch=1 -#keepkeys=1 +keepkeys=1 needed=1 #noaur=1 noconfirm=1 +nodatabase=1 noedit=1 nofail=1 #preview=1 @@ -37,6 +38,10 @@ skipcache=1 #pacmanconf="/etc/pacman.conf" #downdir="/var/cache/pacman/pkg" #savedir="/var/cache/apacman/pkg" +#database="/var/lib/apacman" +#pacmandb="/var/lib/pacman/sync/aur.db" +#pkgfiledb="/var/cache/pkgfile/aur.files" +#localrepo="aur" #editor="nano -w" #pager="less -R" #RPCURL="https://aur.archlinux.org/rpc.php?type" @@ -55,4 +60,3 @@ skipcache=1 #COLOR5='\e[1;34m' #COLOR6='\e[1;33m' #COLOR7='\e[1;31m' - diff --git a/extra/pre-build.d/i686/root/iso.pkgs.arch b/extra/pre-build.d/i686/root/iso.pkgs.arch index 7626efb..9079650 100644 --- a/extra/pre-build.d/i686/root/iso.pkgs.arch +++ b/extra/pre-build.d/i686/root/iso.pkgs.arch @@ -1 +1,6 @@ -# This can be used for 32-bit only packages +# Commented lines are supported (via a preceding # only). +# Packages from the AUR can be specified. +# If you require a package with a regex special character in the name +# (i.e.: .\?+[]{} etc.) +# and it is part of the ACTUAL package name, then you must DOUBLE-ESCAPE it: +# e.g. 'bonnie\\+\\+' for a package named 'bonnie++' diff --git a/extra/pre-build.d/i686/root/packages.arch b/extra/pre-build.d/i686/root/packages.arch index e69de29..9079650 100644 --- a/extra/pre-build.d/i686/root/packages.arch +++ b/extra/pre-build.d/i686/root/packages.arch @@ -0,0 +1,6 @@ +# Commented lines are supported (via a preceding # only). +# Packages from the AUR can be specified. +# If you require a package with a regex special character in the name +# (i.e.: .\?+[]{} etc.) +# and it is part of the ACTUAL package name, then you must DOUBLE-ESCAPE it: +# e.g. 'bonnie\\+\\+' for a package named 'bonnie++' diff --git a/extra/pre-build.d/root/apacman-3.0-1-any.pkg.tar.xz b/extra/pre-build.d/root/apacman-3.0-1-any.pkg.tar.xz deleted file mode 100644 index c69fb0c..0000000 Binary files a/extra/pre-build.d/root/apacman-3.0-1-any.pkg.tar.xz and /dev/null differ diff --git a/extra/pre-build.d/root/apacman-3.1-1-any.pkg.tar.xz b/extra/pre-build.d/root/apacman-3.1-1-any.pkg.tar.xz new file mode 100644 index 0000000..00083a8 Binary files /dev/null and b/extra/pre-build.d/root/apacman-3.1-1-any.pkg.tar.xz differ diff --git a/extra/pre-build.d/root/iso.pkgs.both b/extra/pre-build.d/root/iso.pkgs.both index d7eba67..1405e7c 100644 --- a/extra/pre-build.d/root/iso.pkgs.both +++ b/extra/pre-build.d/root/iso.pkgs.both @@ -1,3 +1,9 @@ +# Commented lines are supported (via a preceding # only). +# Packages from the AUR can be specified. +# If you require a package with a regex special character in the name +# (i.e.: .\?+[]{} etc.) +# and it is part of the ACTUAL package name, then you must DOUBLE-ESCAPE it: +# e.g. 'bonnie\\+\\+' for a package named 'bonnie++' arch-install-scripts archiso bzip2 diff --git a/extra/pre-build.d/root/packages.both b/extra/pre-build.d/root/packages.both index 48e5fb0..3fca5dc 100644 --- a/extra/pre-build.d/root/packages.both +++ b/extra/pre-build.d/root/packages.both @@ -1,4 +1,9 @@ -# You can include comments, such as this. AUR packages are allowed. +# Commented lines are supported (via a preceding # only). +# Packages from the AUR can be specified. +# If you require a package with a regex special character in the name +# (i.e.: .\?+[]{} etc.) +# and it is part of the ACTUAL package name, then you must DOUBLE-ESCAPE it: +# e.g. 'bonnie\\+\\+' for a package named 'bonnie++' # We need to install all X drivers. abs acpi @@ -19,7 +24,7 @@ bin86 bind-tools binutils bluez-utils -bonnie++ +bonnie\\+\\+ boxbackup-client boxbackup-server bozocrack-git diff --git a/extra/pre-build.d/root/pre-build.sh b/extra/pre-build.d/root/pre-build.sh index b975390..bed551a 100755 --- a/extra/pre-build.d/root/pre-build.sh +++ b/extra/pre-build.d/root/pre-build.sh @@ -48,7 +48,7 @@ pacman -S --noconfirm --needed base syslinux wget rsync unzip jshon sed sudo abs # And get rid of files it wants to replace cleanPacorigs # Force update all currently installed packages in case the tarball's out of date -pacman -Syyu --force --noconfirm +pacman -Su --force --noconfirm # And in case the keys updated... pacman-key --refresh-keys cleanPacorigs @@ -60,6 +60,7 @@ pacman --noconfirm -U /root/apacman*.tar.xz &&\ mkdir /var/tmp/apacman && chmod 0750 /var/tmp/apacman &&\ chown root:aurbuild /var/tmp/apacman cleanPacorigs +apacman -Syy apacman -S --noconfirm --noedit --skipinteg --needed -S apacman apacman-deps apacman-utils expac apacman --gendb cleanPacorigs @@ -95,8 +96,7 @@ ln -s /usr/lib/libdialog.so.1.2 /usr/lib/libdialog.so cleanPacorigs apacman --noconfirm --noedit --skipinteg -S --needed linux apacman --gendb -cp -a /boot/vmlinuz-linux /boot/vmlinuz-linux-${DISTNAME} -cp -af /boot/initramfs-linux.img /boot/initramfs-linux-${DISTNAME}.img +mv /boot/vmlinuz-linux /boot/vmlinuz-linux-${DISTNAME} cleanPacorigs # And install EXTRA functionality packages, if there are any. @@ -136,7 +136,7 @@ else usermod -L root fi cleanPacorigs -cp -af /boot/initramfs-linux.img /boot/initramfs-linux-${DISTNAME}.img +mv /boot/initramfs-linux.img /boot/initramfs-linux-${DISTNAME}.img # And install arch-specific extra packages, if there are any. PKGLIST=$(sed -e '/^[[:space:]]*#/d ; /^[[:space:]]*$/d' /root/packages.arch | tr '\n' ' ') if [[ -n "${PKGLIST}" ]]; @@ -146,8 +146,11 @@ then cleanPacorigs fi # Cleanup -yes | pacman -Scc +#yes | pacman -Scc # doesn't parse yes(1) output correctly, it seems. +# TODO: look into https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Removing_unused_packages_.28orphans.29 +paccache -rk0 rm -f /root/.bash_history rm -f /root/.viminfo rm -f /root/apacman-*.pkg.tar.xz rm -f /root/pre-build.sh +pkill -9 dirmngr diff --git a/extra/pre-build.d/x86_64/root/iso.pkgs.arch b/extra/pre-build.d/x86_64/root/iso.pkgs.arch index 3d2d993..9079650 100644 --- a/extra/pre-build.d/x86_64/root/iso.pkgs.arch +++ b/extra/pre-build.d/x86_64/root/iso.pkgs.arch @@ -1 +1,6 @@ -# This can be used for 64-bit only packages +# Commented lines are supported (via a preceding # only). +# Packages from the AUR can be specified. +# If you require a package with a regex special character in the name +# (i.e.: .\?+[]{} etc.) +# and it is part of the ACTUAL package name, then you must DOUBLE-ESCAPE it: +# e.g. 'bonnie\\+\\+' for a package named 'bonnie++' diff --git a/extra/pre-build.d/x86_64/root/packages.arch b/extra/pre-build.d/x86_64/root/packages.arch index e69de29..9079650 100644 --- a/extra/pre-build.d/x86_64/root/packages.arch +++ b/extra/pre-build.d/x86_64/root/packages.arch @@ -0,0 +1,6 @@ +# Commented lines are supported (via a preceding # only). +# Packages from the AUR can be specified. +# If you require a package with a regex special character in the name +# (i.e.: .\?+[]{} etc.) +# and it is part of the ACTUAL package name, then you must DOUBLE-ESCAPE it: +# e.g. 'bonnie\\+\\+' for a package named 'bonnie++'