remove loaded hooks and use main builds hooks
This commit is contained in:
parent
1c35eb6dde
commit
50b9f69828
|
@ -1,101 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
. /lib/live/config.sh
|
|
||||||
|
|
||||||
## live-config(7) - System Configuration Components
|
|
||||||
## Copyright (C) 2016-2020 The Debian Live team
|
|
||||||
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
|
|
||||||
##
|
|
||||||
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
|
|
||||||
## This is free software, and you are welcome to redistribute it
|
|
||||||
## under certain conditions; see COPYING for details.
|
|
||||||
|
|
||||||
|
|
||||||
#set -e
|
|
||||||
|
|
||||||
Cmdline ()
|
|
||||||
{
|
|
||||||
# Reading kernel command line
|
|
||||||
for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
|
|
||||||
do
|
|
||||||
case "${_PARAMETER}" in
|
|
||||||
live-config.user-default-groups=*|user-default-groups=*)
|
|
||||||
LIVE_USER_DEFAULT_GROUPS="${_PARAMETER#*user-default-groups=}"
|
|
||||||
;;
|
|
||||||
|
|
||||||
live-config.user-fullname=*|user-fullname=*)
|
|
||||||
LIVE_USER_FULLNAME="${_PARAMETER#*user-fullname=}"
|
|
||||||
;;
|
|
||||||
|
|
||||||
live-config.username=*|username=*)
|
|
||||||
LIVE_USERNAME="${_PARAMETER#*username=}"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
Init ()
|
|
||||||
{
|
|
||||||
# Checking if package is installed or already configured
|
|
||||||
if ! pkg_is_installed "user-setup" || \
|
|
||||||
component_was_executed "user-setup"
|
|
||||||
then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -n " user-setup"
|
|
||||||
}
|
|
||||||
|
|
||||||
Config ()
|
|
||||||
{
|
|
||||||
# Checking if package is already configured differently
|
|
||||||
if grep -q "^${LIVE_USERNAME}:" /etc/passwd
|
|
||||||
then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Adjust formating of groups
|
|
||||||
if [ -n "${LIVE_USER_DEFAULT_GROUPS}" ]
|
|
||||||
then
|
|
||||||
LIVE_USER_DEFAULT_GROUPS="$(echo ${LIVE_USER_DEFAULT_GROUPS} | sed -e 's|,| |g')"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make sure user is not in sudo group if sudo is disabled
|
|
||||||
case "${LIVE_CONFIG_NOROOT}" in
|
|
||||||
true)
|
|
||||||
LIVE_USER_DEFAULT_GROUPS="$(echo ${LIVE_USER_DEFAULT_GROUPS} | sed -e 's|sudo||')"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Default password is: live
|
|
||||||
# passwords can be generated with 'echo "live" | mkpasswd -s',
|
|
||||||
# a blank password is 'U6aMy0wojraho'.
|
|
||||||
# _PASSWORD="8Ab05sVQ4LLps"
|
|
||||||
_PASSWORD="U6aMy0wojraho"
|
|
||||||
|
|
||||||
cat > /tmp/live-config.cfg << EOF
|
|
||||||
user-setup passwd/make-user boolean true
|
|
||||||
user-setup passwd/root-password-crypted string *
|
|
||||||
user-setup passwd/user-password-crypted string ${_PASSWORD}
|
|
||||||
user-setup passwd/user-default-groups string ${LIVE_USER_DEFAULT_GROUPS}
|
|
||||||
user-setup passwd/user-fullname string ${LIVE_USER_FULLNAME}
|
|
||||||
user-setup passwd/username string ${LIVE_USERNAME}
|
|
||||||
user-setup passwd/user-uid string 1000
|
|
||||||
EOF
|
|
||||||
|
|
||||||
debconf-set-selections < /tmp/live-config.cfg
|
|
||||||
rm -f /tmp/live-config.cfg
|
|
||||||
|
|
||||||
# Workaround for bug in shadow
|
|
||||||
set +e
|
|
||||||
/usr/lib/user-setup/user-setup-apply 2>&1 \
|
|
||||||
| grep -v "Shadow passwords are now on"
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Creating state file
|
|
||||||
touch /var/lib/live/config/user-setup
|
|
||||||
}
|
|
||||||
|
|
||||||
Cmdline
|
|
||||||
Init
|
|
||||||
Config
|
|
|
@ -1,34 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Title: 0520-applications.hook.chroot
|
|
||||||
# Description: Script to remove packages and other things
|
|
||||||
# Author: manuel rosa <manuelsilvarosa@gmail.com>
|
|
||||||
# Date: Outubro 29, 2023
|
|
||||||
# License: GPL-3.0-or-later
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# Remove software
|
|
||||||
apt --purge --yes autoremove \
|
|
||||||
vim \
|
|
||||||
vim-tiny \
|
|
||||||
nautilus \
|
|
||||||
hv3 \
|
|
||||||
mpv \
|
|
||||||
murrine-themes \
|
|
||||||
konsole \
|
|
||||||
malcontent \
|
|
||||||
termit \
|
|
||||||
systemsettings \
|
|
||||||
nvidia* \
|
|
||||||
imagemagick*
|
|
||||||
|
|
||||||
# Lowers the footprint in RAM at the small expense of added size to the ISO.
|
|
||||||
#update-icon-caches /usr/share/icons/*
|
|
||||||
find /usr/share/icons -type d -exec gtk-update-icon-cache -f {} \;
|
|
||||||
|
|
||||||
#add flatpak repo to gnome-software
|
|
||||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
||||||
|
|
||||||
#add-architecture i386
|
|
||||||
dpkg --add-architecture i386
|
|
|
@ -1,20 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#git is needed for the git repos
|
|
||||||
apt install git --yes
|
|
||||||
#install pip3, needed for additional python modules
|
|
||||||
apt install --yes python3-pip
|
|
||||||
apt install --yes python3.11-venv
|
|
||||||
# Install the Luakit browser (used for pep tools)
|
|
||||||
apt install --yes luakit
|
|
||||||
|
|
||||||
# This will install hblock - a local ad-blocker utility
|
|
||||||
# https://github.com/hectorm/hblock
|
|
||||||
# This does not enable it. The user has the choice to turn it on
|
|
||||||
# by enabling it in PepHub or by typing 'hblock -S builtin' in terminal
|
|
||||||
curl https://raw.githubusercontent.com/hectorm/hblock/master/hblock --output /tmp/hblock
|
|
||||||
[ "$(sha256sum /tmp/hblock)" == "4031d86cd04fd7c6cb1b7e9acb1ffdbe9a3f84f693bfb287c68e1f1fa2c14c3b" ]
|
|
||||||
mv /tmp/hblock /usr/local/bin/hblock
|
|
||||||
chown 0:0 /usr/local/bin/hblock
|
|
||||||
chmod 755 /usr/local/bin/hblock
|
|
||||||
hblock -S none -D none exit 0
|
|
|
@ -1,21 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Installing symlinks in the chroot
|
|
||||||
# We might be changing directories with each symlink.
|
|
||||||
# Don't assume each instance will be from ~/ for the root user.
|
|
||||||
|
|
||||||
# These are for the 3 installer scripts - icons.sh, themes.sh & walls.sh
|
|
||||||
# In 0610- we set the permissions to 777 on the DIRECTORY, not the contents.
|
|
||||||
ln -s icons /usr/share/pepicons
|
|
||||||
ln -s themes /usr/share/pepthemes
|
|
||||||
ln -s backgrounds /usr/share/pepwallpaper
|
|
||||||
|
|
||||||
# A better version of vi and vim than vim-tiny
|
|
||||||
rm /etc/alternatives/vi
|
|
||||||
ln -s ../../etc/alternatives/vim /usr/bin/vim
|
|
||||||
ln -s ../../usr/bin/vim.tiny /etc/alternatives/vim
|
|
||||||
ln -s ../../usr/bin/busybox /etc/alternatives/vi
|
|
||||||
|
|
||||||
# Put a .png at ~/.face from within /etc/skel
|
|
||||||
#ln -s /usr/share/pixmaps/logo.png /etc/skel/.face
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Title: 0600-snap-show-menu-fix.hook.chroot
|
|
||||||
# Description: Workaround for using snapd on debian. Thank You - @stevesveryown and peppermint team..
|
|
||||||
# Author: manuel rosa <manuelsilvarosa@gmail.com>
|
|
||||||
# Date: Outubro 29, 2023
|
|
||||||
# License: GPL-3.0-or-later
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# Workaround for using snapd on debian. Thank You - @stevesveryown and peppermint team..
|
|
||||||
[ ! -e /etc/skel/.local/share ] && mkdir -p /etc/skel/.local/share
|
|
||||||
[ ! -e /var/lib/snapd/desktop/applications ] &&
|
|
||||||
mkdir -p /var/lib/snapd/desktop/applications &&
|
|
||||||
chmod 777 /var/lib/snapd/desktop/applications
|
|
||||||
ln -s /var/lib/snapd/desktop/applications /etc/skel/.local/share/applications
|
|
||||||
ln -s snap /usr/bin/snap-store
|
|
||||||
|
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# As we progress, we may find additional files REQUIRING special permissions.
|
|
||||||
# Set write permissions for these files and directories in the chroot here.
|
|
||||||
|
|
||||||
# This allows write access to the Welcome Screen database to users in the "cdrom" group.
|
|
||||||
# IF this a system wide file, one user can disable or turn it off for *ALL* accounts.
|
|
||||||
# If this is meant to be on a per user basis, put the .db in ${HOME}/.config .
|
|
||||||
# Or rewrite welcome.py to write to the .db WHICH user requested to disable this feature.
|
|
||||||
# Set Permissions on desktop files
|
|
||||||
# Desktop links
|
|
||||||
chmod 755 /usr/share/applications/Pephub.desktop
|
|
||||||
chmod 755 /usr/share/applications/Welcome.desktop
|
|
||||||
chmod 755 /usr/share/applications/plank.desktop
|
|
||||||
chmod 755 /usr/share/applications/kumo.desktop
|
|
||||||
chmod 755 /usr/share/applications/calamares-install-peppermint.desktop
|
|
||||||
# Executables
|
|
||||||
chmod 755 /usr/local/bin/hub
|
|
||||||
chmod 755 /usr/local/bin/xDaily
|
|
||||||
chmod 755 /usr/local/bin/kumo
|
|
||||||
chmod 755 /usr/local/bin/welcome
|
|
||||||
chmod 755 /usr/bin/install-peppermint
|
|
||||||
# Set permissions on the Python libs
|
|
||||||
chmod 755 -R /usr/lib/python3/dist-packages/tendo
|
|
||||||
chmod 755 -R /usr/lib/python3/dist-packages/tendo-0.3.0.dist-info
|
|
||||||
chmod 755 -R /usr/lib/python3/dist-packages/ttkbootstrap
|
|
||||||
chmod 755 -R /usr/lib/python3/dist-packages/ttkbootstrap-1.10.1.dist-info
|
|
||||||
chmod 755 -R /usr/lib/python3/dist-packages/ttkcreator
|
|
||||||
# Set permissions on the lines theme
|
|
||||||
chmod 755 -R /usr/share/desktop-base/lines-theme
|
|
||||||
# Set Grub Themes Permission
|
|
||||||
chmod 755 -R /boot/grub/themes
|
|
||||||
# Set the Calamares Permissions]
|
|
||||||
chmod 755 -R /etc/calamares
|
|
||||||
|
|
||||||
### After installation, additional groups to add new users to.
|
|
||||||
grep -B99 "#EXTRA_GROUPS=" /etc/adduser.conf > /etc/adduser.conf.new
|
|
||||||
grep "#EXTRA_GROUPS=" /etc/adduser.conf | cut -c2- >> /etc/adduser.conf.new
|
|
||||||
grep -B3 "#ADD_EXTRA_GROUPS=" /etc/adduser.conf >> /etc/adduser.conf.new
|
|
||||||
grep "#ADD_EXTRA_GROUPS=" /etc/adduser.conf | cut -c2- >> /etc/adduser.conf.new
|
|
||||||
grep -B3 "#NAME_REGEX=" /etc/adduser.conf >> /etc/adduser.conf.new
|
|
||||||
|
|
||||||
|
|
||||||
# These are for the 3 installer scripts - icons.sh, themes.sh & walls.sh
|
|
||||||
# In 0600- we created symlinks to these directories. This makes them writable.
|
|
||||||
chmod 755 -R /usr/share/icons
|
|
||||||
chmod 755 -R /usr/share/themes
|
|
||||||
chmod 755 -R /usr/share/backgrounds
|
|
||||||
chmod 755 -R /usr/share/pixmaps
|
|
||||||
|
|
||||||
# Quick patch from https://www.zdnet.com/article/major-linux-policykit-security-vulnerability-uncovered-pwnkit/
|
|
||||||
#chmod 0755 /usr/bin/pkexec # Their patch didn't work "pkexec must be setuid root"
|
|
||||||
|
|
||||||
|
|
|
@ -16,14 +16,24 @@ def apt_install_packages():
|
||||||
hook run ran ther then the general build
|
hook run ran ther then the general build
|
||||||
"""
|
"""
|
||||||
os.system('apt update')
|
os.system('apt update')
|
||||||
os.system('apt install --yes pepermint-wallpapers')
|
os.system('apt install --yes peppermint-wallpapers')
|
||||||
|
|
||||||
|
|
||||||
def remove_packages_from_the_build():
|
def remove_packages_from_the_build():
|
||||||
"""
|
"""
|
||||||
Uninstall unwanted packages from the build
|
Uninstall unwanted packages from the build
|
||||||
"""
|
"""
|
||||||
os.system('apt --purge --yes autoremove imagemagick-6.q16')
|
packages = [
|
||||||
|
'konsole',
|
||||||
|
'malcontent',
|
||||||
|
'systemsettings',
|
||||||
|
'nvidia*',
|
||||||
|
'imagemagick*'
|
||||||
|
]
|
||||||
|
|
||||||
|
for package in packages:
|
||||||
|
os.system(f'apt --purge --yes autoremove {package}')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def install_min_browser():
|
def install_min_browser():
|
||||||
|
|
|
@ -27,6 +27,7 @@ shared_setup_cmds = ('inflate_bubble.set_fusato_structure',
|
||||||
)
|
)
|
||||||
|
|
||||||
shared_setup_loaded_cmds = ('inflate_bubble.set_fusato_structure',
|
shared_setup_loaded_cmds = ('inflate_bubble.set_fusato_structure',
|
||||||
|
'inflate_bubble.set_fusato_installer_structure',
|
||||||
'inflate_bubble.set_general_shared',
|
'inflate_bubble.set_general_shared',
|
||||||
'inflate_bubble.set_grub_shared',
|
'inflate_bubble.set_grub_shared',
|
||||||
'inflate_bubble.set_binary_shared',
|
'inflate_bubble.set_binary_shared',
|
||||||
|
|
Loading…
Reference in New Issue