From 52a395e05dfc6658ba227360726e754864c3ee81 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Thu, 16 Nov 2017 13:36:18 -0500 Subject: add openrc config --- configs/profile/build.sh | 10 +- configs/profile/mkinitcpio.conf | 1 + configs/profile/packages/packages-openrc.both | 68 +++++ configs/profile/packages/packages-openrc.i686 | 0 configs/profile/packages/packages-openrc.x86_64 | 1 + configs/profile/packages/packages-systemd.both | 2 - configs/profile/root-image/etc/X11/Xwrapper.config | 2 + configs/profile/root-image/etc/conf.d/agetty.tty1 | 11 + configs/profile/root-image/etc/conf.d/hostname | 2 + configs/profile/root-image/etc/init.d/pacman-init | 31 +++ .../root-image/root/customize_root_image.sh | 51 +++- configs/profile/syslinux/splash.png | Bin 27496 -> 0 bytes configs/profile/syslinux/splash.svg | 284 --------------------- .../profile/syslinux/syslinux-splash-openrc.png | Bin 0 -> 32253 bytes .../profile/syslinux/syslinux-splash-systemd.png | Bin 0 -> 27496 bytes .../profile/syslinux/syslinux-splash-systemd.svg | 284 +++++++++++++++++++++ 16 files changed, 452 insertions(+), 295 deletions(-) create mode 100644 configs/profile/packages/packages-openrc.both create mode 100644 configs/profile/packages/packages-openrc.i686 create mode 100644 configs/profile/packages/packages-openrc.x86_64 create mode 100644 configs/profile/root-image/etc/X11/Xwrapper.config create mode 100644 configs/profile/root-image/etc/conf.d/agetty.tty1 create mode 100644 configs/profile/root-image/etc/conf.d/hostname create mode 100755 configs/profile/root-image/etc/init.d/pacman-init delete mode 100644 configs/profile/syslinux/splash.png delete mode 100644 configs/profile/syslinux/splash.svg create mode 100644 configs/profile/syslinux/syslinux-splash-openrc.png create mode 100644 configs/profile/syslinux/syslinux-splash-systemd.png create mode 100644 configs/profile/syslinux/syslinux-splash-systemd.svg (limited to 'configs/profile') diff --git a/configs/profile/build.sh b/configs/profile/build.sh index 8748efa..6a610d9 100755 --- a/configs/profile/build.sh +++ b/configs/profile/build.sh @@ -150,7 +150,7 @@ make_syslinux() { sed "s|%PARABOLAISO_LABEL%|${iso_label}|g; s|%INSTALL_DIR%|${iso_dirname}|g" ${_cfg} > ${work_dir}/iso/${iso_dirname}/boot/syslinux/${_cfg##*/} done - cp ${releng_dir}/syslinux/splash.png ${work_dir}/iso/${iso_dirname}/boot/syslinux + cp ${releng_dir}/syslinux/syslinux-splash-${iso_init}.png ${work_dir}/iso/${iso_dirname}/boot/syslinux/splash.png cp ${work_dir}/${arch}/root-image/usr/lib/syslinux/bios/*.c32 ${work_dir}/iso/${iso_dirname}/boot/syslinux cp ${work_dir}/${arch}/root-image/usr/lib/syslinux/bios/lpxelinux.0 ${work_dir}/iso/${iso_dirname}/boot/syslinux cp ${work_dir}/${arch}/root-image/usr/lib/syslinux/bios/memdisk ${work_dir}/iso/${iso_dirname}/boot/syslinux @@ -181,7 +181,9 @@ make_isolinux() { # Prepare /EFI make_efi() { mkdir -p ${work_dir}/iso/EFI/boot - cp ${work_dir}/x86_64/root-image/usr/lib/systemd/boot/efi/systemd-bootx64.efi ${work_dir}/iso/EFI/boot/bootx64.efi + if [[ "${iso_init}" == 'systemd' ]]; then + cp ${work_dir}/x86_64/root-image/usr/lib/systemd/boot/efi/systemd-bootx64.efi ${work_dir}/iso/EFI/boot/bootx64.efi + fi mkdir -p ${work_dir}/iso/loader/entries cp ${releng_dir}/efiboot/loader/loader.conf ${work_dir}/iso/loader/ @@ -218,7 +220,9 @@ make_efiboot() { cp ${work_dir}/iso/${iso_dirname}/boot/x86_64/parabolaiso.img ${work_dir}/efiboot-staging/EFI/parabolaiso/parabolaiso.img mkdir -p ${work_dir}/efiboot-staging/EFI/boot - cp ${work_dir}/x86_64/root-image/usr/lib/systemd/boot/efi/systemd-bootx64.efi ${work_dir}/efiboot-staging/EFI/boot/bootx64.efi + if [[ "${iso_init}" == 'systemd' ]]; then + cp ${work_dir}/x86_64/root-image/usr/lib/systemd/boot/efi/systemd-bootx64.efi ${work_dir}/efiboot-staging/EFI/boot/bootx64.efi + fi mkdir -p ${work_dir}/efiboot-staging/loader/entries cp ${releng_dir}/efiboot/loader/loader.conf ${work_dir}/efiboot-staging/loader/ diff --git a/configs/profile/mkinitcpio.conf b/configs/profile/mkinitcpio.conf index 1006d1d..fc2572b 100644 --- a/configs/profile/mkinitcpio.conf +++ b/configs/profile/mkinitcpio.conf @@ -1,2 +1,3 @@ +MODULES="loop" HOOKS="base udev memdisk parabolaiso_shutdown parabolaiso parabolaiso_loop_mnt parabolaiso_pxe_common parabolaiso_pxe_nbd parabolaiso_pxe_http parabolaiso_pxe_nfs parabolaiso_kms block pcmcia filesystems keyboard" COMPRESSION="xz" diff --git a/configs/profile/packages/packages-openrc.both b/configs/profile/packages/packages-openrc.both new file mode 100644 index 0000000..08d5909 --- /dev/null +++ b/configs/profile/packages/packages-openrc.both @@ -0,0 +1,68 @@ +# this file specifies the packages that are to be installed +# in all OpenRC live environments regardless of the graphical environment +# but these packages will not be installed with other init systems + + +arch-install-scripts +bash-completion +btrfs-progs +crda +darkhttpd +ddrescue +dhclient +dialog +dmraid +dnsmasq +dnsutils +dosfstools +elinks +ethtool +f2fs-tools +fsarchiver +gnu-netcat +gpm-openrc +gptfdisk +grub +haveged-openrc +hdparm-openrc +irssi +lftp +linux-atm +lynx +mc +mkinitcpio-paralogo +mtools +networkmanager-openrc +nfs-utils +nilfs-utils +nmap +ntfs-3g +ntp-openrc +openconnect +openssh-openrc +openvpn-openrc +p7zip +partclone +parted +partimage +pptpclient +ppp +rp-pppoe +rsync-openrc +smartmontools +sudo +tcpdump +testdisk +unar +unzip +usb_modeswitch +vpnc +wget +wireless_tools +wpa_actiond +wpa_supplicant-openrc +wvdial +xl2tpd +xterm +zile +zip diff --git a/configs/profile/packages/packages-openrc.i686 b/configs/profile/packages/packages-openrc.i686 new file mode 100644 index 0000000..e69de29 diff --git a/configs/profile/packages/packages-openrc.x86_64 b/configs/profile/packages/packages-openrc.x86_64 new file mode 100644 index 0000000..804cc93 --- /dev/null +++ b/configs/profile/packages/packages-openrc.x86_64 @@ -0,0 +1 @@ +refind-efi diff --git a/configs/profile/packages/packages-systemd.both b/configs/profile/packages/packages-systemd.both index 998eaeb..65b33c1 100644 --- a/configs/profile/packages/packages-systemd.both +++ b/configs/profile/packages/packages-systemd.both @@ -46,8 +46,6 @@ parted partimage pptpclient ppp -# TODO: Bug #1512 - rfkill and util-linux are in conflict -# rfkill rp-pppoe rsync smartmontools diff --git a/configs/profile/root-image/etc/X11/Xwrapper.config b/configs/profile/root-image/etc/X11/Xwrapper.config new file mode 100644 index 0000000..7483aaf --- /dev/null +++ b/configs/profile/root-image/etc/X11/Xwrapper.config @@ -0,0 +1,2 @@ +# Xorg.wrap configuation file +needs_root_rights = yes diff --git a/configs/profile/root-image/etc/conf.d/agetty.tty1 b/configs/profile/root-image/etc/conf.d/agetty.tty1 new file mode 100644 index 0000000..b7ff06d --- /dev/null +++ b/configs/profile/root-image/etc/conf.d/agetty.tty1 @@ -0,0 +1,11 @@ +# Set the baud rate of the terminal line +baud="38400" + +# set the terminal type +term_type="linux" + +# extra options to pass to agetty for this port +agetty_options="--autologin root --noclear" + +# make agetty quiet +#quiet="no" diff --git a/configs/profile/root-image/etc/conf.d/hostname b/configs/profile/root-image/etc/conf.d/hostname new file mode 100644 index 0000000..a701f0c --- /dev/null +++ b/configs/profile/root-image/etc/conf.d/hostname @@ -0,0 +1,2 @@ +# Set to the hostname of this machine +hostname="parabolaiso" diff --git a/configs/profile/root-image/etc/init.d/pacman-init b/configs/profile/root-image/etc/init.d/pacman-init new file mode 100755 index 0000000..b610683 --- /dev/null +++ b/configs/profile/root-image/etc/init.d/pacman-init @@ -0,0 +1,31 @@ +#!/usr/bin/openrc-run +# Copyright (C) 2017 Parabola Project +# Copyright (C) Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Initializes Pacman keyring" + +depend() { + use haveged + after haveged +} + +start() { + # Check that there's no keyring, if there isn't, create one + # in the background for a faster boot + if [ ! -d /etc/pacman.d/gnupg ]; then + ebegin "Starting Pacman keyring" + pacman-key --init &> /dev/null && + pacman-key --populate archlinux parabola &> /dev/null + else + ebegin "Pacman keyring already started" + fi +} + +stop() { + # If there's a keyring, delete it + if [ -d /etc/pacman.d/gnupg ]; then + ebegin "Stoping Pacman keyring" + rm -rf /etc/pacman.d/gnupg + fi +} diff --git a/configs/profile/root-image/root/customize_root_image.sh b/configs/profile/root-image/root/customize_root_image.sh index 8d0b7b0..505bf3d 100755 --- a/configs/profile/root-image/root/customize_root_image.sh +++ b/configs/profile/root-image/root/customize_root_image.sh @@ -2,10 +2,16 @@ readonly DEV_RELEASE=1 # 1 for development builds - 0 for production builds readonly REPOS='libre core extra community pcr' -readonly SYSTEMD_SERVICES_ALL="multi-user.target \ - pacman-init.service \ - choose-mirror.service " +readonly SYSTEMD_SERVICES_ALL="choose-mirror.service \ + multi-user.target \ + pacman-init.service " readonly SYSTEMD_SERVICES_GUI="NetworkManager.service" +readonly OPENRC_SERVICES_ALL="dbus \ + haveged \ + NetworkManager \ + pacman-init " +readonly OPENRC_SERVICES_GUI="alsasound \ + elogind " 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\ @@ -20,6 +26,9 @@ readonly ROOT_SKEL_FILES="/etc/skel/.automated_script.sh \ /etc/skel/.bash_profile " 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}" || + readonly USER_GROUPS="${LIVE_USER_GROUPS}" [ "${enable_offline_install}" == 'true' ] && readonly INSTALL_TYPE="Complete" || \ readonly INSTALL_TYPE="NetInstall" readonly WELCOME_TITLE="Parabola ${iso_init}/${iso_wm} Edition - (${INSTALL_TYPE})" @@ -28,11 +37,15 @@ readonly WELCOME_TITLE="Parabola ${iso_init}/${iso_wm} Edition - (${INSTALL_TYPE set -e -u # configure locales -ln -sf /usr/share/zoneinfo/UTC /etc/localtime +ln -sf /usr/share/zoneinfo/UTC /etc/localtime sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen sed -i 's/#\(es_ES\.UTF-8\)/\1/' /etc/locale.gen sed -i 's/#\(gl_ES\.UTF-8\)/\1/' /etc/locale.gen sed -i 's/#\(pt_BR\.UTF-8\)/\1/' /etc/locale.gen +sed -i 's/#\(pl_PL\.UTF-8\)/\1/' /etc/locale.gen +sed -i 's/#\(it_IT\.UTF-8\)/\1/' /etc/locale.gen +sed -i 's/#\(fr_FR\.UTF-8\)/\1/' /etc/locale.gen +sed -i 's/#\(eo\)/\1/' /etc/locale.gen locale-gen # configure sudo @@ -58,7 +71,32 @@ echo "Server = https://parabola.isacdaavid.info:8081/\$repo/os/\$arch" > /etc/pa # configure services if [[ "${iso_init}" == 'systemd' ]] then systemctl enable ${SYSTEMD_SERVICES_ALL} + # delete files that are specific to other init systems + rm /etc/conf.d/agetty.tty1 + rm /etc/conf.d/hostname + rm /etc/init.d/pacman-init + rm /etc/X11/Xwrapper.config + + # enable services [[ "${iso_wm}" != 'cli' ]] && systemctl enable ${SYSTEMD_SERVICES_GUI} +elif [[ "${iso_init}" == 'openrc' ]] + # delete files that are specific to other init systems + rm /etc/hostname + rm /etc/systemd/scripts/choose-mirror + rm /etc/systemd/system/choose-mirror.service + rm /etc/systemd/system/etc-pacman.d-gnupg.mount + rm /etc/systemd/system/getty@tty1.service.d/autologin.conf + rm /etc/systemd/system/pacman-init.service + + # enable services + for service in ${OPENRC_SERVICES_ALL} ; do rc-update add ${service} default ; done ; + if [[ "${iso_wm}" != 'cli' ]] + then for service in ${OPENRC_SERVICES_GUI} ; do rc-update add ${service} default ; done ; + fi + + # 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 ; fi # configure root user @@ -72,10 +110,11 @@ then cp ${ROOT_SKEL_FILES} /root/ sed -i "s|_DESKTOP_SESSION_||" /root/.bash_profile else # configure GUI login session and live user - [ -n "$(id ${LIVE_USER} 2> /dev/null)" ] && userdel -r ${LIVE_USER} 2> /dev/null - useradd -m -p "" -g users -G "$LIVE_USER_GROUPS" -s ${DEFAULT_SHELL} ${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 + else sed -i "s|--autologin root|--autologin ${LIVE_USER}|" /etc/conf.d/agetty.tty1 fi # configure desktop environment diff --git a/configs/profile/syslinux/splash.png b/configs/profile/syslinux/splash.png deleted file mode 100644 index 03e9f19..0000000 Binary files a/configs/profile/syslinux/splash.png and /dev/null differ diff --git a/configs/profile/syslinux/splash.svg b/configs/profile/syslinux/splash.svg deleted file mode 100644 index c1b225e..0000000 --- a/configs/profile/syslinux/splash.svg +++ /dev/null @@ -1,284 +0,0 @@ - - - Parabola GNU/Linux-libre - - - - image/svg+xml - - Parabola GNU/Linux-libre - - 2015/02/28 - - - Jorge Araya Navarro + José Miguel Silva Lara - - - - - Márcio Alexandre Silva Delgado - - - - - CC BY-SA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/configs/profile/syslinux/syslinux-splash-openrc.png b/configs/profile/syslinux/syslinux-splash-openrc.png new file mode 100644 index 0000000..ff1342f Binary files /dev/null and b/configs/profile/syslinux/syslinux-splash-openrc.png differ diff --git a/configs/profile/syslinux/syslinux-splash-systemd.png b/configs/profile/syslinux/syslinux-splash-systemd.png new file mode 100644 index 0000000..03e9f19 Binary files /dev/null and b/configs/profile/syslinux/syslinux-splash-systemd.png differ diff --git a/configs/profile/syslinux/syslinux-splash-systemd.svg b/configs/profile/syslinux/syslinux-splash-systemd.svg new file mode 100644 index 0000000..c1b225e --- /dev/null +++ b/configs/profile/syslinux/syslinux-splash-systemd.svg @@ -0,0 +1,284 @@ + + + Parabola GNU/Linux-libre + + + + image/svg+xml + + Parabola GNU/Linux-libre + + 2015/02/28 + + + Jorge Araya Navarro + José Miguel Silva Lara + + + + + Márcio Alexandre Silva Delgado + + + + + CC BY-SA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.2