update BldHelper files to build in the build server

This commit is contained in:
Manuel 2022-11-18 11:15:51 -01:00
parent d69b85d1c0
commit a19c962b83
3 changed files with 5 additions and 310 deletions

View File

@ -1,74 +0,0 @@
#!/bin/bash
# BldHelper-release.sh
# This script is meant to be run on the build server and expects to find and update itself from adjacent repos.
# From PepDistroConfigs, these repos are ../PepProPixMaps & ../PepProTools and are vital to having a working build.
### ## # Set build working variables HERE # ## ###
PREFIX=My-distro-ubuntu-lite # Sets a unique final name of the ISO and checksum so <HouseKeeping> only removes 2 files .
SUFFIX=amd64 # Also used by <HouseKeeping>. And to distinguish between amd64 and x86 or devuan and ubuntu .
BUILD=release # Sets which pepbld.sh to use and the location in /var/www/html/[release|rc|testing|nightly|unstable]
##################################################
### ## # Make NO Edits Below This Line !! # ## ###
##################################################
[ $TODAY ! = " " ] || TODAY=$(date -u +"%Y-%m-%d") # If MasterBuilder.sh is used IT will set the date. If not used, we set it here.
FileName="${PREFIX}-${SUFFIX}" # This will give a uniquely named and dated ISO and checksum for <HouseKeeping>.
LOCATION=/build/my-distro-ubuntu-work/out/${BUILD} # Tells <HouseKeeping> and the script which 2 files to remove and where to put them.
LogDir=/build/my-distro-ubuntu-work/logs/ # This folder contains a log for the last $[PREFIX]-$[SUFFIX] build.
WorkDir=/build/my-distro-ubuntu-work/My-distro-xfce-configs-ubuntu/ # * If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. *
_break=0 ; _wait=30 # Time (in seconds) to wait
# Move into the builder directory.
# Make sure the local repos are up to date.
cd /build/my-distro-ubuntu-work/
cd ./My-distro-xfce-configs-ubuntu && git pull
#cd ./My-distro-xfce-configs-ubuntu && git pull --ff-only
# Run the build script - expect 50 minutes, allow 60.
./build-lite.sh 2>&1 | tee -a /tmp/${FileName}.out
# Timing matters, don't destroy the old one without a replacement.
# Check for the ISO to appear and wait for things to settle.
until [ -e build/*.iso ]
do ((++_break))
[ $_break -gt $_wait ] && break || sleep 1
done
if [ ${_break} -lt ${_wait} ] ; then
### 10 June, 2022 - After 17 June, this comment and the following line can be removed
echo -e "\n\tISO appeared after $_break seconds.\n" | tee --append /tmp/${FileName}.out
mv build/*.iso build/${FileName}.iso
# Make the checksum file.
cd build
echo "# ${FileName} ${TODAY}" > ${FileName}-sha512.checksum
sha512sum ${FileName}.iso >> ${FileName}-sha512.checksum
### <HouseKeeping>
# Remove the previous files in ${LOCATION} .
rm -f ${LOCATION}/${FileName}*.iso
rm -f ${LOCATION}/${FileName}*-sha512.checksum
#mv $(FileName}* ${LOCATION}/
mv ${FileName}.iso ${LOCATION}/${FileName}.iso
mv ${FileName}-sha512.checksum ${LOCATION}/${FileName}-sha512.checksum
# touch -t ${_stamp} ${LOCATION} ${LOCATION}/${FileName}*
touch ${LOCATION}/${FileName}*
lb clean &
# Move the log file to the log directory.
[ ! -e ${LogDir} ] && mkdir -p ${LogDir}
mv /tmp/${FileName}.out ${LogDir}/${FileName}-${BUILD}.log
### </HouseKeeping>
else echo -e "\n\tAfter $_break seconds, ISO never appeared.\n" | tee --append /tmp/${FileName}.out
mv /tmp/${FileName}.out ${LogDir}/${FileName}-${BUILD}.log
fi

View File

@ -16,16 +16,16 @@ BUILD=release # Sets which pepbld.sh to use and the location in /var/www/html/[
[ $TODAY ! = " " ] || TODAY=$(date -u +"%Y-%m-%d") # If MasterBuilder.sh is used IT will set the date. If not used, we set it here. [ $TODAY ! = " " ] || TODAY=$(date -u +"%Y-%m-%d") # If MasterBuilder.sh is used IT will set the date. If not used, we set it here.
FileName="${PREFIX}-${SUFFIX}" # This will give a uniquely named and dated ISO and checksum for <HouseKeeping>. FileName="${PREFIX}-${SUFFIX}" # This will give a uniquely named and dated ISO and checksum for <HouseKeeping>.
LOCATION=/build/my-distro-ubuntu-work/out/${BUILD} # Tells <HouseKeeping> and the script which 2 files to remove and where to put them. LOCATION=/var/www/acoroslinux.tk/repos/${BUILD} # Tells <HouseKeeping> and the script which 2 files to remove and where to put them.
LogDir=/build/my-distro-ubuntu-work/logs/ # This folder contains a log for the last $[PREFIX]-$[SUFFIX] build. LogDir=/repos/builds/logs/ # This folder contains a log for the last $[PREFIX]-$[SUFFIX] build.
WorkDir=/build/my-distro-ubuntu-work/My-distro-xfce-configs-ubuntu/ # * If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. * WorkDir=/repos/my-distro-builds/ # * If we change servers or locations T*H*I*S line is the O*N*L*Y line to change. *
_break=0 ; _wait=30 # Time (in seconds) to wait _break=0 ; _wait=30 # Time (in seconds) to wait
# Move into the builder directory. # Move into the builder directory.
# Make sure the local repos are up to date. # Make sure the local repos are up to date.
cd /build/my-distro-ubuntu-work/ cd /repos/builds/my-distro-builds/
#cd ./My-distro-xfce-configs-ubuntu #cd ./My-distro-xfce-configs-ubuntu
cd ./My-distro-xfce-configs-ubuntu && git pull --ff-only cd ./My-distro-configs-ubuntu && git pull --ff-only
# Run the build script - expect 50 minutes, allow 60. # Run the build script - expect 50 minutes, allow 60.
./build.sh 2>&1 | tee -a /tmp/${FileName}.out ./build.sh 2>&1 | tee -a /tmp/${FileName}.out

View File

@ -1,231 +0,0 @@
#!/bin/bash
PATH="/sbin:/usr/sbin:/usr/local/sbin:$PATH"
# Set the working folder variable
build="$(pwd)"
# Create the build folder, move into it removing stale mountpoints and files there.
[ -e build ] && [ ! -d build ] && rm -f build || [ ! -e build ] && mkdir build
cd build
umount $(mount | grep "${PWD}/chroot" | tac | cut -f3 -d" ") 2>/dev/null
for i in ./* ./.build ./cache/bootstrap ; do [ $i = ./cache ] && continue || rm -rf $i ; done
# Set of the structure to be used for the ISO and Live system.
# See /usr/lib/live/build/config for a full list of examples.
# Up above is the manual description of what options I used so far.
lb config noauto \
--binary-images iso-hybrid \
--mode ubuntu \
--architectures amd64 \
--linux-flavours generic \
--distribution jammy \
--archive-areas "main multiverse restricted universe" \
--mirror-bootstrap http://archive.ubuntu.com/ubuntu \
--parent-mirror-bootstrap http://archive.ubuntu.com/ubuntu \
--parent-mirror-chroot http://archive.ubuntu.com/ubuntu \
--parent-mirror-chroot-security http://security.ubuntu.com/ubuntu \
--parent-mirror-binary http://archive.ubuntu.com/ubuntu \
--parent-mirror-binary-security http://security.ubuntu.com/ubuntu \
--mirror-chroot http://archive.ubuntu.com/ubuntu \
--mirror-chroot-security http://security.ubuntu.com/ubuntu \
--updates true \
--security true \
--cache true \
--apt-recommends true \
--firmware-binary true \
--firmware-chroot true \
--iso-application "My-distro" \
--win32-loader false \
--iso-volume "My-distro-amd64" \
--iso-publisher "Manuel rosa" \
--image-name "My-distro" \
--win32-loader false \
--checksums sha512 \
--zsync false \
"${@}"
# Install the Xfce Desktop
mkdir -p $build/build/config/package-lists
echo xfce4 xfce4-goodies > $build/build/config/package-lists/desktop.list.chroot
# Install software
echo "# Install software to the squashfs for calamares to unpack to the OS.
linux-headers-generic
locales
language-selector-gnome
#update-manager
gnome-packagekit
adwaita-icon-theme-full
dkms
dbus-x11
ntp
xorg
xserver-xorg
xserver-xorg-input-synaptics
xserver-xorg-input-all
xserver-xorg-video-vmware
xserver-xorg-video-all
pulseaudio
pavucontrol
alsa-utils
aptitude
synaptic
gparted
apt-config-auto-update
libelf-dev
htop
package-update-indicator
gvfs-backends
samba
network-manager
network-manager-gnome
network-manager-pptp-gnome
bluez
blueman
gufw
gtk2-engines
plymouth
plymouth-themes
cups
system-config-printer
lightdm
lightdm-gtk-greeter
lightdm-gtk-greeter-settings
menulibre
mugshot
xscreensaver
xscreensaver-data
xscreensaver-data-extra
xscreensaver-gl
xscreensaver-gl-extra
gnome-system-tools
gnome-disk-utility
gnome-calculator
neofetch
accountsservice
catfish
fuseiso
timeshift
gnome-software
gnome-software-plugin-flatpak
gnome-software-plugin-snap
software-properties-gtk
fwupd
bleachbit
dconf-editor
gimp
gimp-data-extras
evince
xsane
nano
transmission-gtk
thunderbird
thunderbird-locale-pt-pt
thunderbird-locale-pt-br
thunderbird-locale-de
thunderbird-locale-en
thunderbird-locale-en-us
thunderbird-locale-es
libreoffice
libreoffice-gtk
libreoffice-gtk3
libreoffice-l10n-pt
libreoffice-l10n-pt-br
libreoffice-l10n-de
libreoffice-l10n-en-gb
libreoffice-l10n-es
printer-driver-cups-pdf
gnome-2048
gnome-chess
gnome-mahjongg
gnome-sudoku
guvcview
vlc
qt5-style-plugins
qt5ct
gdebi
f2fs-tools
xfsprogs
xfsdump
tumbler
tumbler-plugins-extra
ffmpegthumbnailer
linux-firmware
xterm
grub-pc
" > $build/build/config/package-lists/packages.list.chroot
echo "# Installer packages to install the system to disk.
calamares
calamares-settings-debian
" > $build/build/config/package-lists/installer.list.chroot
# Packages to be stored in /pool but not installed in the OS .
echo "# These packages are available to the installer, for offline use.
b43-fwcutter
bcmwl-kernel-source
dkms
iucode-tool
setserial
user-setup
efibootmgr
grub-efi
secureboot-db
grub-efi-amd64
grub-efi-amd64-bin
grub-efi-amd64-signed
shim
shim-signed
" > $build/build/config/package-lists/installer.list.binary
# Setup the chroot structure
mkdir -p $build/build/config/includes.binary
mkdir -p $build/build/config/hooks/live
mkdir -p $build/build/config/hooks/normal
mkdir -p $build/build/config/bootloaders
mkdir -p $build/build/config/packages.chroot
mkdir -p $build/build/config/includes.chroot/etc
mkdir -p $build/build/config/includes.chroot/usr/share/applications
mkdir -p $build/build/config/includes.chroot/usr/share/backgrounds
mkdir -p $build/build/config/includes.chroot/etc/calamares
mkdir -p $build/build/config/includes.chroot/usr/share/icons
mkdir -p $build/build/config/includes.chroot/usr/share/themes
mkdir -p $build/build/config/includes.chroot/etc/live/config.conf.d
mkdir -p $build/build/config/includes.chroot/usr/sbin
mkdir -p $build/build/config/includes.chroot/etc/lightdm
mkdir -p $build/build/config/includes.chroot/usr/share/pixmaps
mkdir -p $build/build/config/includes.chroot/etc/skel/Desktop
mkdir -p $build/build/config/includes.chroot/etc/default
# Copy Configs to the chroot
cp $build/userconfig/* $build/build/config/includes.chroot/etc/live/config.conf.d
cp $build/applications/* $build/build/config/includes.chroot/usr/share/applications
cp $build/hooks/live/* $build/build/config/hooks/live
cp $build/hooks/normal/* $build/build/config/hooks/normal
cp $build/install-debian/* $build/build/config/includes.chroot/usr/share/pixmaps
cp $build/sources-final/* $build/build/config/includes.chroot/usr/sbin
cp $build/bootloader-config/* $build/build/config/includes.chroot/usr/sbin
cp $build/grub/* $build/build/config/includes.chroot/etc/default
cp -r $build/lightdm/* $build/build/config/includes.chroot/etc/lightdm
cp -r $build/bootloaders/* $build/build/config/bootloaders
cp -r $build/backgrounds/* $build/build/config/includes.chroot/usr/share/backgrounds
cp -r $build/calamares/* $build/build/config/includes.chroot/etc/calamares
cp -r $build/configs/* $build/build/config/includes.chroot/etc/
cp -r $build/icons/* $build/build/config/includes.chroot/usr/share/icons
cp -r $build/themes/* $build/build/config/includes.chroot/usr/share/themes
cp -r $build/packages/* $build/build/config/packages.chroot
# Build the ISO #
lb build #--debug --verbose