From dcc19a73bf4a015ce9eed075cd51fea3f1e970a3 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Sun, 1 Jul 2018 04:42:20 -0400 Subject: squashme - braille --- configs/profile/build.sh | 7 ++++++- configs/profile/rebuild.sh | 4 +++- configs/profile/root-image/etc/skel/.bash_profile | 3 ++- .../root/customize_root_image-constants.inc | 20 +++++++++++++------- .../profile/root-image/root/customize_root_image.sh | 17 ++++++++++------- docs/README.build | 20 ++++++++++---------- 6 files changed, 44 insertions(+), 27 deletions(-) diff --git a/configs/profile/build.sh b/configs/profile/build.sh index 20deb91..a20824e 100755 --- a/configs/profile/build.sh +++ b/configs/profile/build.sh @@ -17,6 +17,7 @@ iso_version=$(date +%Y.%m.%d) iso_label="PARA_$(date +%Y%m)" iso_dirname='parabola' enable_offline_install='false' +enable_tts_brltty='false' offline_switch='' work_dir=./work out_dir=./out/$(echo "${iso_edition}-${iso_version}" | tr '[:upper:]/' '[:lower:]-') @@ -50,6 +51,8 @@ _usage () echo " Default: ${iso_dirname}" echo " -O Enable offline install." echo " Default: '${enable_offline_install}'" + echo " -S Enable speech and braille." + echo " Default: '${enable_tts_brltty}'" echo " -C Specify the pacman.conf file used for chroot install." echo " Default: '${pacman_conf}'" echo " -w Set the working directory" @@ -205,6 +208,7 @@ make_customize_root_image() { ISO_INIT="${iso_init}" \ ISO_GUI="${iso_gui}" \ ENABLE_OFFLINE_INSTALL="${enable_offline_install}" \ + ENABLE_TTS_BRLTTY="${enable_tts_brltty}" \ setarch ${arch} mkparabolaiso ${verbose} -w ${work_dir}/${arch} \ -C ${pacman_conf} \ -D ${iso_dirname} \ @@ -359,7 +363,7 @@ make_iso() { ## prepare state ## # set CLI options -while getopts 'E:T:V:L:D:OC:w:o:vh' arg; do +while getopts 'E:T:V:L:D:OSC:w:o:vh' arg; do case "${arg}" in E) iso_edition="${OPTARG}" ;; T) target="${OPTARG}" ;; @@ -367,6 +371,7 @@ while getopts 'E:T:V:L:D:OC:w:o:vh' arg; do L) iso_label="${OPTARG}" ;; D) iso_dirname="${OPTARG}" ;; O) enable_offline_install='true' offline_switch='-O' ;; + S) enable_tts_brltty='true' ;; C) pacman_conf="${OPTARG}" ;; w) work_dir="${OPTARG}" ;; o) out_dir="${OPTARG}" ;; diff --git a/configs/profile/rebuild.sh b/configs/profile/rebuild.sh index 87c8143..416b947 100755 --- a/configs/profile/rebuild.sh +++ b/configs/profile/rebuild.sh @@ -11,6 +11,8 @@ readonly TARGET='dual' # dual-arch (default) # readonly EDITION='OpenRC/LXDE' # OpenRC/LXDE init/WM-DE pair readonly EDITION='SystemD/CLI' # SystemD/CLI init/WM-DE pair (default) # readonly EDITION='SystemD/LXDE' # SystemD/LXDE init/WM-DE pair +readonly TALKING='' # speech and braille disabled (default) +# readonly TALKING='-S' # speech and braille enabled readonly CACHE='' # net-install (default) # readonly CACHE='-O' # offline install readonly VERSION="`date +%Y.%m.%d`" # for ISO filename (default) @@ -67,7 +69,7 @@ then rm work/build.make_customize_root_image_$TARGET \ fi -CMD="./build.sh -v -E $EDITION -T $TARGET $CACHE -V $VERSION $*" +CMD="./build.sh -v -E $EDITION -T $TARGET $TALKING $CACHE -V $VERSION $*" if ${CMD} then echo "success" ; rm ./continue.sh 2> /dev/null else echo -e "failure executing:\n\t${CMD}\ncontinue with:\n\t./continue.sh [args-to-build.sh]" diff --git a/configs/profile/root-image/etc/skel/.bash_profile b/configs/profile/root-image/etc/skel/.bash_profile index 5a4b1b2..3698904 100644 --- a/configs/profile/root-image/etc/skel/.bash_profile +++ b/configs/profile/root-image/etc/skel/.bash_profile @@ -9,6 +9,7 @@ export EDITOR=nano export DE='_DESKTOP_SESSION_' # gnome, kde, xfce, lxde, mate export DESKTOP_SESSION='_DESKTOP_SESSION_' # lxde +ENABLE_TTS_BRLTTY='_ENABLE_TTS_BRLTTY_' # speech and braille # set custom environment @@ -18,7 +19,7 @@ export $(cat /etc/locale.conf) # launch accessibility features -[ -d /usr/bin/talk-to-me ] && flock -n /run/talk-to-me.lck /usr/bin/talk-to-me +[[ "$ENABLE_TTS_BRLTTY" == 'true' ]] && flock -n /run/talk-to-me.lck /usr/bin/talk-to-me # launch X 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 171c23e..b833333 100644 --- a/configs/profile/root-image/root/customize_root_image-constants.inc +++ b/configs/profile/root-image/root/customize_root_image-constants.inc @@ -3,6 +3,7 @@ # ISO_INIT # ISO_GUI # ENABLE_OFFLINE_INSTALL +# HAS_BRLTTY_TTS readonly LOCALES="en_US\.UTF-8 \ @@ -25,11 +26,12 @@ readonly OPENRC_DELETE_FILES="/etc/hostname /etc/systemd/system/getty@tty1.service.d/autologin.conf \ /etc/systemd/system/pacman-init.service " -readonly SYSTEMD_SERVICES_ALL="brltty.service \ - choose-mirror.service \ - livecd-alsa-unmuter.service \ - multi-user.target \ - pacman-init.service " +readonly SYSTEMD_SERVICES_ALL="choose-mirror.service \ + multi-user.target \ + pacman-init.service " +readonly SYSTEMD_SERVICES_ACC="bluetooth.service \ + brltty.service \ + livecd-alsa-unmuter.service " readonly SYSTEMD_SERVICES_GUI="NetworkManager.service" readonly OPENRC_SERVICES_ALL="dbus \ haveged \ @@ -39,8 +41,9 @@ readonly OPENRC_SERVICES_GUI="alsasound \ elogind " readonly SYSTEMD_SERVICES="${SYSTEMD_SERVICES_ALL}" readonly OPENRC_SERVICES="${OPENRC_SERVICES_ALL}" -[[ "${ISO_GUI}" != 'cli' ]] && readonly SYSTEMD_SERVICES+=" ${SYSTEMD_SERVICES_GUI}" -[[ "${ISO_GUI}" != 'cli' ]] && readonly OPENRC_SERVICES+=" ${OPENRC_SERVICES_GUI}" +[[ "${ENABLE_TTS_BRLTTY}" == 'yes' ]] && readonly SYSTEMD_SERVICES+=" ${SYSTEMD_SERVICES_ACC}" +[[ "${ISO_GUI}" != 'cli' ]] && readonly SYSTEMD_SERVICES+=" ${SYSTEMD_SERVICES_GUI}" +[[ "${ISO_GUI}" != 'cli' ]] && readonly OPENRC_SERVICES+=" ${OPENRC_SERVICES_GUI}" readonly DEFAULT_SHELL=/bin/bash @@ -70,3 +73,6 @@ 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} + + +LOG_CONFIG() { printf "\033[01;34mconfiguring: %s\033[00m\n" "$(echo -e $*)" ; } diff --git a/configs/profile/root-image/root/customize_root_image.sh b/configs/profile/root-image/root/customize_root_image.sh index 681822b..ff5a2f3 100755 --- a/configs/profile/root-image/root/customize_root_image.sh +++ b/configs/profile/root-image/root/customize_root_image.sh @@ -6,20 +6,20 @@ set -e -u source /root/customize_root_image-constants.inc -# configure timezone and locales # +LOG_CONFIG "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 # +LOG_CONFIG "sudo" chmod 750 /etc/sudoers.d chmod 440 /etc/sudoers.d/g_wheel -# configure pacman # +LOG_CONFIG "pacman" sed -i "s|#Server|Server|" /etc/pacman.d/mirrorlist # FIXME: BEGIN issue #1838 @@ -28,7 +28,8 @@ echo -e "[pcr-testing]\nInclude = /etc/pacman.d/mirrorlist" >> /etc/pacman-onlin [ "${INSTALL_TYPE}" == 'Complete' ] && cp /etc/pacman-offline.conf /etc/pacman.conf || \ cp /etc/pacman-online.conf /etc/pacman.conf -# configure services # + +LOG_CONFIG "services" if [[ "${ISO_INIT}" == 'systemd' ]] then # delete files that are specific to other init systems @@ -53,7 +54,7 @@ else echo "invalid \$ISO_INIT for services '${ISO_INIT}'" fi -# configure root user, system defaults, and login session # +LOG_CONFIG "system defaults and root user" usermod -s ${DEFAULT_SHELL} root 2> /dev/null sed -i "s|_EDITION_TITLE_|${ISO_TITLE}|" /etc/motd @@ -65,14 +66,16 @@ echo "VARIANT=\"${OS_VARIANT}\"" >> /usr/lib/os-release echo "VARIANT_ID=\"${OS_VARIANT_ID}\"" >> /usr/lib/os-release -# configure login session # +LOG_CONFIG "login session and live user" + +sed -i "s|_ENABLE_TTS_BRLTTY_|${ENABLE_TTS_BRLTTY}|" /etc/skel/.bash_profile 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 +else # configure GUI login session # FIXME: BEGIN issue #1838 groupadd -g 92 audio ; groupadd -g 6 disk ; groupadd -g 93 optical ; groupadd -g 95 storage ; # FIXME: END issue #1838 diff --git a/docs/README.build b/docs/README.build index 71f8fbf..ca4f477 100644 --- a/docs/README.build +++ b/docs/README.build @@ -158,16 +158,16 @@ All packages/packages-* files must be named in lowercase. # cd parabolaiso/configs/releng * Build one or more ISOs. - # ./build.sh # dual-architecture SystemD/CLI - # ./build.sh -T i686 # 32-bit x86 target SystemD/CLI - # ./build.sh -T x86_64 # 64-bit x86 target SystemD/CLI - # ./build.sh -E OpenRC/CLI -O # OpenRC/CLI for offline install - # ./build.sh -E OpenRC/LXDE -O # OpenRC/LXDE for offline install - # ./build.sh -E SystemD/MATE # SystemD/MATE - # ./build.sh -E SystemD/Talking # SystemD/TalkingParabola - # ./build.sh -T x86_64 -V "`date +%Y.%m.%d.%H.%M`-alpha" # development filename - -Note: See build.sh -h for more options. + # ./build.sh # dual-architecture SystemD/CLI + # ./build.sh -T i686 # 32-bit x86 target SystemD/CLI + # ./build.sh -T x86_64 # 64-bit x86 target SystemD/CLI + # ./build.sh -E OpenRC/CLI -O # OpenRC/CLI for offline install + # ./build.sh -E OpenRC/LXDE -O # OpenRC/LXDE for offline install + # ./build.sh -E SystemD/LXDE # SystemD/LXDE for net-install + # ./build.sh -E SystemD/MATE -S # SystemD/MATE with speech and braille + # ./build.sh -V "`date +%Y.%m.%d.%H.%M`-alpha" # development filename + +Note: The commands above are only some examples. See build.sh -h for the complete options. Note: This script needs to be run on an x86_64 ArchLinux derrivative Note: Specifying a single architecture with the -T option builds in half of the time and results in the ISO being about half of the size as the dual-architecture ISO. -- cgit v1.2.2