summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigs/profile/build.sh13
-rw-r--r--configs/profile/packages/cache-lxde.all1
-rw-r--r--configs/profile/packages/packages-gui.all2
-rw-r--r--configs/profile/packages/packages-lxde.all1
-rw-r--r--configs/profile/packages/packages-openrc.x86_644
-rw-r--r--configs/profile/packages/packages-systemd.x86_643
-rw-r--r--configs/profile/root-image/etc/skel/Desktop/parabola-installer.desktop2
-rw-r--r--configs/profile/root-image/root/customize_root_image-constants.inc61
-rwxr-xr-xconfigs/profile/root-image/root/customize_root_image.sh97
9 files changed, 110 insertions, 74 deletions
diff --git a/configs/profile/build.sh b/configs/profile/build.sh
index 4752c64..eb668bd 100755
--- a/configs/profile/build.sh
+++ b/configs/profile/build.sh
@@ -184,6 +184,7 @@ make_packages() {
# Copy mkinitcpio parabolaiso hooks and build initramfs (root-image)
make_setup_mkinitcpio() {
local _hook
+
for _hook in parabolaiso parabolaiso_shutdown parabolaiso_pxe_common parabolaiso_pxe_nbd parabolaiso_pxe_http parabolaiso_pxe_nfs parabolaiso_loop_mnt; do
cp ${initcpio_dir}/hooks/${_hook} ${work_dir}/${arch}/root-image/usr/lib/initcpio/hooks
cp ${initcpio_dir}/install/${_hook} ${work_dir}/${arch}/root-image/usr/lib/initcpio/install
@@ -196,15 +197,13 @@ make_setup_mkinitcpio() {
# Customize installation (root-image)
make_customize_root_image() {
-
cp -af ${releng_dir}/root-image ${work_dir}/${arch}
echo "Customizing root image"
- arch="${arch}" \
- iso_title="${iso_title}" \
- iso_init="${iso_init}" \
- iso_gui="${iso_gui}" \
- enable_offline_install="${enable_offline_install}" \
+ ISO_TITLE="${iso_title}" \
+ ISO_INIT="${iso_init}" \
+ ISO_GUI="${iso_gui}" \
+ ENABLE_OFFLINE_INSTALL="${enable_offline_install}" \
setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} \
-C ${pacman_conf} \
-D ${iso_dirname} \
@@ -420,7 +419,7 @@ out_dir=${out_dir// /}
pacman_conf=${pacman_conf// /}
# validate build environment
-if [[ "$(uname -m)" != 'x86_64' ]] || ! grep 'ID_LIKE=.*archlinux' /usr/lib/os-release > /dev/null; then
+if [[ "$(uname -m)" != 'x86_64' ]] || ! grep 'ID_LIKE="*arch' /usr/lib/os-release > /dev/null; then
LOG_ERROR "This script needs to be run on an x86_64 ArchLinux derrivative."
exit 1
elif [[ ${EUID} -ne 0 ]]; then
diff --git a/configs/profile/packages/cache-lxde.all b/configs/profile/packages/cache-lxde.all
index a44bccc..54fe550 100644
--- a/configs/profile/packages/cache-lxde.all
+++ b/configs/profile/packages/cache-lxde.all
@@ -2,4 +2,5 @@
# and cached in the /isorepo directory for offline install in all live environments
# regardless of the architecture, init system, or graphical environment
+
lxdm-gtk3
diff --git a/configs/profile/packages/packages-gui.all b/configs/profile/packages/packages-gui.all
index b5aceb1..b85b68b 100644
--- a/configs/profile/packages/packages-gui.all
+++ b/configs/profile/packages/packages-gui.all
@@ -63,6 +63,8 @@ wbar
# Xserver
ttf-dejavu
+xf86-input-elographics
+xf86-input-wacom
xf86-video-sisusb
xorg-drivers
xorg-server
diff --git a/configs/profile/packages/packages-lxde.all b/configs/profile/packages/packages-lxde.all
index f047788..bb65204 100644
--- a/configs/profile/packages/packages-lxde.all
+++ b/configs/profile/packages/packages-lxde.all
@@ -23,7 +23,6 @@ lxrandr-gtk3
lxsession-gtk3
lxtask-gtk3
lxterminal
-openbox
obconf
pcmanfm-gtk3
xarchiver
diff --git a/configs/profile/packages/packages-openrc.x86_64 b/configs/profile/packages/packages-openrc.x86_64
index 804cc93..177733e 100644
--- a/configs/profile/packages/packages-openrc.x86_64
+++ b/configs/profile/packages/packages-openrc.x86_64
@@ -1 +1,3 @@
-refind-efi
+# this file specifies the packages that are to be installed
+# in all x86_64 OpenRC live environments regardless of the graphical environment
+# but these packages will not be installed with other init systems or for other architectures
diff --git a/configs/profile/packages/packages-systemd.x86_64 b/configs/profile/packages/packages-systemd.x86_64
index ed21183..589aa78 100644
--- a/configs/profile/packages/packages-systemd.x86_64
+++ b/configs/profile/packages/packages-systemd.x86_64
@@ -1,6 +1,3 @@
# this file specifies the packages that are to be installed
# in all x86_64 SystemD live environments regardless of the graphical environment
# but these packages will not be installed with other init systems or for other architectures
-
-
-refind-efi
diff --git a/configs/profile/root-image/etc/skel/Desktop/parabola-installer.desktop b/configs/profile/root-image/etc/skel/Desktop/parabola-installer.desktop
index 89eb06c..a5d96b6 100644
--- a/configs/profile/root-image/etc/skel/Desktop/parabola-installer.desktop
+++ b/configs/profile/root-image/etc/skel/Desktop/parabola-installer.desktop
@@ -9,7 +9,7 @@ Name[pt_BR]=Instalador do Parabola
GenericName=System Installer
Keywords=calamares;system;installer
TryExec=calamares
-Exec=pkexec /usr/bin/calamares
+Exec=sudo /usr/bin/calamares
Comment=Distribution-independent installer framework - Parabola edition
Icon=calamares
Terminal=false
diff --git a/configs/profile/root-image/root/customize_root_image-constants.inc b/configs/profile/root-image/root/customize_root_image-constants.inc
index d0359a6..d02e3cc 100644
--- a/configs/profile/root-image/root/customize_root_image-constants.inc
+++ b/configs/profile/root-image/root/customize_root_image-constants.inc
@@ -1,3 +1,10 @@
+# environment vars from build.sh:
+# ISO_TITLE
+# ISO_INIT
+# ISO_GUI
+# ENABLE_OFFLINE_INSTALL
+
+
readonly LOCALES="en_US\.UTF-8 \
eo \
es_ES\.UTF-8 \
@@ -6,48 +13,58 @@ readonly LOCALES="en_US\.UTF-8 \
it_IT\.UTF-8 \
pt_BR\.UTF-8 \
pl_PL\.UTF-8 "
-readonly SYSTEMD_DELETE_FILES="/etc/conf.d/agetty.tty1 \
- /etc/conf.d/hostname \
- /etc/init.d/pacman-init \
- /etc/X11/Xwrapper.config"
+
readonly OPENRC_DELETE_FILES="/etc/hostname \
/etc/systemd/scripts/choose-mirror \
/etc/systemd/system/choose-mirror.service \
/etc/systemd/system/etc-pacman.d-gnupg.mount \
/etc/systemd/system/getty@tty1.service.d/autologin.conf \
/etc/systemd/system/pacman-init.service "
-readonly SYSTEMD_SERVICES_ALL="choose-mirror.service \
- multi-user.target \
- pacman-init.service "
-readonly SYSTEMD_SERVICES_GUI="NetworkManager.service"
+readonly SYSTEMD_DELETE_FILES="/etc/conf.d/agetty.tty1 \
+ /etc/conf.d/hostname \
+ /etc/init.d/pacman-init \
+ /etc/X11/Xwrapper.config"
+
readonly OPENRC_SERVICES_ALL="dbus \
haveged \
NetworkManager \
pacman-init "
readonly OPENRC_SERVICES_GUI="alsasound \
elogind "
-[[ "${iso_gui}" == 'cli' ]] && readonly OPENRC_SERVICES="${OPENRC_SERVICES_ALL}" ||
- readonly OPENRC_SERVICES="${OPENRC_SERVICES_ALL} ${OPENRC_SERVICES_GUI}"
-[[ "${iso_gui}" == 'cli' ]] && readonly SYSTEMD_SERVICES="${SYSTEMD_SERVICES_ALL}" ||
- readonly SYSTEMD_SERVICES="${SYSTEMD_SERVICES_ALL} ${SYSTEMD_SERVICES_GUI}"
-[ "${enable_offline_install}" == 'true' ] && readonly INSTALL_TYPE='Complete' || \
- readonly INSTALL_TYPE='NetInstall'
+readonly SYSTEMD_SERVICES_ALL="choose-mirror.service \
+ multi-user.target \
+ pacman-init.service "
+readonly SYSTEMD_SERVICES_GUI="NetworkManager.service"
+readonly OPENRC_SERVICES="${OPENRC_SERVICES_ALL} \
+ $([[ "${ISO_GUI}" != 'cli' ]] && echo " ${OPENRC_SERVICES_GUI}")"
+readonly SYSTEMD_SERVICES="${SYSTEMD_SERVICES_ALL} \
+ $([[ "${ISO_GUI}" != 'cli' ]] && echo " ${SYSTEMD_SERVICES_GUI}")"
+
readonly DEFAULT_SHELL=/bin/bash
+
readonly NETINSTALL_MSG="To install Parabola, the system must be connected to the internet."
readonly COMPLETE_MSG="This ISO is capable of installing a complete Parabola system\n\
->>>>without a connection to the internet. If you would like to fetch\n\
->>>>the latest packages from the internet, run the following command\n\
->>>>before beginning the install:\n\
- # cp /etc/pacman-online.conf /etc/pacman.conf"
-[ "${INSTALL_TYPE}" == 'Complete' ] && readonly NETWORK_MOTD_MSG=${NETINSTALL_MSG} || \
- readonly NETWORK_MOTD_MSG=${COMPLETE_MSG}
+ without a connection to the internet.\n\
+ To fetch packages from the internet, enter this command first:\n\
+ # cp /etc/pacman-online.conf /etc/pacman.conf"
+if [[ "${ENABLE_OFFLINE_INSTALL}" == 'true' ]]
+then readonly INSTALL_TYPE='Complete' ; readonly NETWORK_MOTD_MSG=${COMPLETE_MSG} ;
+else readonly INSTALL_TYPE='NetInstall' ; readonly NETWORK_MOTD_MSG=${NETINSTALL_MSG} ;
+fi
+
readonly ROOT_SKEL_FILES="/etc/skel/.bash_logout \
/etc/skel/.bash_profile \
/etc/skel/install-openrc-lxde.sh \
/etc/skel/install-systemd-mate.sh"
+
readonly LIVE_USER=parabola
readonly LIVE_USER_GROUPS="adm,audio,floppy,log,network,rfkill,scanner,storage,optical,power,wheel"
readonly OPENRC_USER_GROUPS="disk,sys"
-[[ "${iso_init}" == 'openrc' ]] && readonly USER_GROUPS="${LIVE_USER_GROUPS},${OPENRC_USER_GROUPS}" ||
+[[ "${ISO_INIT}" == 'openrc' ]] && readonly USER_GROUPS="${LIVE_USER_GROUPS},${OPENRC_USER_GROUPS}" ||
readonly USER_GROUPS="${LIVE_USER_GROUPS}"
-readonly PRETTY_NAME="$(echo ${iso_title} | cut -d ' ' -f -5) - (${INSTALL_TYPE})"
+
+readonly OS_PRETTY_NAME="$(echo ${ISO_TITLE} | cut -d ' ' -f -5) - (${INSTALL_TYPE})"
+readonly OS_VERSION=$( echo ${ISO_TITLE} | cut -d ' ' -f 6 )
+readonly OS_VERSION_ID=$( echo ${ISO_TITLE} | cut -d ' ' -f 6 )
+readonly OS_VARIANT="$( echo ${OS_PRETTY_NAME} | cut -d ' ' -f -3 --complement )"
+readonly OS_VARIANT_ID=${ISO_INIT}-${ISO_GUI}
diff --git a/configs/profile/root-image/root/customize_root_image.sh b/configs/profile/root-image/root/customize_root_image.sh
index 2a2886c..0444bbb 100755
--- a/configs/profile/root-image/root/customize_root_image.sh
+++ b/configs/profile/root-image/root/customize_root_image.sh
@@ -6,28 +6,28 @@ set -e -u
source /root/customize_root_image-constants.inc
-# configure timezone and locales
+# configure timezone and locales #
+
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
for locale in ${LOCALES} ; do sed -i "s/#${locale}/${locale}/" /etc/locale.gen ; done ;
locale-gen
-# configure sudo
+
+# configure sudo #
+
chmod 750 /etc/sudoers.d
chmod 440 /etc/sudoers.d/g_wheel
-# configure pacman
+
+# configure pacman #
+
sed -i "s|#Server|Server|" /etc/pacman.d/mirrorlist
-[ "${INSTALL_TYPE}" == 'Complete' ] && pacman_conf=pacman-offline.conf || pacman_conf=pacman-online.conf
-cp /etc/${pacman_conf} /etc/pacman.conf
+[ "${INSTALL_TYPE}" == 'Complete' ] && cp /etc/pacman-offline.conf /etc/pacman.conf || \
+ cp /etc/pacman-online.conf /etc/pacman.conf
-# configure services
-if [[ "${iso_init}" == 'systemd' ]]
-then # delete files that are specific to other init systems
- rm ${SYSTEMD_DELETE_FILES}
+# configure services #
- # enable services
- systemctl enable ${SYSTEMD_SERVICES}
-elif [[ "${iso_init}" == 'openrc' ]]
+if [[ "${ISO_INIT}" == 'openrc' ]]
then # delete files that are specific to other init systems
rm ${OPENRC_DELETE_FILES}
@@ -37,53 +37,72 @@ then # delete files that are specific to other init systems
# create the dbus user and group if it does not exist
if [[ "$(grep 'dbus' /etc/group )" = "" ]] ; then groupadd -g 81 dbus ; fi ;
if [[ "$(grep 'dbus' /etc/passwd)" = "" ]] ; then useradd -r -s /sbin/nologin -g 81 -u 81 dbus ; fi ;
-else echo "invalid \$iso_init for services '${iso_init}'"
+
+elif [[ "${ISO_INIT}" == 'systemd' ]]
+then # delete files that are specific to other init systems
+ rm ${SYSTEMD_DELETE_FILES}
+
+ # enable services
+ systemctl enable ${SYSTEMD_SERVICES}
+
+else echo "invalid \$ISO_INIT for services '${ISO_INIT}'"
exit 1
fi
-# configure root user, system defaults, and login session
+
+# configure root user, system defaults, and login session #
+
usermod -s ${DEFAULT_SHELL} root 2> /dev/null
-sed -i "s|_EDITION_TITLE_|${iso_title}|" /etc/motd
-sed -i "s|_NETWORK_MOTD_MSG_|${NETWORK_MOTD_MSG}| ; s|^>>>>\(.*\)| \1|g" /etc/motd
-sed -i "s|PRETTY_NAME=.*|PRETTY_NAME=\"${PRETTY_NAME}\"|" /usr/lib/os-release
-echo "VERSION=\"$( echo ${iso_title} | cut -d ' ' -f 6 )\"" >> /usr/lib/os-release
-echo "VERSION_ID=\"$(echo ${iso_title} | cut -d ' ' -f 6 )\"" >> /usr/lib/os-release
-echo "VARIANT=\"$( echo ${PRETTY_NAME} | cut -d ' ' -f -3 --complement)\"" >> /usr/lib/os-release
-echo "VARIANT_ID=\"${iso_init}-${iso_gui}\"" >> /usr/lib/os-release
-
-# configure CLI login session
-if [[ "${iso_gui}" == 'cli' ]]
-then cp ${ROOT_SKEL_FILES} /root/
+sed -i "s|_EDITION_TITLE_|${ISO_TITLE}|" /etc/motd
+sed -i "s|_NETWORK_MOTD_MSG_|${NETWORK_MOTD_MSG}|" /etc/motd
+sed -i "s|PRETTY_NAME=.*|PRETTY_NAME=\"${OS_PRETTY_NAME}\"|" /usr/lib/os-release
+echo "VERSION=\"${OS_VERSION}\"" >> /usr/lib/os-release
+echo "VERSION_ID=\"${OS_VERSION_ID}\"" >> /usr/lib/os-release
+echo "VARIANT=\"${OS_VARIANT}\"" >> /usr/lib/os-release
+echo "VARIANT_ID=\"${OS_VARIANT_ID}\"" >> /usr/lib/os-release
+
+
+# configure login session #
+
+if [[ "${ISO_GUI}" == 'cli' ]]
+then # configure CLI login session
+ cp ${ROOT_SKEL_FILES} /root/
sed -i "s|_DESKTOP_SESSION_||" /root/.bash_profile
else # configure GUI login session and live user
+
+ # configure live user
[[ -n "$(id ${LIVE_USER} 2> /dev/null)" ]] && userdel -r ${LIVE_USER} 2> /dev/null
useradd -m -p "" -g users -G "${USER_GROUPS}" -s ${DEFAULT_SHELL} ${LIVE_USER}
- if [[ "${iso_init}" == 'systemd' ]]
- then sed -i "s|--autologin root|--autologin ${LIVE_USER}|" /etc/systemd/system/getty@tty1.service.d/autologin.conf
- elif [[ "${iso_init}" == 'openrc' ]]
+
+ # configure auto-login
+ if [[ "${ISO_INIT}" == 'openrc' ]]
then sed -i "s|--autologin root|--autologin ${LIVE_USER}|" /etc/conf.d/agetty.tty1
- else echo "invalid \$iso_init for --autologin '${iso_init}'"
+
+ elif [[ "${ISO_INIT}" == 'systemd' ]]
+ then sed -i "s|--autologin root|--autologin ${LIVE_USER}|" /etc/systemd/system/getty@tty1.service.d/autologin.conf
fi
# configure welcome news alert
- sed -i "s|_EDITION_TITLE_|${PRETTY_NAME}|" /usr/bin/autostart.sh
- sed -i "s|,Don't show this again:0||" /usr/bin/autostart.sh
- sed -i "s|620x460|620x520|" /usr/bin/autostart.sh
+ sed -i "s|_EDITION_TITLE_|${OS_PRETTY_NAME}| ; \
+ s|,Don't show this again:0|| ; \
+ s|620x460|620x520| " /usr/bin/autostart.sh
# configure desktop environment
sed -i "s|/issue-tracker/|/isos/|" /home/${LIVE_USER}/Desktop/bug-tracker.desktop
- if [[ "${iso_gui}" == 'lxde' ]]
- then rm -f /etc/xdg/autostart/octopi-notifier.desktop 2> /dev/null
- touch /home/${LIVE_USER}/Desktop/parabola-installer.desktop ; sleep 2 ; # sort
- touch /home/${LIVE_USER}/Desktop/parabola-irc.desktop ; sleep 2 ; # sort
- touch /home/${LIVE_USER}/Desktop/bug-tracker.desktop # sort
+ if [[ "${ISO_GUI}" == 'lxde' ]]
+ then rm -f /etc/xdg/autostart/octopi-notifier.desktop 2> /dev/null # FIXME: issue #1850
+ for desktop_file in parabola-installer.desktop parabola-irc.desktop bug-tracker.desktop
+ do sleep 2 ; touch /home/${LIVE_USER}/Desktop/${desktop_file} ; # sort
+ done
sed -i "s|_DESKTOP_SESSION_|LXDE|" /home/${LIVE_USER}/.bash_profile
sed -i "s|_DESKTOP_SESSION_|LXDE|" /home/${LIVE_USER}/.dmrc
- elif [[ "${iso_gui}" == 'mate' ]]
+
+ elif [[ "${ISO_GUI}" == 'mate' ]]
then sed -i "s|_DESKTOP_SESSION_|mate|" /home/${LIVE_USER}/.bash_profile
sed -i "s|_DESKTOP_SESSION_|mate|" /home/${LIVE_USER}/.dmrc
- else echo "invalid \$iso_gui for _DESKTOP_SESSION_ '${iso_gui}'"
+
+ else echo "invalid \$ISO_GUI for _DESKTOP_SESSION_ '${ISO_GUI}'"
exit 1
fi
fi