Setting up install pipelinel; metapackage examples
This commit is contained in:
parent
9ea97f0210
commit
c6c42779a4
|
@ -53,13 +53,13 @@ function confirm_dialouge() {
|
|||
function start_menu_mesage() {
|
||||
echo "NOTE: Remember to check the CONFIG.sh and set the variables!"
|
||||
echo "\nWhat do you want to run?"
|
||||
echo "\t0) Do all jobs (Including cleanup berfore starting.)"
|
||||
echo "\t1) Do debootstrap run"
|
||||
echo "\t2) Chroot"
|
||||
echo "\t3) Create boot structure"
|
||||
echo "\t4) Create the ISO"
|
||||
echo "\t5) Cleanup (Purges everything that was generated.)"
|
||||
echo "\t6) EXIT"
|
||||
echo "\t1) Do all jobs (Including cleanup berfore starting.)"
|
||||
echo "\t2) Do debootstrap run"
|
||||
echo "\t3) Chroot"
|
||||
echo "\t4) Create boot structure"
|
||||
echo "\t5) Create the ISO"
|
||||
echo "\t6) Cleanup (Purges everything that was generated.)"
|
||||
echo "\t0) EXIT"
|
||||
}
|
||||
|
||||
function chroot_big_dump_mesage() {
|
||||
|
|
|
@ -5,20 +5,16 @@ rm /var/lib/dbus/machine-id
|
|||
# Before exiting the chroot, remove the diversion:
|
||||
# Earlier this guide asked you to make a backup copy of /sbin/initctl.
|
||||
# If the following command does not restore this file, then restore from the backup copy you made.
|
||||
rm /sbin/initctl
|
||||
dpkg-divert --rename --remove /sbin/initctl
|
||||
|
||||
|
||||
# Remove old kernels
|
||||
ls /boot/vmlinuz-5.4.**-**-generic > list.txt
|
||||
sum=$(cat list.txt | grep '[^ ]' | wc -l)
|
||||
|
||||
if [ $sum -gt 1 ]; then
|
||||
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
|
||||
fi
|
||||
rm list.txt
|
||||
|
||||
|
||||
apt-get update && apt-get upgrade
|
||||
apt-get autoremove --purge -y
|
||||
apt-get autoclean -y
|
||||
apt-get clean
|
||||
|
||||
rm -rf /tmp/*
|
||||
rm /etc/resolv.conf
|
||||
|
||||
# Remove old kernels
|
||||
dpkg -l 'linux-*' | sed '/^ii/!d;/hwe/d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt -y purge; update-grub
|
||||
|
||||
rm /sbin/initctl
|
||||
dpkg-divert --rename --remove /sbin/initctl
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
. CONFIG_SCRIPTS.sh
|
||||
. GET_PPA_GPG_KEYS.sh
|
||||
|
||||
|
||||
# ---- Setup Variables ---- #
|
||||
export HOME=/root
|
||||
export LC_ALL=C
|
||||
|
||||
|
||||
# Screen-id of launched Xephyr on host system... ex: :10 or :1.0, etc
|
||||
# Note: Don't use :0 or :0.0 as they are your host system's.
|
||||
export DISPLAY=:10
|
||||
|
||||
|
||||
# ---- Call CONFIG_SCRIPTS Methods Here As Needed ---- #
|
||||
cd "${SCRIPT_PATH}";
|
||||
echo "Base Dir: " $(pwd) "\n";
|
|
@ -0,0 +1,61 @@
|
|||
#!/bin/bash
|
||||
|
||||
# set -o xtrace ## To debug scripts
|
||||
# set -o errexit ## To exit on error
|
||||
# set -o errunset ## To exit if a variable is referenced but not set
|
||||
|
||||
|
||||
|
||||
|
||||
# ---- DO NOT CHANGE OR REMOVE UNLESS YOU KNOW WHAT YOU ARE DOING ---- #
|
||||
|
||||
# ---- Setup Aliases ---- #
|
||||
shopt -s expand_aliases
|
||||
alias echo="echo -e"
|
||||
|
||||
SCRIPT_PATH="$( cd "$(dirname "")" >/dev/null 2>&1 ; pwd -P )";
|
||||
|
||||
|
||||
|
||||
|
||||
# ---- Methods Used Throughout The Process ---- #
|
||||
|
||||
# Generic confirm 'dialouge'
|
||||
function confirm_dialouge() {
|
||||
echo $1
|
||||
read -p "(yY/Nn) --> " ANSR
|
||||
while [[ $ANSR != "y" ]] && [[ $ANSR != "Y" ]] && \
|
||||
[[ $ANSR != "n" ]] && [[ $ANSR != "N" ]]
|
||||
do
|
||||
read -p "(yY/Nn) --> " ANSR
|
||||
done
|
||||
|
||||
if [[ $ANSR == "n" ]] || [[ $ANSR == "N" ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# ---- Messages Used Throughout The Process ---- #
|
||||
|
||||
function start_menu_mesage() {
|
||||
echo "NOTE: Remember to check the CONFIG.sh and set the variables!"
|
||||
echo "\nWhat do you want to run?"
|
||||
echo "\t1) Run the initial environment setup process (Only run once!)"
|
||||
echo "\t2) Add PPA repos"
|
||||
echo "\t3) Pull PPA repo keys"
|
||||
echo "\t4) Install live ISO dependencies"
|
||||
echo "\t5) Install Base System Packages"
|
||||
echo "\t6) Install Gaming Apps"
|
||||
echo "\t7) Install Media Apps"
|
||||
echo "\t8) Install Office Apps"
|
||||
echo "\t9) Install Debs"
|
||||
echo "\t10) Transfer Setting"
|
||||
echo "\11) Cleanup (Should run before exiting chroot.)"
|
||||
echo "\t0) EXIT"
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
Add 32bit debs here... This folder is intended to keep things clear and clean...
|
|
@ -1 +0,0 @@
|
|||
Add 64bit debs here... This folder is intended to keep things clear and clean...
|
|
@ -10,6 +10,6 @@ function main() {
|
|||
# Add your keys here..
|
||||
# Command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <key>
|
||||
# Ex: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 283EC8CD
|
||||
|
||||
echo "No gpg keys specified for addition..."
|
||||
}
|
||||
main $@;
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
. CONFIG.sh
|
||||
|
||||
# set -o xtrace ## To debug scripts
|
||||
# set -o errexit ## To exit on error
|
||||
# set -o errunset ## To exit if a variable is referenced but not set
|
||||
|
||||
|
||||
# ---- Bellow adds other PPAs ---- #
|
||||
function main() {
|
||||
echo "No ppas specified for addition..."
|
||||
####### SOFTWARE PPAs #######
|
||||
# add-apt-repository ppa:webupd8team/atom -y # atom text editor
|
||||
# apt-add-repository ppa:obsproject/obs-studio -y # open broadcaster studio
|
||||
# add-apt-repository ppa:starws-box/deadbeef-player -y # deadbeef musuc player
|
||||
|
||||
####### THEMES PPAs #######
|
||||
# add-apt-repository ppa:noobslab/themes -y # sable-gtk
|
||||
# add-apt-repository ppa:noobslab/icons2 -y # more icons
|
||||
# add-apt-repository ppa:snwh/pulp -y # paper-gtk-theme
|
||||
# apt-get install ambiance-blackout-colors -y # ambiance-blackout-colors
|
||||
}
|
||||
main $@;
|
|
@ -1,13 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
function main() {
|
||||
apt list --installed > temp.txt
|
||||
echo "aptitude" >> temp.txt ## Apend aptitude to list
|
||||
lineCount=$(wc -l temp.txt | awk '{printf $1}') ## Get line count minus one to remove first line
|
||||
tail -n$((lineCount - 1)) temp.txt > cleanedList.sh ## Get all lines but the first
|
||||
echo "aptitude markauto ~i \\ " > temp.txt
|
||||
awk '{ FS = "/"} NF{printf " !~" $1}' cleanedList.sh >> temp.txt
|
||||
rm cleanedList.sh
|
||||
mv temp.txt cleanedList.sh
|
||||
}
|
||||
main;
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,163 @@
|
|||
#!/bin/bash
|
||||
|
||||
. CONFIG.sh
|
||||
|
||||
# set -o xtrace ## To debug scripts
|
||||
# set -o errexit ## To exit on error
|
||||
# set -o errunset ## To exit if a variable is referenced but not set
|
||||
|
||||
|
||||
function main() {
|
||||
clear;
|
||||
start_menu_mesage;
|
||||
read -p "--> : " ANSR
|
||||
while [[ $ANSR != "0" ]] && [[ $ANSR != "1" ]] && \
|
||||
[[ $ANSR != "2" ]] && [[ $ANSR != "3" ]] && \
|
||||
[[ $ANSR != "4" ]] && [[ $ANSR != "5" ]] && \
|
||||
[[ $ANSR != "6" ]] && [[ $ANSR != "7" ]] && \
|
||||
[[ $ANSR != "8" ]] && [[ $ANSR != "9" ]] && \
|
||||
[[ $ANSR != "10" ]] && [[ $ANSR != "11" ]]; do
|
||||
read -p "--> : " ANSR
|
||||
done
|
||||
case $ANSR in
|
||||
"1" ) run_once_process; break;;
|
||||
"2" ) ./GET_PPA_REPOSITORIES.sh; break;;
|
||||
"3" ) ./GET_PPA_GPG_KEYS.sh; break;;
|
||||
"4" ) get_live_iso_dependencies; break;;
|
||||
"5" ) base; break;;
|
||||
"6" ) gaming; break;;
|
||||
"7" ) media; break;;
|
||||
"8" ) office; break;;
|
||||
"9" ) debs; break;;
|
||||
"10" ) transfer_settings; break;;
|
||||
"11" ) ./CLEANUP.sh; break;;
|
||||
"0" ) exit; break;;
|
||||
* ) echo "Don't know how you got here but that's a bad sign..."; break;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
function run_once_process() {
|
||||
apt-get update
|
||||
apt-get install --yes dbus
|
||||
dbus-uuidgen > /var/lib/dbus/machine-id
|
||||
dpkg-divert --local --rename --add /sbin/initctl
|
||||
# Gets us add-apt-repository command
|
||||
apt-get install apt-transport-https software-properties-common -y
|
||||
apt-get --yes upgrade
|
||||
}
|
||||
|
||||
|
||||
function get_live_iso_dependencies() {
|
||||
apt-get install --yes casper lupin-casper
|
||||
apt-get install --yes discover laptop-detect os-prober
|
||||
apt-get install --yes linux-generic
|
||||
|
||||
echo "Do you want to install?"
|
||||
echo "\t1) ubiquity-frontend-gtk"
|
||||
echo "\t2) ubiquity-frontend-kde"
|
||||
echo "\t0) nethier..."
|
||||
read -p "--> : " ANSR
|
||||
while [[ $ANSR != "0" ]] && [[ $ANSR != "1" ]] && \
|
||||
[[ $ANSR != "2" ]]; do
|
||||
read -p "--> : " ANSR
|
||||
done
|
||||
case $ANSR in
|
||||
"0" ) apt-get install --yes ubiquity-frontend-gtk --no-install-recommends --no-install-suggests
|
||||
break;;
|
||||
"1" ) apt-get install --yes ubiquity-frontend-kde --no-install-recommends --no-install-suggests
|
||||
break;;
|
||||
"2" ) break;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------Bellow Installs the main system------------------------#
|
||||
|
||||
######################## Main Desktop ########################
|
||||
function base() {
|
||||
# Pushed to a meta-package deb
|
||||
# apt-get install xserver-xorg xorg xinit slim synaptic aptitude apt-xapian-index \
|
||||
# gufw wicd-curses pulseaudio pavucontrol file-roller p7zip-rar arj rar unrar-free \
|
||||
# xcompmgr tweak lhasa unar p7zip zip terminator stjerm ttf-mscorefonts-installer \
|
||||
# gparted gdebi sox udisks2 iftop htop tree hardinfo libsox-fmt-all onboard mc \
|
||||
# oracle-java8-installer -y
|
||||
|
||||
apt-get autoremove --purge -y && apt-get autoclean
|
||||
|
||||
#### Change bellow mate-core to other if
|
||||
#### one wants different window managers
|
||||
#### Above is mostly common base system stuff
|
||||
apt-get install mate-core spacefm-gtk3 --no-install-recommends ulauncher -y
|
||||
apt-get remove caja mate-terminal -y
|
||||
aptitude keep-all
|
||||
|
||||
############ Themes ############
|
||||
# apt-get install paper-gtk-theme paper-icon-theme \
|
||||
# sable-gtk mate-icon-theme -y
|
||||
}
|
||||
|
||||
############ Gaming ############
|
||||
function gaming() {
|
||||
apt-get --no-install-recommends --no-install-suggests install \
|
||||
steam-launcher playonlinux dosbox -y
|
||||
}
|
||||
|
||||
################### Multimedia-- Videos- Images- Etc ###################
|
||||
function media() {
|
||||
# guvcview
|
||||
apt-get --no-install-recommends --no-install-suggests install blender \
|
||||
bomi deadbeef gimp gimp-gap obs-studio xfce4-screenshooter x264 mirage \
|
||||
xchat-gnome -y
|
||||
}
|
||||
|
||||
######################### Office-General Stuff #########################
|
||||
function office() {
|
||||
# calibre
|
||||
apt-get --no-install-recommends --no-install-suggests install \
|
||||
filezilla qbittorrent quicksynergy synergy atom galculator bleachbit \
|
||||
gtkorphan libreoffice evince -y
|
||||
|
||||
debs
|
||||
}
|
||||
|
||||
################### Look at DEB dirs to install software ####################
|
||||
|
||||
function debs() {
|
||||
ARCH=$(uname -m)
|
||||
touch COPY_OVER_TO_CHROOT/DEBS.sh
|
||||
|
||||
if [[ "${ARCH}" == "i386" ]]; then
|
||||
ls COPY_OVER_TO_CHROOT/DEB32/ > COPY_OVER_TO_CHROOT/DEBS.sh
|
||||
ARCH="DEB32/"
|
||||
elif [[ "${ARCH}" == "x86_64" ]]; then
|
||||
ls COPY_OVER_TO_CHROOT/DEB64/ > COPY_OVER_TO_CHROOT/DEBS.sh
|
||||
ARCH="DEB64/"
|
||||
fi
|
||||
|
||||
sed -i "s|^|dpkg -i ${ARCH}/|" COPY_OVER_TO_CHROOT/DEBS.sh
|
||||
bash COPY_OVER_TO_CHROOT/DEBS.sh
|
||||
}
|
||||
|
||||
######################### Copy Settings to their locations #########################
|
||||
function transfer_settings() {
|
||||
## set etc skell
|
||||
rm -rf /etc/skel/
|
||||
cp -r COPY_OVER_TO_CHROOT/SETTINGS_THEMES/etc/skell/ /etc/
|
||||
|
||||
## set slim themes
|
||||
rm -rf /usr/share/slim/themes/
|
||||
mv COPY_OVER_TO_CHROOT/SETTINGS_THEMES/usr_share/slim/themes/ /usr/share/slim/
|
||||
|
||||
## set icons & themes
|
||||
cp -r COPY_OVER_TO_CHROOT/SETTINGS_THEMES/usr_share/icons /usr/share/
|
||||
cp -r COPY_OVER_TO_CHROOT/SETTINGS_THEMES/usr_share/themes /usr/share/
|
||||
|
||||
## set grub bg image
|
||||
echo 'GRUB_BACKGROUND="grub.jpg"' >> /etc/default/grub
|
||||
cp COPY_OVER_TO_CHROOT/SETTINGS_THEMES/boot_grub/grub.jpg /boot/grub/
|
||||
update-grub
|
||||
|
||||
}
|
||||
|
||||
main $@;
|
|
@ -0,0 +1,18 @@
|
|||
### Commented entries have reasonable defaults.
|
||||
### Uncomment to edit them.
|
||||
# Source: sol-os-base-src
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Homepage: https://www.itdominator.com/
|
||||
Standards-Version: 3.9.2
|
||||
|
||||
Package: sol-os-base
|
||||
Version: 0.0.1
|
||||
Maintainer: Maxim Stewart <maximstewart1@gmail.com>
|
||||
Depends: adduser,apt,apt-utils,bzip2,console-setup,debconf,eject,gnupg,ifupdown,initramfs-tools,iproute2,iputils-ping,isc-dhcp-client,kbd,kmod,less,locales,makedev,mawk,net-tools,netbase,netcat-openbsd,passwd,procps,python3,resolvconf,rsyslog,sudo,tzdata,ubuntu-keyring,udev,ureadahead,whiptail,
|
||||
nano,p7zip,zip,p7zip-rar,rar,unrar-free,htop,iftop,mc,tree
|
||||
Provides: adduser,apt,apt-utils,bzip2,console-setup,debconf,eject,gnupg,ifupdown,initramfs-tools,iproute2,iputils-ping,isc-dhcp-client,kbd,kmod,less,locales,makedev,mawk,net-tools,netbase,netcat-openbsd,passwd,procps,python3,resolvconf,rsyslog,sudo,tzdata,ubuntu-keyring,udev,ureadahead,whiptail,
|
||||
nano,p7zip,zip,p7zip-rar,rar,unrar-free,htop,iftop,mc,tree
|
||||
Architecture: amd64
|
||||
Description: Sol-OS: A minimal OS
|
||||
Sol-OS is a minimal OS keeping things simple and light weight. This meta-package installs the base programs that are needed for general system functions.
|
|
@ -0,0 +1,20 @@
|
|||
### Commented entries have reasonable defaults.
|
||||
### Uncomment to edit them.
|
||||
# Source: sol-os-desktop-src
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Homepage: https://www.itdominator.com/
|
||||
Standards-Version: 3.9.2
|
||||
|
||||
Package: sol-os-desktop
|
||||
Version: 0.0.1
|
||||
Maintainer: Maxim Stewart <maximstewart1@gmail.com>
|
||||
Depends: xserver-xorg,xorg,xinit,pulseaudio,pavucontrol,sox,libsox-fmt-all,udisks2,slim,
|
||||
xcompmgr,pekwm,default-jre,openjfx,gufw,wicd-curses,gparted,gdebi,file-roller,hardinfo,
|
||||
terminator,stjerm,onboard
|
||||
Provides: xserver-xorg,xorg,xinit,pulseaudio,pavucontrol,sox,libsox-fmt-all,udisks2,slim,
|
||||
xcompmgr,pekwm,default-jre,openjfx,gufw,wicd-curses,gparted,gdebi,file-roller,hardinfo,
|
||||
terminator,stjerm,onboard
|
||||
Architecture: amd64
|
||||
Description: Sol-OS: A minimal OS
|
||||
Sol-OS is a minimal OS keeping things simple and light weight. This meta-package installs the base programs that are needed to provide a usable desktop.
|
16
src/start.sh
16
src/start.sh
|
@ -11,7 +11,7 @@ function main() {
|
|||
clear;
|
||||
if [[ $(sanity_check) -eq 1 ]]; then echo "\nExiting..."; return; fi
|
||||
|
||||
start_menu_mesage
|
||||
start_menu_mesage;
|
||||
read -p "--> : " ANSR
|
||||
while [[ $ANSR != "0" ]] && [[ $ANSR != "1" ]] && \
|
||||
[[ $ANSR != "2" ]] && [[ $ANSR != "3" ]] && \
|
||||
|
@ -20,18 +20,18 @@ function main() {
|
|||
read -p "--> : " ANSR
|
||||
done
|
||||
case $ANSR in
|
||||
"0" ) do_all_run; break;;
|
||||
"1" ) do_all_run; break;;
|
||||
# First setup the debootstrap env...
|
||||
"1" ) ./step_1_debootstrap.sh; break;;
|
||||
"2" ) ./step_1_debootstrap.sh; break;;
|
||||
# Then setup and run chroot...
|
||||
"2" ) ./step_2_chroot.sh; break;;
|
||||
"3" ) ./step_2_chroot.sh; break;;
|
||||
# Create the boot structure data...
|
||||
"3" ) ./step_3_create_boot_structure.sh; break;;
|
||||
"4" ) ./step_3_create_boot_structure.sh; break;;
|
||||
# Create the CD...
|
||||
"4" ) ./step_4_create_CD.sh; break;;
|
||||
"5" ) ./step_4_create_CD.sh; break;;
|
||||
# Purge everythin and start fresh...
|
||||
"5" ) ./cleanup.sh; break;;
|
||||
"6" ) exit; break;;
|
||||
"6" ) ./cleanup.sh; break;;
|
||||
"0" ) exit; break;;
|
||||
* ) echo "Don't know how you got here but that's a bad sign..."; break;;
|
||||
esac
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue