first commit
|
@ -0,0 +1,23 @@
|
|||
# Copyright (c) 2009-2015 Juan RP <xtraeme@gmail.com>
|
||||
# Copyright (c) 2012 Dave Elusive <davehome@redthumb.info.tm>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -0,0 +1,122 @@
|
|||
DATECODE:=$(shell date -u "+%Y%m%d")
|
||||
SHELL=/bin/bash
|
||||
|
||||
T_LIVE_ARCHS=i686 x86_64{,-musl}
|
||||
|
||||
T_PLATFORMS=rpi-{armv{6,7}l,aarch64}{,-musl} GCP{,-musl} pinebookpro{,-musl}
|
||||
T_ARCHS=i686 x86_64{,-musl} armv{6,7}l{,-musl} aarch64{,-musl}
|
||||
|
||||
T_SBC_IMGS=rpi-{armv{6,7}l,aarch64}{,-musl} pinebookpro{,-musl}
|
||||
T_CLOUD_IMGS=GCP{,-musl}
|
||||
|
||||
T_PXE_ARCHS=x86_64{,-musl}
|
||||
|
||||
LIVE_ARCHS:=$(shell echo $(T_LIVE_ARCHS))
|
||||
LIVE_FLAVORS:=base enlightenment xfce mate cinnamon gnome kde lxde lxqt
|
||||
ARCHS:=$(shell echo $(T_ARCHS))
|
||||
PLATFORMS:=$(shell echo $(T_PLATFORMS))
|
||||
SBC_IMGS:=$(shell echo $(T_SBC_IMGS))
|
||||
CLOUD_IMGS:=$(shell echo $(T_CLOUD_IMGS))
|
||||
PXE_ARCHS:=$(shell echo $(T_PXE_ARCHS))
|
||||
|
||||
ALL_LIVE_ISO=$(foreach arch,$(LIVE_ARCHS), $(foreach flavor,$(LIVE_FLAVORS),void-live-$(arch)-$(DATECODE)-$(flavor).iso))
|
||||
ALL_ROOTFS=$(foreach arch,$(ARCHS),void-$(arch)-ROOTFS-$(DATECODE).tar.xz)
|
||||
ALL_PLATFORMFS=$(foreach platform,$(PLATFORMS),void-$(platform)-PLATFORMFS-$(DATECODE).tar.xz)
|
||||
ALL_SBC_IMAGES=$(foreach platform,$(SBC_IMGS),void-$(platform)-$(DATECODE).img.xz)
|
||||
ALL_CLOUD_IMAGES=$(foreach cloud,$(CLOUD_IMGS),void-$(cloud)-$(DATECODE).tar.gz)
|
||||
ALL_PXE_ARCHS=$(foreach arch,$(PXE_ARCHS),void-$(arch)-NETBOOT-$(DATECODE).tar.gz)
|
||||
|
||||
SUDO := sudo
|
||||
|
||||
REPOSITORY := https://repo-default.voidlinux.org/current
|
||||
XBPS_REPOSITORY := -r $(REPOSITORY) -r $(REPOSITORY)/musl -r $(REPOSITORY)/aarch64
|
||||
COMPRESSOR_THREADS:=$(shell nproc)
|
||||
|
||||
all:
|
||||
|
||||
README.md: README.md.in build-x86-images.sh mklive.sh mkrootfs.sh mkplatformfs.sh mkimage.sh mknet.sh
|
||||
printf '<!-- DO NOT EDIT, generated by make README.md -->\n\n' > README.md
|
||||
cat README.md.in >> README.md
|
||||
for script in build-x86-images mklive mkrootfs mkplatformfs mkimage mknet; do \
|
||||
printf '### %s.sh\n\n```\n' "$${script}" >> README.md ; \
|
||||
"./$${script}.sh" -h 2>/dev/null >> README.md ; \
|
||||
printf '```\n\n' >> README.md ; \
|
||||
done
|
||||
|
||||
build-x86-images.sh: mklive.sh
|
||||
|
||||
checksum: distdir-$(DATECODE)
|
||||
cd distdir-$(DATECODE)/ && sha256 * > sha256sum.txt
|
||||
|
||||
distdir-$(DATECODE):
|
||||
mkdir -p distdir-$(DATECODE)
|
||||
|
||||
dist: distdir-$(DATECODE)
|
||||
mv void*$(DATECODE)* distdir-$(DATECODE)/
|
||||
|
||||
live-iso-all: $(ALL_LIVE_ISO)
|
||||
|
||||
live-iso-all-print:
|
||||
@echo $(ALL_LIVE_ISO) | sed "s: :\n:g"
|
||||
|
||||
void-live-%.iso: build-x86-images.sh
|
||||
@[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true
|
||||
$(SUDO) ./build-x86-images.sh -r $(REPOSITORY) -t $*
|
||||
@[ -n "${CI}" ] && printf '::endgroup::\n' || true
|
||||
|
||||
rootfs-all: $(ALL_ROOTFS)
|
||||
|
||||
rootfs-all-print:
|
||||
@echo $(ALL_ROOTFS) | sed "s: :\n:g"
|
||||
|
||||
void-%-ROOTFS-$(DATECODE).tar.xz: mkrootfs.sh
|
||||
@[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true
|
||||
$(SUDO) ./mkrootfs.sh $(XBPS_REPOSITORY) -x $(COMPRESSOR_THREADS) -o $@ $*
|
||||
@[ -n "${CI}" ] && printf '::endgroup::\n' || true
|
||||
|
||||
platformfs-all: $(ALL_PLATFORMFS)
|
||||
|
||||
platformfs-all-print:
|
||||
@echo $(ALL_PLATFORMFS) | sed "s: :\n:g"
|
||||
|
||||
.SECONDEXPANSION:
|
||||
void-%-PLATFORMFS-$(DATECODE).tar.xz: void-$$(shell ./lib.sh platform2arch %)-ROOTFS-$(DATECODE).tar.xz mkplatformfs.sh
|
||||
@[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true
|
||||
$(SUDO) ./mkplatformfs.sh $(XBPS_REPOSITORY) -x $(COMPRESSOR_THREADS) -o $@ $* void-$(shell ./lib.sh platform2arch $*)-ROOTFS-$(DATECODE).tar.xz
|
||||
@[ -n "${CI}" ] && printf '::endgroup::\n' || true
|
||||
|
||||
images-all: platformfs-all images-all-sbc images-all-cloud
|
||||
|
||||
images-all-sbc: $(ALL_SBC_IMAGES)
|
||||
|
||||
images-all-sbc-print:
|
||||
@echo $(ALL_SBC_IMAGES) | sed "s: :\n:g"
|
||||
|
||||
images-all-cloud: $(ALL_CLOUD_IMAGES)
|
||||
|
||||
images-all-print:
|
||||
@echo $(ALL_SBC_IMAGES) $(ALL_CLOUD_IMAGES) | sed "s: :\n:g"
|
||||
|
||||
void-%-$(DATECODE).img.xz: void-%-PLATFORMFS-$(DATECODE).tar.xz mkimage.sh
|
||||
@[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true
|
||||
$(SUDO) ./mkimage.sh -x $(COMPRESSOR_THREADS) -o $(basename $@) void-$*-PLATFORMFS-$(DATECODE).tar.xz
|
||||
@[ -n "${CI}" ] && printf '::endgroup::\n' || true
|
||||
|
||||
# Some of the images MUST be compressed with gzip rather than xz, this
|
||||
# rule services those images.
|
||||
void-%-$(DATECODE).tar.gz: void-%-PLATFORMFS-$(DATECODE).tar.xz mkimage.sh
|
||||
@[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true
|
||||
$(SUDO) ./mkimage.sh -x $(COMPRESSOR_THREADS) void-$*-PLATFORMFS-$(DATECODE).tar.xz
|
||||
@[ -n "${CI}" ] && printf '::endgroup::\n' || true
|
||||
|
||||
pxe-all: $(ALL_PXE_ARCHS)
|
||||
|
||||
pxe-all-print:
|
||||
@echo $(ALL_PXE_ARCHS) | sed "s: :\n:g"
|
||||
|
||||
void-%-NETBOOT-$(DATECODE).tar.gz: void-%-ROOTFS-$(DATECODE).tar.xz mknet.sh
|
||||
@[ -n "${CI}" ] && printf "::group::\x1b[32mBuilding $@...\x1b[0m\n" || true
|
||||
$(SUDO) ./mknet.sh void-$*-ROOTFS-$(DATECODE).tar.xz
|
||||
@[ -n "${CI}" ] && printf '::endgroup::\n' || true
|
||||
|
||||
.PHONY: all checksum dist live-iso-all live-iso-all-print rootfs-all-print rootfs-all platformfs-all-print platformfs-all pxe-all-print pxe-all
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
|
@ -0,0 +1,765 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
export LC_ALL='C'
|
||||
|
||||
# Metadata.
|
||||
if [ -z "${HBLOCK_VERSION+x}" ]; then HBLOCK_VERSION='3.4.2'; fi
|
||||
if [ -z "${HBLOCK_AUTHOR+x}" ]; then HBLOCK_AUTHOR='Héctor Molinero Fernández <hector@molinero.dev>'; fi
|
||||
if [ -z "${HBLOCK_LICENSE+x}" ]; then HBLOCK_LICENSE='MIT, https://opensource.org/licenses/MIT'; fi
|
||||
if [ -z "${HBLOCK_REPOSITORY+x}" ]; then HBLOCK_REPOSITORY='https://github.com/hectorm/hblock'; fi
|
||||
|
||||
# Emulate ksh if the shell is zsh.
|
||||
if [ -n "${ZSH_VERSION-}" ]; then emulate -L ksh; fi
|
||||
|
||||
# Define system and user configuration directories.
|
||||
if [ -z "${ETCDIR+x}" ]; then ETCDIR='/etc'; fi
|
||||
if [ -z "${XDG_CONFIG_HOME+x}" ]; then XDG_CONFIG_HOME="${HOME-}/.config"; fi
|
||||
|
||||
# Remove temporary files on exit.
|
||||
cleanup() { ret="$?"; rm -rf -- "${TMPDIR:-${TMP:-/tmp}}/hblock.${$}."*; trap - EXIT; exit "${ret:?}"; }
|
||||
{ trap cleanup EXIT ||:; trap cleanup TERM ||:; trap cleanup INT ||:; trap cleanup HUP ||:; } 2>/dev/null
|
||||
|
||||
# Built-in header.
|
||||
HOSTNAME="${HOSTNAME-"$(uname -n)"}"
|
||||
HBLOCK_HEADER_BUILTIN="$(cat <<-EOF
|
||||
127.0.0.1 localhost ${HOSTNAME?}
|
||||
255.255.255.255 broadcasthost
|
||||
::1 localhost ${HOSTNAME?}
|
||||
::1 ip6-localhost ip6-loopback
|
||||
fe00::0 ip6-localnet
|
||||
ff00::0 ip6-mcastprefix
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
||||
ff02::3 ip6-allhosts
|
||||
EOF
|
||||
)"
|
||||
|
||||
# Built-in footer.
|
||||
HBLOCK_FOOTER_BUILTIN=''
|
||||
|
||||
# Built-in sources.
|
||||
HBLOCK_SOURCES_BUILTIN="$(cat <<-'EOF'
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adaway.org/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adblock-nocoin-list/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adguard-cname-trackers/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adguard-simplified/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/dandelionsprout-nordic/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-ara/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-bul/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-ces-slk/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-deu/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-fra/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-heb/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-ind/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-ita/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-kor/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-lav/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-lit/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-nld/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-por/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-rus/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-spa/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist-zho/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easyprivacy/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/eth-phishing-detect/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/gfrogeye-firstparty-trackers/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/hostsvn/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/kadhosts/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/matomo.org-spammers/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/mitchellkrogza-badd-boyz-hosts/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/pgl.yoyo.org/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/phishing.army/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/someonewhocares.org/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/spam404.com/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/stevenblack/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/turkish-ad-hosts/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock-2020/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock-2021/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock-2022/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock-2023/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock-abuse/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock-badware/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock-privacy/list.txt
|
||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/urlhaus/list.txt
|
||||
EOF
|
||||
)"
|
||||
|
||||
# Built-in allowlist.
|
||||
HBLOCK_ALLOWLIST_BUILTIN=''
|
||||
|
||||
# Built-in denylist.
|
||||
HBLOCK_DENYLIST_BUILTIN="$(cat <<-'EOF'
|
||||
# Special domain that is used to check if hBlock is enabled.
|
||||
hblock-check.molinero.dev
|
||||
EOF
|
||||
)"
|
||||
|
||||
# Parse command line options.
|
||||
optParse() {
|
||||
SEP="$(printf '\037')"
|
||||
while [ "${#}" -gt '0' ]; do
|
||||
case "${1?}" in
|
||||
# Short options that accept a value need a "*" in their pattern because they can be found in the "-A<value>" form.
|
||||
'-O'*|'--output') optArgStr "${@-}"; outputFile="${optArg?}"; shift "${optShift:?}" ;;
|
||||
'-H'*|'--header') optArgStr "${@-}"; headerFile="${optArg?}"; shift "${optShift:?}" ;;
|
||||
'-F'*|'--footer') optArgStr "${@-}"; footerFile="${optArg?}"; shift "${optShift:?}" ;;
|
||||
'-S'*|'--sources') optArgStr "${@-}"; sourcesFile="${optArg?}"; shift "${optShift:?}" ;;
|
||||
'-A'*|'--allowlist') optArgStr "${@-}"; allowlistFile="${optArg?}"; shift "${optShift:?}" ;;
|
||||
'-D'*|'--denylist') optArgStr "${@-}"; denylistFile="${optArg?}"; shift "${optShift:?}" ;;
|
||||
'-R'*|'--redirection') optArgStr "${@-}"; redirection="${optArg?}"; shift "${optShift:?}" ;;
|
||||
'-W'*|'--wrap') optArgStr "${@-}"; wrap="${optArg?}"; shift "${optShift:?}" ;;
|
||||
'-T'*|'--template') optArgStr "${@-}"; template="${optArg?}"; shift "${optShift:?}" ;;
|
||||
'-C'*|'--comment') optArgStr "${@-}"; comment="${optArg?}"; shift "${optShift:?}" ;;
|
||||
'-l' |'--lenient'|'--no-lenient') optArgBool "${@-}"; lenient="${optArg:?}" ;;
|
||||
'-r' |'--regex'|'--no-regex') optArgBool "${@-}"; regex="${optArg:?}" ;;
|
||||
'-f' |'--filter-subdomains'|'--no-filter-subdomains') optArgBool "${@-}"; filterSubdomains="${optArg:?}" ;;
|
||||
'-c' |'--continue'|'--no-continue') optArgBool "${@-}"; continue="${optArg:?}" ;;
|
||||
'-p'*|'--parallel') optArgStr "${@-}"; parallel="${optArg?}"; shift "${optShift:?}" ;;
|
||||
'-q' |'--quiet'|'--no-quiet') optArgBool "${@-}"; quiet="${optArg:?}" ;;
|
||||
'-x'*|'--color') optArgStr "${@-}"; color="${optArg?}"; shift "${optShift:?}" ;;
|
||||
'-v' |'--version') showVersion ;;
|
||||
'-h' |'--help') showHelp ;;
|
||||
# If "--" is found, the remaining positional parameters are saved and the parsing ends.
|
||||
--) shift; _IFS="${IFS?}"; IFS="${SEP:?}"; POS="${POS-}${POS+${SEP:?}}${*-}"; IFS="${_IFS?}"; break ;;
|
||||
# If a long option in the form "--opt=value" is found, it is split into "--opt" and "value".
|
||||
--*=*) optSplitEquals "${@-}"; shift; set -- "${optName:?}" "${optArg?}" "${@-}"; continue ;;
|
||||
# If an option did not match any pattern, an error is thrown.
|
||||
-?|--*) optDie "Illegal option ${1:?}" ;;
|
||||
# If multiple short options in the form "-AB" are found, they are split into "-A" and "-B".
|
||||
-?*) optSplitShort "${@-}"; shift; set -- "${optAName:?}" "${optBName:?}" "${@-}"; continue ;;
|
||||
# If a positional parameter is found, it is saved.
|
||||
*) POS="${POS-}${POS+${SEP:?}}${1?}" ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
}
|
||||
optSplitShort() {
|
||||
optAName="${1%"${1#??}"}"; optBName="-${1#??}"
|
||||
}
|
||||
optSplitEquals() {
|
||||
optName="${1%="${1#--*=}"}"; optArg="${1#--*=}"
|
||||
}
|
||||
optArgStr() {
|
||||
if [ -n "${1#??}" ] && [ "${1#--}" = "${1:?}" ]; then optArg="${1#??}"; optShift='0';
|
||||
elif [ -n "${2+x}" ]; then optArg="${2-}"; optShift='1';
|
||||
else optDie "No argument for ${1:?} option"; fi
|
||||
}
|
||||
optArgBool() {
|
||||
if [ "${1#--no-}" = "${1:?}" ]; then optArg='true';
|
||||
else optArg='false'; fi
|
||||
}
|
||||
optDie() {
|
||||
printf '%s\n' "${@-}" "Try 'hblock --help' for more information" >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
# Show help and quit.
|
||||
showHelp() {
|
||||
printf '%s\n' "$(sed -e 's/%NL/\n/g' <<-EOF
|
||||
Usage: hblock [OPTION]...
|
||||
|
||||
hBlock is a POSIX-compliant shell script that gets a list of domains that serve
|
||||
ads, tracking scripts and malware from multiple sources and creates a hosts
|
||||
file, among other formats, that prevents your system from connecting to them.
|
||||
|
||||
Options:
|
||||
|
||||
-O, --output <FILE|->, \${HBLOCK_OUTPUT_FILE}%NL
|
||||
Output file location.%NL
|
||||
If equals "-", it is printed to stdout.%NL
|
||||
(default: ${outputFile?})%NL
|
||||
-H, --header <FILE|builtin|none|->, \${HBLOCK_HEADER_FILE}%NL
|
||||
File to be included at the beginning of the output file.%NL
|
||||
If equals "builtin", the built-in value is used.%NL
|
||||
If equals "none", an empty value is used.%NL
|
||||
If equals "-", the stdin content is used.%NL
|
||||
If unspecified and any of the following files exists, its content is used.%NL
|
||||
\${XDG_CONFIG_HOME}/hblock/header%NL
|
||||
${ETCDIR?}/hblock/header%NL
|
||||
(default: ${headerFile?})%NL
|
||||
-F, --footer <FILE|builtin|none|->, \${HBLOCK_FOOTER_FILE}%NL
|
||||
File to be included at the end of the output file.%NL
|
||||
If equals "builtin", the built-in value is used.%NL
|
||||
If equals "none", an empty value is used.%NL
|
||||
If equals "-", the stdin content is used.%NL
|
||||
If unspecified and any of the following files exists, its content is used.%NL
|
||||
\${XDG_CONFIG_HOME}/hblock/footer%NL
|
||||
${ETCDIR?}/hblock/footer%NL
|
||||
(default: ${footerFile?})%NL
|
||||
-S, --sources <FILE|builtin|none|->, \${HBLOCK_SOURCES_FILE}%NL
|
||||
File with line separated URLs used to generate the blocklist.%NL
|
||||
If equals "builtin", the built-in value is used.%NL
|
||||
If equals "none", an empty value is used.%NL
|
||||
If equals "-", the stdin content is used.%NL
|
||||
If unspecified and any of the following files exists, its content is used.%NL
|
||||
\${XDG_CONFIG_HOME}/hblock/sources.list%NL
|
||||
${ETCDIR?}/hblock/sources.list%NL
|
||||
(default: ${sourcesFile?})%NL
|
||||
-A, --allowlist <FILE|builtin|none|->, \${HBLOCK_ALLOWLIST_FILE}%NL
|
||||
File with line separated entries to be removed from the blocklist.%NL
|
||||
If equals "builtin", the built-in value is used.%NL
|
||||
If equals "none", an empty value is used.%NL
|
||||
If equals "-", the stdin content is used.%NL
|
||||
If unspecified and any of the following files exists, its content is used.%NL
|
||||
\${XDG_CONFIG_HOME}/hblock/allow.list%NL
|
||||
${ETCDIR?}/hblock/allow.list%NL
|
||||
(default: ${allowlistFile?})%NL
|
||||
-D, --denylist <FILE|builtin|none|->, \${HBLOCK_DENYLIST_FILE}%NL
|
||||
File with line separated entries to be added to the blocklist.%NL
|
||||
If equals "builtin", the built-in value is used.%NL
|
||||
If equals "none", an empty value is used.%NL
|
||||
If equals "-", the stdin content is used.%NL
|
||||
If unspecified and any of the following files exists, its content is used.%NL
|
||||
\${XDG_CONFIG_HOME}/hblock/deny.list%NL
|
||||
${ETCDIR?}/hblock/deny.list%NL
|
||||
(default: ${denylistFile?})%NL
|
||||
-R, --redirection <REDIRECTION>, \${HBLOCK_REDIRECTION}%NL
|
||||
Redirection for all entries in the blocklist.%NL
|
||||
(default: ${redirection?})%NL
|
||||
-W, --wrap <NUMBER>, \${HBLOCK_WRAP}%NL
|
||||
Break blocklist lines after this number of entries.%NL
|
||||
(default: ${wrap?})%NL
|
||||
-T, --template <TEMPLATE>, \${HBLOCK_TEMPLATE}%NL
|
||||
Template applied to each entry.%NL
|
||||
%D = <DOMAIN>, %R = <REDIRECTION>%NL
|
||||
(default: ${template?})%NL
|
||||
-C, --comment <COMMENT>, \${HBLOCK_COMMENT}%NL
|
||||
Character used for comments.%NL
|
||||
(default: ${comment?})%NL
|
||||
-l, --[no-]lenient, \${HBLOCK_LENIENT}%NL
|
||||
Match all entries from sources regardless of their IP, instead of
|
||||
0.0.0.0, 127.0.0.1, ::, ::1 or nothing.%NL
|
||||
(default: ${lenient?})%NL
|
||||
-r, --[no-]regex, \${HBLOCK_REGEX}%NL
|
||||
Use POSIX BREs in the allowlist instead of fixed strings.%NL
|
||||
(default: ${regex?})%NL
|
||||
-f, --[no-]filter-subdomains, \${HBLOCK_FILTER_SUBDOMAINS}%NL
|
||||
Do not include subdomains when the parent domain is also blocked.
|
||||
Useful for reducing the blocklist size in cases such as when DNS blocking
|
||||
makes these subdomains redundant.%NL
|
||||
(default: ${filterSubdomains?})%NL
|
||||
-c, --[no-]continue, \${HBLOCK_CONTINUE}%NL
|
||||
Do not abort if a download error occurs.%NL
|
||||
(default: ${continue?})%NL
|
||||
-p, --parallel, \${HBLOCK_PARALLEL}%NL
|
||||
Maximum concurrency for parallel downloads.%NL
|
||||
(default: ${parallel?})%NL
|
||||
-q, --[no-]quiet, \${HBLOCK_QUIET}%NL
|
||||
Suppress non-error messages.%NL
|
||||
(default: ${quiet?})%NL
|
||||
-x, --color <auto|true|false>, \${HBLOCK_COLOR}%NL
|
||||
Colorize the output.%NL
|
||||
(default: ${color?})%NL
|
||||
-v, --version%NL
|
||||
Show version number and quit.%NL
|
||||
-h, --help%NL
|
||||
Show this help and quit.
|
||||
|
||||
Report bugs to: <https://github.com/hectorm/hblock/issues>
|
||||
EOF
|
||||
)"
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Show version number and quit.
|
||||
showVersion() {
|
||||
printf '%s\n' "$(cat <<-EOF
|
||||
hBlock ${HBLOCK_VERSION:?}
|
||||
Author: ${HBLOCK_AUTHOR:?}
|
||||
License: ${HBLOCK_LICENSE:?}
|
||||
Repository: ${HBLOCK_REPOSITORY:?}
|
||||
EOF
|
||||
)"
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Check if a program exists.
|
||||
exists() {
|
||||
# shellcheck disable=SC2230
|
||||
if command -v true; then command -v -- "${1:?}"
|
||||
elif eval type type; then eval type -- "${1:?}"
|
||||
else which -- "${1:?}"; fi >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# Pretty print methods.
|
||||
printInfo() { [ -n "${NO_STDOUT+x}" ] || printf "${COLOR_RESET-}[${COLOR_BGREEN-}INFO${COLOR_RESET-}] %s\n" "${@-}"; }
|
||||
printWarn() { [ -n "${NO_STDERR+x}" ] || printf "${COLOR_RESET-}[${COLOR_BYELLOW-}WARN${COLOR_RESET-}] %s\n" "${@-}" >&2; }
|
||||
printError() { [ -n "${NO_STDERR+x}" ] || printf "${COLOR_RESET-}[${COLOR_BRED-}ERROR${COLOR_RESET-}] %s\n" "${@-}" >&2; }
|
||||
printList() { [ -n "${NO_STDOUT+x}" ] || printf "${COLOR_RESET-} ${COLOR_BCYAN-}*${COLOR_RESET-} %s\n" "${@-}"; }
|
||||
|
||||
# Print a pseudorandom string.
|
||||
rand() { :& awk -v N="${!}" 'BEGIN{srand();printf("%08x%06x",rand()*2^31-1,N)}'; }
|
||||
|
||||
# Create a temporary directory, file or FIFO special file.
|
||||
createTemp() {
|
||||
# POSIX does not specify the mktemp utility, so here comes a hacky solution.
|
||||
while t="${TMPDIR:-${TMP:-/tmp}}/hblock.${$}.$(rand)" && [ -e "${t:?}" ]; do sleep 1; done
|
||||
(
|
||||
umask 077
|
||||
case "${1-}" in
|
||||
'dir') mkdir -- "${t:?}" ;;
|
||||
'file') touch -- "${t:?}" ;;
|
||||
'fifo') mkfifo -- "${t:?}" ;;
|
||||
esac
|
||||
printf '%s' "${t:?}"
|
||||
)
|
||||
}
|
||||
|
||||
# Write stdin to a file.
|
||||
sponge() {
|
||||
spongeFile="$(createTemp 'file')"; cat > "${spongeFile:?}"
|
||||
cat -- "${spongeFile:?}" > "${1:?}"; rm -f -- "${spongeFile:?}"
|
||||
}
|
||||
|
||||
# Count files or directories in a directory.
|
||||
dirCount() { [ -e "${1:?}" ] && printf '%s' "${#}" || printf '%s' '0'; }
|
||||
|
||||
# Print to stdout the contents of a URL.
|
||||
fetchUrl() {
|
||||
# If the protocol is "file://" we can omit the download and simply use cat.
|
||||
if [ "${1#file://}" != "${1:?}" ]; then cat -- "${1#file://}"
|
||||
else
|
||||
userAgent='Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0'
|
||||
if exists curl; then curl -fsSL -A "${userAgent:?}" -- "${1:?}"
|
||||
elif exists wget; then wget -qO- -U "${userAgent:?}" -- "${1:?}"
|
||||
elif exists fetch; then fetch -qo- --user-agent="${userAgent:?}" -- "${1:?}"
|
||||
else
|
||||
printError 'curl, wget or fetch are required for this script'
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Remove comments from string.
|
||||
removeComments() { sed -e 's/[[:blank:]]*#.*//;/^$/d'; }
|
||||
|
||||
# Transform hosts file entries to domain names.
|
||||
sanitizeBlocklist() {
|
||||
leadingScript='s/^[[:blank:]]*//'
|
||||
trailingScript='s/[[:blank:]]*\(#.*\)\{0,1\}$//'
|
||||
if [ "${1:?}" = 'true' ]; then
|
||||
ipv4Script='s/^\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}[[:blank:]]\{1,\}//'
|
||||
ipv6Script='s/^\([0-9a-f]\{0,4\}:\)\{2,7\}[0-9a-f]\{0,4\}[[:blank:]]\{1,\}//'
|
||||
else
|
||||
ipv4Script='s/^\(0\)\{0,1\}\(127\)\{0,1\}\(\.[0-9]\{1,3\}\)\{3\}[[:blank:]]\{1,\}//'
|
||||
ipv6Script='s/^\(0\{0,4\}:\)\{2,7\}0\{0,3\}[01]\{0,1\}[[:blank:]]\{1,\}//'
|
||||
fi
|
||||
domainRegex='\([0-9a-z_-]\{1,63\}\.\)\{1,\}[a-z][0-9a-z-]\{0,61\}[0-9a-z]\.\{0,1\}'
|
||||
tr -d '\r' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' \
|
||||
| sed -e "${leadingScript:?};${ipv4Script:?};${ipv6Script:?};${trailingScript:?}" \
|
||||
| { grep -e "^${domainRegex:?}\([[:blank:]]\{1,\}${domainRegex:?}\)*$" ||:; } \
|
||||
| tr -s ' \t' '\n' | sed 's/\.$//'
|
||||
}
|
||||
|
||||
# Remove reserved Top Level Domains.
|
||||
removeReservedTLDs() {
|
||||
sed -e '/\.corp$/d' \
|
||||
-e '/\.domain$/d' \
|
||||
-e '/\.example$/d' \
|
||||
-e '/\.home$/d' \
|
||||
-e '/\.host$/d' \
|
||||
-e '/\.invalid$/d' \
|
||||
-e '/\.lan$/d' \
|
||||
-e '/\.local$/d' \
|
||||
-e '/\.localdomain$/d' \
|
||||
-e '/\.localhost$/d' \
|
||||
-e '/\.test$/d'
|
||||
}
|
||||
|
||||
main() {
|
||||
usrConfDir="${XDG_CONFIG_HOME?}/hblock"
|
||||
sysConfDir="${ETCDIR?}/hblock"
|
||||
|
||||
# Source environment file if exists.
|
||||
# shellcheck disable=SC1091
|
||||
if [ -f "${usrConfDir:?}/environment" ]; then
|
||||
set -a; . "${usrConfDir:?}/environment"; set +a
|
||||
elif [ -f "${sysConfDir:?}/environment" ]; then
|
||||
set -a; . "${sysConfDir:?}/environment"; set +a
|
||||
fi
|
||||
|
||||
# Output file location.
|
||||
outputFile="${HBLOCK_OUTPUT_FILE-"${ETCDIR?}/hosts"}"
|
||||
|
||||
# File to be included at the beginning of the output file.
|
||||
headerFile='builtin'
|
||||
if [ -n "${HBLOCK_HEADER+x}" ]; then
|
||||
HBLOCK_HEADER_BUILTIN="${HBLOCK_HEADER?}"
|
||||
elif [ -n "${HBLOCK_HEADER_FILE+x}" ]; then
|
||||
headerFile="${HBLOCK_HEADER_FILE?}"
|
||||
elif [ -f "${usrConfDir:?}/header" ]; then
|
||||
headerFile="${usrConfDir:?}/header"
|
||||
elif [ -f "${sysConfDir:?}/header" ]; then
|
||||
headerFile="${sysConfDir:?}/header"
|
||||
fi
|
||||
|
||||
# File to be included at the end of the output file.
|
||||
footerFile='builtin'
|
||||
if [ -n "${HBLOCK_FOOTER+x}" ]; then
|
||||
HBLOCK_FOOTER_BUILTIN="${HBLOCK_FOOTER?}"
|
||||
elif [ -n "${HBLOCK_FOOTER_FILE+x}" ]; then
|
||||
footerFile="${HBLOCK_FOOTER_FILE?}"
|
||||
elif [ -f "${usrConfDir:?}/footer" ]; then
|
||||
footerFile="${usrConfDir:?}/footer"
|
||||
elif [ -f "${sysConfDir:?}/footer" ]; then
|
||||
footerFile="${sysConfDir:?}/footer"
|
||||
fi
|
||||
|
||||
# File with line separated URLs used to generate the blocklist.
|
||||
sourcesFile='builtin'
|
||||
if [ -n "${HBLOCK_SOURCES+x}" ]; then
|
||||
HBLOCK_SOURCES_BUILTIN="${HBLOCK_SOURCES?}"
|
||||
elif [ -n "${HBLOCK_SOURCES_FILE+x}" ]; then
|
||||
sourcesFile="${HBLOCK_SOURCES_FILE?}"
|
||||
elif [ -f "${usrConfDir:?}/sources.list" ]; then
|
||||
sourcesFile="${usrConfDir:?}/sources.list"
|
||||
elif [ -f "${sysConfDir:?}/sources.list" ]; then
|
||||
sourcesFile="${sysConfDir:?}/sources.list"
|
||||
fi
|
||||
|
||||
# File with line separated entries to be removed from the blocklist.
|
||||
allowlistFile='builtin'
|
||||
if [ -n "${HBLOCK_ALLOWLIST+x}" ]; then
|
||||
HBLOCK_ALLOWLIST_BUILTIN="${HBLOCK_ALLOWLIST?}"
|
||||
elif [ -n "${HBLOCK_ALLOWLIST_FILE+x}" ]; then
|
||||
allowlistFile="${HBLOCK_ALLOWLIST_FILE?}"
|
||||
elif [ -f "${usrConfDir:?}/allow.list" ]; then
|
||||
allowlistFile="${usrConfDir:?}/allow.list"
|
||||
elif [ -f "${sysConfDir:?}/allow.list" ]; then
|
||||
allowlistFile="${sysConfDir:?}/allow.list"
|
||||
fi
|
||||
|
||||
# File with line separated entries to be added to the blocklist.
|
||||
denylistFile='builtin'
|
||||
if [ -n "${HBLOCK_DENYLIST+x}" ]; then
|
||||
HBLOCK_DENYLIST_BUILTIN="${HBLOCK_DENYLIST?}"
|
||||
elif [ -n "${HBLOCK_DENYLIST_FILE+x}" ]; then
|
||||
denylistFile="${HBLOCK_DENYLIST_FILE?}"
|
||||
elif [ -f "${usrConfDir:?}/deny.list" ]; then
|
||||
denylistFile="${usrConfDir:?}/deny.list"
|
||||
elif [ -f "${sysConfDir:?}/deny.list" ]; then
|
||||
denylistFile="${sysConfDir:?}/deny.list"
|
||||
fi
|
||||
|
||||
# Redirection for all entries in the blocklist.
|
||||
redirection="${HBLOCK_REDIRECTION-"0.0.0.0"}"
|
||||
|
||||
# Break blocklist lines after this number of entries.
|
||||
wrap="${HBLOCK_WRAP-"1"}"
|
||||
|
||||
# Template applied to each entry.
|
||||
template="${HBLOCK_TEMPLATE-"%R %D"}"
|
||||
|
||||
# Character used for comments.
|
||||
comment="${HBLOCK_COMMENT-"#"}"
|
||||
|
||||
# Match all entries from sources, regardless of their IP.
|
||||
lenient="${HBLOCK_LENIENT-"false"}"
|
||||
|
||||
# Use POSIX BREs instead of fixed strings.
|
||||
regex="${HBLOCK_REGEX-"false"}"
|
||||
|
||||
# Do not include subdomains when the parent domain is also blocked.
|
||||
filterSubdomains="${HBLOCK_FILTER_SUBDOMAINS-"false"}"
|
||||
|
||||
# Abort if a download error occurs.
|
||||
continue="${HBLOCK_CONTINUE-"false"}"
|
||||
|
||||
# Maximum concurrency for parallel downloads.
|
||||
parallel="${HBLOCK_PARALLEL-"4"}"
|
||||
|
||||
# Colorize the output.
|
||||
color="${HBLOCK_COLOR-"auto"}"
|
||||
|
||||
# Suppress non-error messages.
|
||||
quiet="${HBLOCK_QUIET-"false"}"
|
||||
|
||||
# Parse command line options.
|
||||
# shellcheck disable=SC2086
|
||||
{ optParse "${@-}"; _IFS="${IFS?}"; IFS="${SEP:?}"; set -- ${POS-} >/dev/null; IFS="${_IFS?}"; }
|
||||
|
||||
# Define terminal colors if the color option is enabled or in auto mode if STDOUT is attached to a TTY and the
|
||||
# "NO_COLOR" variable is not set (https://no-color.org).
|
||||
if [ "${color:?}" = 'true' ] || { [ "${color:?}" = 'auto' ] && [ -z "${NO_COLOR+x}" ] && [ -t 1 ]; }; then
|
||||
COLOR_RESET="$({ exists tput && tput sgr0; } 2>/dev/null || printf '\033[0m')"
|
||||
COLOR_BRED="$({ exists tput && tput bold && tput setaf 1; } 2>/dev/null || printf '\033[1;31m')"
|
||||
COLOR_BGREEN="$({ exists tput && tput bold && tput setaf 2; } 2>/dev/null || printf '\033[1;32m')"
|
||||
COLOR_BYELLOW="$({ exists tput && tput bold && tput setaf 3; } 2>/dev/null || printf '\033[1;33m')"
|
||||
COLOR_BCYAN="$({ exists tput && tput bold && tput setaf 6; } 2>/dev/null || printf '\033[1;36m')"
|
||||
fi
|
||||
|
||||
# Set "NO_STDOUT" variable if the quiet option is enabled (other methods will honor this variable).
|
||||
if [ "${quiet:?}" = 'true' ]; then
|
||||
NO_STDOUT='true'
|
||||
fi
|
||||
|
||||
# Check the header file.
|
||||
case "${headerFile:?}" in
|
||||
# If the file value equals "-", use stdin.
|
||||
'-') headerFile="$(createTemp 'file')"; cat <&0 > "${headerFile:?}" ;;
|
||||
# If the file value equals "none", use an empty file.
|
||||
'none') headerFile="$(createTemp 'file')" ;;
|
||||
# If the file value equals "builtin", use the built-in value.
|
||||
'builtin') headerFile="$(createTemp 'file')"; printf '%s' "${HBLOCK_HEADER_BUILTIN?}" > "${headerFile:?}" ;;
|
||||
# If the file does not exist, throw an error.
|
||||
*) [ -e "${headerFile:?}" ] || { printError "No such file: ${headerFile:?}"; exit 1; } ;;
|
||||
esac
|
||||
|
||||
# Check the footer file.
|
||||
case "${footerFile:?}" in
|
||||
# If the file value equals "-", use stdin.
|
||||
'-') footerFile="$(createTemp 'file')"; cat <&0 > "${footerFile:?}" ;;
|
||||
# If the file value equals "none", use an empty file.
|
||||
'none') footerFile="$(createTemp 'file')" ;;
|
||||
# If the file value equals "builtin", use the built-in value.
|
||||
'builtin') footerFile="$(createTemp 'file')"; printf '%s' "${HBLOCK_FOOTER_BUILTIN?}" > "${footerFile:?}" ;;
|
||||
# If the file does not exist, throw an error.
|
||||
*) [ -e "${footerFile:?}" ] || { printError "No such file: ${footerFile:?}"; exit 1; } ;;
|
||||
esac
|
||||
|
||||
# Check the sources file.
|
||||
case "${sourcesFile:?}" in
|
||||
# If the file value equals "-", use stdin.
|
||||
'-') sourcesFile="$(createTemp 'file')"; cat <&0 > "${sourcesFile:?}" ;;
|
||||
# If the file value equals "none", use an empty file.
|
||||
'none') sourcesFile="$(createTemp 'file')" ;;
|
||||
# If the file value equals "builtin", use the built-in value.
|
||||
'builtin') sourcesFile="$(createTemp 'file')"; printf '%s' "${HBLOCK_SOURCES_BUILTIN?}" > "${sourcesFile:?}" ;;
|
||||
# If the file does not exist, throw an error.
|
||||
*) [ -e "${sourcesFile:?}" ] || { printError "No such file: ${sourcesFile:?}"; exit 1; } ;;
|
||||
esac
|
||||
|
||||
# Check the allowlist file.
|
||||
case "${allowlistFile:?}" in
|
||||
# If the file value equals "-", use stdin.
|
||||
'-') allowlistFile="$(createTemp 'file')"; cat <&0 > "${allowlistFile:?}" ;;
|
||||
# If the file value equals "none", use an empty file.
|
||||
'none') allowlistFile="$(createTemp 'file')" ;;
|
||||
# If the file value equals "builtin", use the built-in value.
|
||||
'builtin') allowlistFile="$(createTemp 'file')"; printf '%s' "${HBLOCK_ALLOWLIST_BUILTIN?}" > "${allowlistFile:?}" ;;
|
||||
# If the file does not exist, throw an error.
|
||||
*) [ -e "${allowlistFile:?}" ] || { printError "No such file: ${allowlistFile:?}"; exit 1; } ;;
|
||||
esac
|
||||
|
||||
# Check the denylist file.
|
||||
case "${denylistFile:?}" in
|
||||
# If the file value equals "-", use stdin.
|
||||
'-') denylistFile="$(createTemp 'file')"; cat <&0 > "${denylistFile:?}" ;;
|
||||
# If the file value equals "none", use an empty file.
|
||||
'none') denylistFile="$(createTemp 'file')" ;;
|
||||
# If the file value equals "builtin", use the built-in value.
|
||||
'builtin') denylistFile="$(createTemp 'file')"; printf '%s' "${HBLOCK_DENYLIST_BUILTIN?}" > "${denylistFile:?}" ;;
|
||||
# If the file does not exist, throw an error.
|
||||
*) [ -e "${denylistFile:?}" ] || { printError "No such file: ${denylistFile:?}"; exit 1; } ;;
|
||||
esac
|
||||
|
||||
# Create an empty blocklist file.
|
||||
blocklistFile="$(createTemp 'file')"
|
||||
|
||||
# If the sources file is not empty, each source is downloaded and appended to the blocklist file.
|
||||
if [ -s "${sourcesFile:?}" ]; then
|
||||
printInfo 'Downloading sources'
|
||||
|
||||
sourcesDlDir="$(createTemp 'dir')"
|
||||
sourcesUrlFile="$(createTemp 'file')"
|
||||
|
||||
# Read the sources file ignoring comments or empty lines.
|
||||
removeComments < "${sourcesFile:?}" > "${sourcesUrlFile:?}"
|
||||
|
||||
while IFS= read -r url || [ -n "${url?}" ]; do
|
||||
# Wait if the number of running jobs exceeds the concurrency limit.
|
||||
if [ "${parallel:?}" -gt '0' ]; then
|
||||
while [ "${parallel:?}" -le "$(dirCount "${sourcesDlDir:?}"/*.part)" ]; do
|
||||
# POSIX does not specify the "-n" option, wait for the last PID as fallback.
|
||||
# shellcheck disable=SC3045
|
||||
wait -n 2>/dev/null || wait "${!}"
|
||||
done
|
||||
fi
|
||||
|
||||
# Initialize the download job and send it to the background.
|
||||
printList "${url:?}"
|
||||
sourceDlFile="${sourcesDlDir:?}"/"$(rand)"
|
||||
touch -- "${sourceDlFile:?}.part"
|
||||
{
|
||||
if fetchUrl "${url:?}" > "${sourceDlFile:?}.part"; then
|
||||
if [ -e "${sourceDlFile:?}.part" ]; then
|
||||
printf '\n' >> "${sourceDlFile:?}.part"
|
||||
mv -- "${sourceDlFile:?}.part" "${sourceDlFile:?}"
|
||||
fi
|
||||
else
|
||||
rm -f -- "${sourceDlFile:?}.part"
|
||||
if [ "${continue:?}" = 'true' ]; then
|
||||
printWarn "Cannot obtain source: ${url:?}"
|
||||
else
|
||||
printError "Cannot obtain source: ${url:?}"
|
||||
{ kill "${$}"; exit 1; } 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
} &
|
||||
done < "${sourcesUrlFile:?}"
|
||||
wait
|
||||
|
||||
# Append downloaded sources to the blocklist file.
|
||||
cat -- "${sourcesDlDir:?}"/* >> "${blocklistFile:?}"
|
||||
rm -rf -- "${sourcesDlDir:?}"
|
||||
fi
|
||||
|
||||
# If the denylist file is not empty, it is appended to the blocklist file.
|
||||
if [ -s "${denylistFile:?}" ]; then
|
||||
printInfo 'Applying denylist'
|
||||
cat -- "${denylistFile:?}" >> "${blocklistFile:?}"
|
||||
fi
|
||||
|
||||
# If the blocklist file is not empty, it is sanitized.
|
||||
if [ -s "${blocklistFile:?}" ]; then
|
||||
printInfo 'Sanitizing blocklist'
|
||||
sanitizeBlocklist "${lenient:?}" < "${blocklistFile:?}" | removeReservedTLDs | sponge "${blocklistFile:?}"
|
||||
fi
|
||||
|
||||
# If the allowlist file is not empty, the entries on it are removed from the blocklist file.
|
||||
if [ -s "${allowlistFile:?}" ]; then
|
||||
printInfo 'Applying allowlist'
|
||||
allowlistPatternFile="$(createTemp 'file')"
|
||||
# Entries are treated as regexes depending on whether the regex option is enabled.
|
||||
removeComments < "${allowlistFile:?}" >> "${allowlistPatternFile:?}"
|
||||
if [ "${regex:?}" = 'true' ]; then
|
||||
grep -vf "${allowlistPatternFile:?}" -- "${blocklistFile:?}" | sponge "${blocklistFile:?}"
|
||||
else
|
||||
grep -Fxvf "${allowlistPatternFile:?}" -- "${blocklistFile:?}" | sponge "${blocklistFile:?}"
|
||||
fi
|
||||
rm -f -- "${allowlistPatternFile:?}"
|
||||
fi
|
||||
|
||||
# If the blocklist file is not empty, it is filtered and sorted.
|
||||
if [ -s "${blocklistFile:?}" ]; then
|
||||
if [ "${filterSubdomains:?}" = 'true' ]; then
|
||||
printInfo 'Filtering redundant subdomains'
|
||||
awkReverseScript="$(cat <<-'EOF'
|
||||
BEGIN { FS = "." }
|
||||
{
|
||||
for (i = NF; i > 0; i--) {
|
||||
printf("%s%s", $i, (i > 1 ? FS : RS))
|
||||
}
|
||||
}
|
||||
EOF
|
||||
)"
|
||||
awkFilterScript="$(cat <<-'EOF'
|
||||
BEGIN { p = "." }
|
||||
{
|
||||
if (index($0, p) != 1) {
|
||||
print($0); p = $0"."
|
||||
}
|
||||
}
|
||||
EOF
|
||||
)"
|
||||
awk "${awkReverseScript:?}" < "${blocklistFile:?}" | sort \
|
||||
| awk "${awkFilterScript:?}" | awk "${awkReverseScript:?}" \
|
||||
| sponge "${blocklistFile:?}"
|
||||
fi
|
||||
|
||||
printInfo 'Sorting blocklist'
|
||||
sort < "${blocklistFile:?}" | uniq | sponge "${blocklistFile:?}"
|
||||
fi
|
||||
|
||||
# Count blocked domains.
|
||||
blocklistCount="$(wc -l < "${blocklistFile:?}" | awk '{print($1)}')"
|
||||
|
||||
# If the blocklist file is not empty, the format template is applied.
|
||||
if [ -s "${blocklistFile:?}" ]; then
|
||||
printInfo 'Applying format template'
|
||||
# The number of domains per line is equal to the value of the wrap option.
|
||||
if [ "${wrap:?}" -gt '1' ]; then
|
||||
awkWrapScript='{ORS=(NR%W?FS:RS)}1;END{if(NR%W){printf(RS)}}'
|
||||
awk -v FS=' ' -v RS='\n' -v W="${wrap:?}" "${awkWrapScript:?}" < "${blocklistFile:?}" \
|
||||
| sponge "${blocklistFile:?}"
|
||||
fi
|
||||
# The following awk script replaces in the template the variables starting with a % sign with their value.
|
||||
awkTemplateScript="$(cat <<-'EOF'
|
||||
BEGIN {
|
||||
Tl = length(T); split(T, Ta, "")
|
||||
for (i = 1; i <= Tl; i++) {
|
||||
if (Ta[i] == "%") {
|
||||
i++; if (Ta[i] == "D") { Vn[++Vl] = "D"; Vp[Vl] = i - 1 }
|
||||
else if (Ta[i] == "R") { Vn[++Vl] = "R"; Vp[Vl] = i - 1 }
|
||||
else if (Ta[i] == "%") { Vn[++Vl] = "%"; Vp[Vl] = i - 1 }
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
o = T
|
||||
for (i = Vl; i > 0 ; i--) {
|
||||
if (Vn[i] == "D") v = $0
|
||||
else if (Vn[i] == "R") v = R
|
||||
else if (Vn[i] == "%") v = "%"
|
||||
else v = ""
|
||||
o = substr(o, 1, Vp[i] - 1) v substr(o, Vp[i] + 2)
|
||||
}
|
||||
print(o)
|
||||
}
|
||||
EOF
|
||||
)"
|
||||
awk -v T="${template?}" -v R="${redirection?}" "${awkTemplateScript:?}" < "${blocklistFile:?}" \
|
||||
| sponge "${blocklistFile:?}"
|
||||
fi
|
||||
|
||||
printOutputFile() {
|
||||
# Define "C" variable for convenience.
|
||||
C="${comment?}"
|
||||
|
||||
# Append banner to the output file.
|
||||
if [ -n "${C?}" ]; then
|
||||
cat <<-EOF
|
||||
${C?} Generated with hBlock ${HBLOCK_VERSION:?} (${HBLOCK_REPOSITORY:?})
|
||||
${C?} Blocked domains: ${blocklistCount:?}
|
||||
EOF
|
||||
if [ -z "${SOURCE_DATE_EPOCH+x}" ]; then
|
||||
cat <<-EOF
|
||||
${C?} Date: $(date)
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
# If the header file is not empty, it is appended to the output file.
|
||||
if [ -s "${headerFile:?}" ]; then
|
||||
[ -z "${C?}" ] || printf '\n%s\n' "${C?} BEGIN HEADER"
|
||||
awk 1 < "${headerFile:?}"
|
||||
[ -z "${C?}" ] || printf '%s\n' "${C?} END HEADER"
|
||||
fi
|
||||
|
||||
# If the blocklist file is not empty, it is appended to the output file.
|
||||
if [ -s "${blocklistFile:?}" ]; then
|
||||
[ -z "${C?}" ] || printf '\n%s\n' "${C?} BEGIN BLOCKLIST"
|
||||
awk 1 < "${blocklistFile:?}"
|
||||
[ -z "${C?}" ] || printf '%s\n' "${C?} END BLOCKLIST"
|
||||
fi
|
||||
|
||||
# If the footer file is not empty, it is appended to the output file.
|
||||
if [ -s "${footerFile:?}" ]; then
|
||||
[ -z "${C?}" ] || printf '\n%s\n' "${C?} BEGIN FOOTER"
|
||||
awk 1 < "${footerFile:?}"
|
||||
[ -z "${C?}" ] || printf '%s\n' "${C?} END FOOTER"
|
||||
fi
|
||||
}
|
||||
|
||||
# If the file name equals "-", print to stdout.
|
||||
if [ "${outputFile:?}" = '-' ]; then
|
||||
printOutputFile
|
||||
# Try writing the file.
|
||||
elif touch -- "${outputFile:?}" >/dev/null 2>&1; then
|
||||
printOutputFile > "${outputFile:?}"
|
||||
# If writing fails, try with sudo.
|
||||
elif exists sudo && exists tee; then
|
||||
printOutputFile | sudo tee -- "${outputFile:?}" >/dev/null
|
||||
# Throw an error for everything else.
|
||||
else
|
||||
printError "Cannot write file: ${outputFile:?}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printInfo "${blocklistCount:?} blocked domains!"
|
||||
}
|
||||
|
||||
main "${@-}"
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
python3 ~/.local/share/pmostools/peptools/kumo.py
|
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/python3
|
||||
"""
|
||||
* Author: "PeppermintOS Team(peppermintosteam@proton.me)
|
||||
*
|
||||
* License: SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*
|
||||
* See if neofetch or screenfetch are installen if not run
|
||||
* our peppermint tool
|
||||
"""
|
||||
import subprocess
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
PMOS_TOOLS = '~/.local/share/pmostools/peptools'
|
||||
HOME_FOLDER = str(Path(PMOS_TOOLS).expanduser())
|
||||
PFETCH = HOME_FOLDER + '/pfetch.py'
|
||||
|
||||
|
||||
def check_command_installed(command):
|
||||
""" See if NEO or SCREEN fetch is installed """
|
||||
try:
|
||||
subprocess.check_output(['which', command])
|
||||
return True
|
||||
except subprocess.CalledProcessError:
|
||||
return False
|
||||
|
||||
def main():
|
||||
""" Begin the applicatipon"""
|
||||
if check_command_installed('neofetch'):
|
||||
subprocess.run(['neofetch'])
|
||||
elif check_command_installed('screenfetch'):
|
||||
subprocess.run(['screenfetch'])
|
||||
else:
|
||||
if os.path.exists(PFETCH):
|
||||
subprocess.run(['python3', PFETCH])
|
||||
else:
|
||||
print("Error: pfetch.py not found")
|
||||
|
||||
main()
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
python3 ~/.local/share/pmostools/peptools/suggested.py
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
python3 ~/.local/share/pmostools/peptools/welcome.py
|
|
@ -0,0 +1,210 @@
|
|||
#!/bin/bash
|
||||
|
||||
PROGNAME="xDaily"
|
||||
[ "$USER" != "root" ] &&
|
||||
echo -e "\t$PROGNAME must be run as root. \n\tOr with \`sudo $PROGNAME\` ." && exit
|
||||
|
||||
### Our options are going to be
|
||||
# = "full output to the terminal, no stopping."
|
||||
# -i = "interactive"
|
||||
# -q = "interactive but suppressed output"
|
||||
OPTIND="0"
|
||||
for i in _quiet _interactive ; do unset -v $i ; done
|
||||
|
||||
while getopts 'iq' OPTION; do
|
||||
case "$OPTION" in
|
||||
i)
|
||||
_interactive="yes"
|
||||
echo -e " Entering interactive mode\n"
|
||||
break
|
||||
;;
|
||||
|
||||
q)
|
||||
_quiet="yes"
|
||||
echo -e " Entering interactive mode, without verbose output.\n"
|
||||
break
|
||||
;;
|
||||
|
||||
?)
|
||||
echo "Usage: $(basename ${PROGNAME}) [-i = interactive] [-q = suppressed ouput]"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
[ "$(which nala)" ] && PkgMgr="nala" || PkgMgr="apt"
|
||||
|
||||
see_it() {
|
||||
[ "$_interactive" = "yes" ] && ( read -n1 -p " $_msg ? \"Y/n\" " answ
|
||||
[ -z $answ ] || [ "$answ" = "y" ] || [ "$answ" = "Y" ] && echo &&
|
||||
do_it &&
|
||||
echo -e " $_msg - Completed.\n" ||
|
||||
echo -e "\r $_msg - Skipped.\n" )
|
||||
}
|
||||
|
||||
no_see() {
|
||||
[ "$_quiet" = "yes" ] && ( read -n1 -p " $_msg ? \"Y/n\" " answ
|
||||
[ -z $answ ] || [ "$answ" = "y" ] || [ "$answ" = "Y" ] && echo &&
|
||||
do_it > /dev/null &&
|
||||
echo -e " $_msg - Completed.\n" ||
|
||||
echo -e "\r $_msg - Skipped.\n" )
|
||||
}
|
||||
|
||||
run_it() {
|
||||
[ "$_interactive" != "yes" ] && [ "$_quiet" != "yes" ] && (
|
||||
echo -e "\n $_msg ." &&
|
||||
do_it &&
|
||||
echo -e " $_msg - Completed." )
|
||||
}
|
||||
|
||||
# Begin xDaily command functions
|
||||
_update() {
|
||||
_msg="Check apt repositories for Updates"
|
||||
do_it() {
|
||||
[ "$_quiet" != "yes" ] &&
|
||||
$PkgMgr update ||
|
||||
$PkgMgr update 2>&1 >/dev/null
|
||||
}
|
||||
see_it
|
||||
no_see
|
||||
run_it
|
||||
}
|
||||
|
||||
_upgradable() {
|
||||
_msg="See upgradable packages"
|
||||
do_it() {
|
||||
[ "$_quiet" != "yes" ] &&
|
||||
$PkgMgr list --upgradable ||
|
||||
$PkgMgr list --upgradable 2>&1 >/dev/null
|
||||
}
|
||||
see_it
|
||||
# no_see
|
||||
# run_it
|
||||
}
|
||||
|
||||
_upgrade() {
|
||||
_msg="Install available updated packages"
|
||||
do_it() {
|
||||
[ "$_quiet" != "yes" ] &&
|
||||
$PkgMgr upgrade ||
|
||||
$PkgMgr upgrade 2>&1 >/dev/null
|
||||
}
|
||||
see_it
|
||||
no_see
|
||||
run_it
|
||||
}
|
||||
|
||||
_apt_clean() {
|
||||
_msg="Remove unneccessary packages from APT cache"
|
||||
do_it() {
|
||||
[ "$_quiet" != "yes" ] &&
|
||||
$PkgMgr clean ||
|
||||
$PkgMgr clean 2>&1 >/dev/null
|
||||
}
|
||||
see_it
|
||||
no_see
|
||||
run_it
|
||||
}
|
||||
|
||||
_autoclean () {
|
||||
_msg="Remove unavailable entries from APT cache"
|
||||
do_it() {
|
||||
[ "$_quiet" != "yes" ] &&
|
||||
$PkgMgr autoclean ||
|
||||
$PkgMgr autoclean 2>&1 >/dev/null
|
||||
}
|
||||
see_it
|
||||
no_see
|
||||
run_it
|
||||
}
|
||||
|
||||
_autoremove() {
|
||||
_msg="Remove old dependencies not required by the system"
|
||||
do_it() {
|
||||
[ "$_quiet" != "yes" ] &&
|
||||
$PkgMgr autoremove ||
|
||||
$PkgMgr autoremove 2>&1 >/dev/null
|
||||
}
|
||||
see_it
|
||||
no_see
|
||||
run_it
|
||||
}
|
||||
|
||||
_clear_thumbnails() {
|
||||
_msg="Clear browser thumbnail caches"
|
||||
do_it() {
|
||||
for i in ".thumbnails" ".cache/thumbnails" ; do
|
||||
for j in "*/*.png" "*/*/*.png" ; do
|
||||
[ "$_quiet" != "yes" ] &&
|
||||
rm -v /home/${SUDO_USER}/${i}/${j} 2>/dev/null ||
|
||||
rm /home/${SUDO_USER}/${i}/${j} 2>/dev/null
|
||||
done
|
||||
done ; true
|
||||
}
|
||||
see_it
|
||||
no_see
|
||||
run_it
|
||||
}
|
||||
|
||||
_clear_recents() {
|
||||
_msg="Clear the \"Recently Used\" list in FireFox"
|
||||
do_it() {
|
||||
dd bs=1 count=1 status=none if=/dev/null of=/home/${SUDO_USER}/.local/share/recently-used.xbel
|
||||
chown ${SUDO_USER} /home/${SUDO_USER}/.local/share/recently-used.xbel
|
||||
}
|
||||
see_it
|
||||
no_see
|
||||
run_it
|
||||
}
|
||||
|
||||
_rbranding() {
|
||||
_msg="Reconfirm Peppermint Branding in os-release"
|
||||
do_it() {
|
||||
diff -q /opt/pepconf/os-release /usr/lib/os-release || cp /opt/pepconf/os-release /usr/lib/os-release
|
||||
diff -q /opt/pepconf/os-release /etc/os-release || cp /opt/pepconf/os-release /etc/os-release
|
||||
}
|
||||
see_it
|
||||
no_see
|
||||
run_it
|
||||
}
|
||||
|
||||
_ssd_trimfs() {
|
||||
_msg="For SSDs: trim eligible ext2/3/4 filesystems"
|
||||
do_it() {
|
||||
for mnt in $(grep -E "(ext2|ext3|ext4)" /etc/mtab | cut -f2 -d" ")
|
||||
do fstrim ${mnt} &>/dev/null &&
|
||||
echo -e " Completed fstrim for \"${mnt}\"" ||
|
||||
echo -e " No fstrim required for \"${mnt}\""
|
||||
done
|
||||
}
|
||||
see_it
|
||||
no_see
|
||||
run_it
|
||||
}
|
||||
|
||||
|
||||
_udcache() {
|
||||
_msg="Caching icons at /usr/share/icons/"
|
||||
do_it() { update-icon-caches /usr/share/icons/* ;}
|
||||
see_it
|
||||
no_see
|
||||
run_it
|
||||
}
|
||||
|
||||
|
||||
_update
|
||||
_upgradable
|
||||
_upgrade
|
||||
_apt_clean
|
||||
if [ "$PkgMgr" = "apt" ]; then _autoclean ; fi
|
||||
_autoremove
|
||||
_clear_thumbnails
|
||||
_clear_recents
|
||||
_udcache
|
||||
_rbranding
|
||||
_ssd_trimfs
|
||||
|
||||
[ "$_interactive" = "yes" ] &&
|
||||
read -n1 -p " Press any key to continue ... " answ
|
||||
echo
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
python3 ~/.local/share/pmostools/peptools/xdaily.py
|
249
README.md
|
@ -1,2 +1,249 @@
|
|||
# pep-mklive
|
||||
<!-- DO NOT EDIT, generated by make README.md -->
|
||||
|
||||
# The Void Linux live image/rootfs generator and installer
|
||||
|
||||
## Overview
|
||||
|
||||
This repository contains several utilities:
|
||||
|
||||
* [*mklive.sh*](#mklivesh) - The Void Linux live image generator for x86
|
||||
* [*build-x86-images.sh*](#build-x86-imagessh) - Wrapper script to generate bootable
|
||||
and installable live images for x86
|
||||
* [*mkrootfs.sh*](#mkrootfssh) - The Void Linux rootfs generator for all platforms
|
||||
* [*mkplatformfs.sh*](#mkplatformfssh) - The Void Linux filesystem tool to produce
|
||||
a rootfs for a particular platform
|
||||
* [*mkimage.sh*](#mkimagesh) - The Void Linux image generator for ARM platforms
|
||||
* [*mknet.sh*](#mknetsh) - Script to generate netboot tarballs for Void
|
||||
* *installer.sh* - The Void Linux el-cheapo installer for x86
|
||||
* *release.sh* - interacts with GitHub CI to generate and sign images for releases
|
||||
|
||||
### Workflow
|
||||
|
||||
#### Generating x86 live ISOs
|
||||
|
||||
To generate a live ISO like the officially-published ones, use
|
||||
[*build-x86-images.sh*](#build-x86-imagessh). To generate a more basic live ISO
|
||||
(which does not include things like `void-installer`), use [*mklive.sh*](#mklivesh).
|
||||
|
||||
#### Generating ROOTFS tarballs
|
||||
|
||||
ROOTFS tarballs contain a basic Void Linux root filesystem without a kernel.
|
||||
These can be useful for doing a [chroot install](https://docs.voidlinux.org/installation/guides/chroot.html)
|
||||
or for [chroots and containers](https://docs.voidlinux.org/config/containers-and-vms/chroot.html).
|
||||
|
||||
Use [*mkrootfs.sh*](#mkrootfssh) to generate a Void Linux ROOTFS.
|
||||
|
||||
#### Generating platform-specific tarballs
|
||||
|
||||
Platform-specific ROOTFS tarballs, or PLATFORMFS tarballs, contain a basic Void
|
||||
Linux root filesystem including a kernel. These are commonly used for bootstrapping
|
||||
ARM systems or other environments that require platform-specific kernels, like
|
||||
Raspberry Pis.
|
||||
|
||||
First create a ROOTFS for the desired architecture, then use
|
||||
[*mkplatformfs.sh*](#mkplatformfssh) to generate a Void Linux PLATFORMFS.
|
||||
|
||||
#### Generating ARM images
|
||||
|
||||
Platform-specific filesystem images contain a basic filesystem layout (`/` and
|
||||
`/boot` partitions), ready to be copied to the target drive with `dd`. These are
|
||||
not "live" images like those available on x86 platforms, and do not need
|
||||
installation like live ISOs.
|
||||
|
||||
To generate these images, first create a PLATFORMFS for the desired platform,
|
||||
then use [*mkimage.sh*](#mkimagesh) to generate the image.
|
||||
|
||||
## Dependencies
|
||||
|
||||
Note that void-mklive is not guaranteed to work on distributions other than Void
|
||||
Linux, or in containers.
|
||||
|
||||
* Compression type for the initramfs image (by default: liblz4 for lz4, xz)
|
||||
* xbps>=0.45
|
||||
* qemu-user-static binaries (for mkrootfs)
|
||||
* bash
|
||||
|
||||
## Kernel Command-line Parameters
|
||||
|
||||
`void-mklive`-based live images support several kernel command-line arguments
|
||||
that can change the behavior of the live system:
|
||||
|
||||
- `live.autologin` will skip the initial login screen on `tty1`.
|
||||
- `live.user` will change the username of the non-root user from the default
|
||||
`anon`. The password remains `voidlinux`.
|
||||
- `live.shell` sets the default shell for the non-root user in the live environment.
|
||||
- `live.accessibility` enables accessibility features like the console screenreader
|
||||
`espeakup` in the live environment.
|
||||
- `console` can be set to `ttyS0`, `hvc0`, or `hvsi0` to enable `agetty` on that
|
||||
serial console.
|
||||
- `locale.LANG` will set the `LANG` environment variable. Defaults to `en_US.UTF-8`.
|
||||
- `vconsole.keymap` will set the console keymap. Defaults to `us`.
|
||||
|
||||
### Examples:
|
||||
|
||||
- `live.autologin live.user=foo live.shell=/bin/bash` would create the user `foo`
|
||||
with the default shell `/bin/bash` on boot, and log them in automatically on `tty1`
|
||||
- `live.shell=/bin/bash` would set the default shell for the `anon` user to `/bin/bash`
|
||||
- `console=ttyS0 vconsole.keymap=cf` would enable `ttyS0` and set the keymap in
|
||||
the console to `cf`
|
||||
- `locale.LANG=fr_CA.UTF-8` would set the live system's language to `fr_CA.UTF-8`
|
||||
|
||||
## Usage
|
||||
|
||||
### build-x86-images.sh
|
||||
|
||||
```
|
||||
Usage: build-x86-images.sh [options ...] [-- mklive options ...]
|
||||
|
||||
Wrapper script around mklive.sh for several standard flavors of live images.
|
||||
Adds void-installer and other helpful utilities to the generated images.
|
||||
|
||||
OPTIONS
|
||||
-a <arch> Set XBPS_ARCH in the image
|
||||
-b <variant> One of base, enlightenment, xfce, mate, cinnamon, gnome, kde,
|
||||
lxde, or lxqt (default: base). May be specified multiple times
|
||||
to build multiple variants
|
||||
-d <date> Override the datestamp on the generated image (YYYYMMDD format)
|
||||
-t <arch-date-variant>
|
||||
Equivalent to setting -a, -b, and -d
|
||||
-r <repo> Use this XBPS repository. May be specified multiple times
|
||||
-h Show this help and exit
|
||||
-V Show version and exit
|
||||
|
||||
Other options can be passed directly to mklive.sh by specifying them after the --.
|
||||
See mklive.sh -h for more details.
|
||||
```
|
||||
|
||||
### mklive.sh
|
||||
|
||||
```
|
||||
Usage: mklive.sh [options]
|
||||
|
||||
Generates a basic live ISO image of Void Linux. This ISO image can be written
|
||||
to a CD/DVD-ROM or any USB stick.
|
||||
|
||||
To generate a more complete live ISO image, use build-x86-images.sh.
|
||||
|
||||
OPTIONS
|
||||
-a <arch> Set XBPS_ARCH in the ISO image
|
||||
-b <system-pkg> Set an alternative base package (default: base-system)
|
||||
-r <repo> Use this XBPS repository. May be specified multiple times
|
||||
-c <cachedir> Use this XBPS cache directory (default: ./xbps-cachedir-<arch>)
|
||||
-k <keymap> Default keymap to use (default: us)
|
||||
-l <locale> Default locale to use (default: en_US.UTF-8)
|
||||
-i <lz4|gzip|bzip2|xz>
|
||||
Compression type for the initramfs image (default: xz)
|
||||
-s <gzip|lzo|xz> Compression type for the squashfs image (default: xz)
|
||||
-o <file> Output file name for the ISO image (default: automatic)
|
||||
-p "<pkg> ..." Install additional packages in the ISO image
|
||||
-g "<pkg> ..." Ignore packages when building the ISO image
|
||||
-I <includedir> Include directory structure under given path in the ROOTFS
|
||||
-S "<service> ..." Enable services in the ISO image
|
||||
-C "<arg> ..." Add additional kernel command line arguments
|
||||
-T <title> Modify the bootloader title (default: Void Linux)
|
||||
-v linux<version> Install a custom Linux version on ISO image (default: linux metapackage)
|
||||
-K Do not remove builddir
|
||||
-h Show this help and exit
|
||||
-V Show version and exit
|
||||
```
|
||||
|
||||
### mkrootfs.sh
|
||||
|
||||
```
|
||||
Usage: mkrootfs.sh [options] <arch>
|
||||
|
||||
Generate a Void Linux ROOTFS tarball for the specified architecture.
|
||||
|
||||
Supported architectures:
|
||||
i686, i686-musl, x86_64, x86_64-musl,
|
||||
armv5tel, armv5tel-musl, armv6l, armv6l-musl, armv7l, armv7l-musl
|
||||
aarch64, aarch64-musl,
|
||||
mipsel, mipsel-musl,
|
||||
ppc, ppc-musl, ppc64le, ppc64le-musl, ppc64, ppc64-musl
|
||||
|
||||
OPTIONS
|
||||
-b <system-pkg> Set an alternative base-system package (default: base-container-full)
|
||||
-c <cachedir> Set XBPS cache directory (default: ./xbps-cachedir-<arch>)
|
||||
-C <file> Full path to the XBPS configuration file
|
||||
-r <repo> Use this XBPS repository. May be specified multiple times
|
||||
-o <file> Filename to write the ROOTFS to (default: automatic)
|
||||
-x <num> Number of threads to use for image compression (default: dynamic)
|
||||
-h Show this help and exit
|
||||
-V Show version and exit
|
||||
```
|
||||
|
||||
### mkplatformfs.sh
|
||||
|
||||
```
|
||||
Usage: mkplatformfs.sh [options] <platform> <rootfs-tarball>
|
||||
|
||||
Generates a platform-specific ROOTFS tarball from a generic Void Linux ROOTFS
|
||||
generated by mkrootfs.sh.
|
||||
|
||||
Supported platforms: i686, x86_64, GCP,
|
||||
rpi-armv6l, rpi-armv7l, rpi-aarch64,
|
||||
pinebookpro, pinephone, rock64
|
||||
|
||||
OPTIONS
|
||||
-b <system-pkg> Set an alternative base-system package (default: base-system)
|
||||
-c <cachedir> Set the XBPS cache directory (default: ./xbps-cachedir-<arch>)
|
||||
-C <file> Full path to the XBPS configuration file
|
||||
-k <cmd> Call '<cmd> <ROOTFSPATH>' after building the ROOTFS
|
||||
-n Do not compress the image, instead print out the ROOTFS directory
|
||||
-o <file> Filename to write the PLATFORMFS archive to (default: automatic)
|
||||
-p "<pkg> ..." Additional packages to install into the ROOTFS
|
||||
-r <repo> Use this XBPS repository. May be specified multiple times
|
||||
-x <num> Number of threads to use for image compression (default: dynamic)
|
||||
-h Show this help and exit
|
||||
-V Show version and exit
|
||||
```
|
||||
|
||||
### mkimage.sh
|
||||
|
||||
```
|
||||
Usage: mkimage.sh [options] <platformfs-tarball>
|
||||
|
||||
Generates a filesystem image suitable for writing with dd from a PLATFORMFS
|
||||
tarball generated by mkplatformfs.sh. The filesystem layout is configurable,
|
||||
but customization of the installed system should be done when generating the
|
||||
PLATFORMFS. The resulting image will have 2 partitions, /boot and /.
|
||||
|
||||
OPTIONS
|
||||
-b <fstype> /boot filesystem type (default: vfat)
|
||||
-B <bsize> /boot filesystem size (default: 256MiB)
|
||||
-r <fstype> / filesystem type (default: ext4)
|
||||
-s <totalsize> Total image size (default: 2GiB)
|
||||
-o <output> Image filename (default: guessed automatically)
|
||||
-x <num> Number of threads to use for image compression (default: dynamic)
|
||||
-h Show this help and exit
|
||||
-V Show version and exit
|
||||
|
||||
Accepted size suffixes: KiB, MiB, GiB, TiB, EiB.
|
||||
|
||||
The <platformfs-tarball> argument expects a tarball generated by mkplatformfs.sh.
|
||||
The platform is guessed automatically by its name.
|
||||
```
|
||||
|
||||
### mknet.sh
|
||||
|
||||
```
|
||||
Usage: mknet.sh [options] <rootfs-tarball>
|
||||
|
||||
Generates a network-bootable tarball from a Void Linux ROOTFS generated by mkrootfs.
|
||||
|
||||
OPTIONS
|
||||
-r <repo> Use this XBPS repository. May be specified multiple times
|
||||
-c <cachedir> Use this XBPS cache directory (default: )
|
||||
-i <lz4|gzip|bzip2|xz>
|
||||
Compression type for the initramfs image (default: xz)
|
||||
-o <file> Output file name for the netboot tarball (default: automatic)
|
||||
-K linux<version> Install a custom Linux version on ISO image (default: linux metapackage)
|
||||
-k <keymap> Default keymap to use (default: us)
|
||||
-l <locale> Default locale to use (default: en_US.UTF-8)
|
||||
-C "<arg> ..." Add additional kernel command line arguments
|
||||
-T <title> Modify the bootloader title (default: Void Linux)
|
||||
-S <image> Set a custom splash image for the bootloader (default: data/splash.png)
|
||||
-h Show this help and exit
|
||||
-V Show version and exit
|
||||
```
|
||||
|
||||
|
|
|
@ -0,0 +1,90 @@
|
|||
# The Void Linux live image/rootfs generator and installer
|
||||
|
||||
## Overview
|
||||
|
||||
This repository contains several utilities:
|
||||
|
||||
* [*mklive.sh*](#mklivesh) - The Void Linux live image generator for x86
|
||||
* [*build-x86-images.sh*](#build-x86-imagessh) - Wrapper script to generate bootable
|
||||
and installable live images for x86
|
||||
* [*mkrootfs.sh*](#mkrootfssh) - The Void Linux rootfs generator for all platforms
|
||||
* [*mkplatformfs.sh*](#mkplatformfssh) - The Void Linux filesystem tool to produce
|
||||
a rootfs for a particular platform
|
||||
* [*mkimage.sh*](#mkimagesh) - The Void Linux image generator for ARM platforms
|
||||
* [*mknet.sh*](#mknetsh) - Script to generate netboot tarballs for Void
|
||||
* *installer.sh* - The Void Linux el-cheapo installer for x86
|
||||
* *release.sh* - interacts with GitHub CI to generate and sign images for releases
|
||||
|
||||
### Workflow
|
||||
|
||||
#### Generating x86 live ISOs
|
||||
|
||||
To generate a live ISO like the officially-published ones, use
|
||||
[*build-x86-images.sh*](#build-x86-imagessh). To generate a more basic live ISO
|
||||
(which does not include things like `void-installer`), use [*mklive.sh*](#mklivesh).
|
||||
|
||||
#### Generating ROOTFS tarballs
|
||||
|
||||
ROOTFS tarballs contain a basic Void Linux root filesystem without a kernel.
|
||||
These can be useful for doing a [chroot install](https://docs.voidlinux.org/installation/guides/chroot.html)
|
||||
or for [chroots and containers](https://docs.voidlinux.org/config/containers-and-vms/chroot.html).
|
||||
|
||||
Use [*mkrootfs.sh*](#mkrootfssh) to generate a Void Linux ROOTFS.
|
||||
|
||||
#### Generating platform-specific tarballs
|
||||
|
||||
Platform-specific ROOTFS tarballs, or PLATFORMFS tarballs, contain a basic Void
|
||||
Linux root filesystem including a kernel. These are commonly used for bootstrapping
|
||||
ARM systems or other environments that require platform-specific kernels, like
|
||||
Raspberry Pis.
|
||||
|
||||
First create a ROOTFS for the desired architecture, then use
|
||||
[*mkplatformfs.sh*](#mkplatformfssh) to generate a Void Linux PLATFORMFS.
|
||||
|
||||
#### Generating ARM images
|
||||
|
||||
Platform-specific filesystem images contain a basic filesystem layout (`/` and
|
||||
`/boot` partitions), ready to be copied to the target drive with `dd`. These are
|
||||
not "live" images like those available on x86 platforms, and do not need
|
||||
installation like live ISOs.
|
||||
|
||||
To generate these images, first create a PLATFORMFS for the desired platform,
|
||||
then use [*mkimage.sh*](#mkimagesh) to generate the image.
|
||||
|
||||
## Dependencies
|
||||
|
||||
Note that void-mklive is not guaranteed to work on distributions other than Void
|
||||
Linux, or in containers.
|
||||
|
||||
* Compression type for the initramfs image (by default: liblz4 for lz4, xz)
|
||||
* xbps>=0.45
|
||||
* qemu-user-static binaries (for mkrootfs)
|
||||
* bash
|
||||
|
||||
## Kernel Command-line Parameters
|
||||
|
||||
`void-mklive`-based live images support several kernel command-line arguments
|
||||
that can change the behavior of the live system:
|
||||
|
||||
- `live.autologin` will skip the initial login screen on `tty1`.
|
||||
- `live.user` will change the username of the non-root user from the default
|
||||
`anon`. The password remains `voidlinux`.
|
||||
- `live.shell` sets the default shell for the non-root user in the live environment.
|
||||
- `live.accessibility` enables accessibility features like the console screenreader
|
||||
`espeakup` in the live environment.
|
||||
- `console` can be set to `ttyS0`, `hvc0`, or `hvsi0` to enable `agetty` on that
|
||||
serial console.
|
||||
- `locale.LANG` will set the `LANG` environment variable. Defaults to `en_US.UTF-8`.
|
||||
- `vconsole.keymap` will set the console keymap. Defaults to `us`.
|
||||
|
||||
### Examples:
|
||||
|
||||
- `live.autologin live.user=foo live.shell=/bin/bash` would create the user `foo`
|
||||
with the default shell `/bin/bash` on boot, and log them in automatically on `tty1`
|
||||
- `live.shell=/bin/bash` would set the default shell for the `anon` user to `/bin/bash`
|
||||
- `console=ttyS0 vconsole.keymap=cf` would enable `ttyS0` and set the keymap in
|
||||
the console to `cf`
|
||||
- `locale.LANG=fr_CA.UTF-8` would set the live system's language to `fr_CA.UTF-8`
|
||||
|
||||
## Usage
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
alias ISO-datestamps='echo -en "\n Searching for files ...\r"; for i in /dev/sd[a-z] $(du -ahx ~/ 2>&1 | grep -v "\.iso". | grep "\.iso"| cut -f2) $(du -ahx / 2>&1 | grep -v "\.iso". | grep "\.iso"| cut -f2); do string=$(sudo hexdump -Cs 33598 -n16 $i | head -1 | cut -f2 -d"|" | cut -c"1-14"); [ "$string" != "" ] && echo " $string $i" ; done | sort -u'
|
||||
alias date_of_iso='for i in ./*.iso ./*/*.iso /dev/sd[a-z]; do echo " $(sudo hexdump -C -s33598 -n16 $i 2>/dev/null |head -1 | cut -f2 -d"|" | cut -c-14) $i" ; done | sort'
|
||||
alias cgrep='grep --color=always'
|
||||
alias grep='grep --color=auto'
|
||||
alias less='less -g'
|
||||
alias ls='ls --color=auto'
|
||||
alias locate='du -ah / 2>&1 | grep '
|
||||
alias snipe='du -ah ./ 2>&1 | grep '
|
||||
alias pep-writer='write-out-iso'
|
||||
alias plot-boot='systemd-analyze plot > /tmp/boot_plot.svg ; x-www-browser file:///tmp/boot_plot.svg &'
|
||||
alias timed='clear; neofetch; systemd-analyze'
|
||||
alias update-aliases='echo -en "\n\tUpdating aliases:\t"; for i in $(alias | grep "alias ". | cut -f1 -d= | cut -f2 -d" "); do echo -en "$i\t"; done ;echo; alias | tee ~/.bash_aliases > /dev/null'
|
||||
alias vi='busybox vi'
|
||||
alias vicr='for i in ./* ; do [ -f $i ] && vi -R "$i" ; done'
|
||||
alias view='vi -R'
|
||||
alias write-out-iso='
|
||||
sysc="\033[00m"
|
||||
grey="\033[30;01m"
|
||||
red="\033[31;01m"
|
||||
green="\033[32;01m"
|
||||
yellow="\033[33;01m"
|
||||
blue="\033[34;01m"
|
||||
violet="\033[35;01m"
|
||||
aqua="\033[36;01m"
|
||||
white="\033[37;01m"
|
||||
iso=" "
|
||||
dev=" "
|
||||
line1="${green}Type or copy-n-paste a file name from above.${sysc}"
|
||||
line2="${green}Type the full path to your USB device. ${yellow}(/dev/sdX)${sysc}"
|
||||
line3="The block device ${yellow}${dev}${sysc} was found and seems Ok to use."
|
||||
lsblk_cmd="lsblk -o PATH,VENDOR,MODEL,SIZE,HOTPLUG,RM"
|
||||
_abort="${green}To abort this now, press ${white}Ctrl+C${sysc} ."
|
||||
_anykey="Hit any key"
|
||||
_coward="Cowardly refusing to write to"
|
||||
_empty="${red}This field cannot be empty${sysc}"
|
||||
_cancel="to cancel"
|
||||
_continue="to continue"
|
||||
_knownISO="to enter the full path to the ${white}ISO${sysc}."
|
||||
_laststep="${aqua}This is the final step.${sysc}"
|
||||
_missing="File not found."
|
||||
_mounted="${red}The location is mounted.${sysc}"
|
||||
_noblock="is not a block device."
|
||||
_nochecks="No checks were done to determine this is an ISO image."
|
||||
_noDEV="The location ${white}${dev}${sysc} does not exist yet, Plug in a USB ?"
|
||||
_noISO="No ISO found in this directory."
|
||||
_notlisted="Check your file name or the location and retry."
|
||||
_passwd="${white}To write to a USB, your password may be required.${sysc}"
|
||||
_re_enter="to Re-Enter the location"
|
||||
_restart1="To start over, Press ${white}Ctrl+C${sysc},"
|
||||
_restart2="then move to a folder with the ISO."
|
||||
_retry="to retry"
|
||||
_search="Searching ${blue}${PWD}${sysc} for ISOs ."
|
||||
_write="${green}Hit ${white}ANY${green} key to write the file to"
|
||||
|
||||
clear
|
||||
echo -en "\n\t${_passwd}\n\t"
|
||||
sudo clear || echo -e "\tFailed password."
|
||||
|
||||
until [ ! -z "${iso}" ] && [ -e "${iso}" ] && ! (mount | grep -q "${iso}")
|
||||
do clear
|
||||
echo -e "\n ${_search}\n"
|
||||
for i in ./*.iso ./*/*.iso ; do ls $i 2>/dev/null ; done | /bin/grep "\.iso" &&
|
||||
echo -en "\n\t${line1}\n\n" || (
|
||||
echo -en "\n\t${_noISO} \n\n ${_restart1} ${_restart2}\n\n Or ${_anykey} ${_knownISO}"
|
||||
read -n1 -p " " pause && echo )
|
||||
|
||||
read -p " Path to ISO = " iso
|
||||
[ -z "${iso}" ] && (echo -en "\n${_empty}." ; read -n1 -p " ${_anykey} ${_continue}. " back) && continue
|
||||
[ ! -e "${iso}" ] && (echo -en "\n${_missing}." ; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||
( mount | grep -q "${iso}" ) && (echo -en "\n${_mounted}" ; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||
done
|
||||
|
||||
until [ ! -z $dev ] && [ -b $dev ] && ! (mount | grep -q $dev) && [ $dev != "/dev/sda" ] && [ $dev != "/dev/nvme01" ]
|
||||
do clear
|
||||
echo -e "\n\t ${green}Choose a block device to write the ISO to.${sysc}"
|
||||
echo -e "\n ${white}ISO${sysc} -----> ${white}$iso${sysc}\n "
|
||||
# echo -e "\n$($lsblk_cmd)\n" ; read -p "$line2 " dev
|
||||
echo -e "\n$($lsblk_cmd)\n" | grep -Ew "(PATH|/dev/sd[a-z])"; echo -en "\n $line2 "; read dev
|
||||
[ -z $dev ] && (echo -en "${_empty}."; read -n1 -p " ${_anykey} ${_continue}. " back) && continue
|
||||
[ ! -e $dev ] && (echo -en "${_noDEV}\n\n"; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||
[ ! -b $dev ] && (echo -en "${dev} ${_noblock}"; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||
(mount | grep -q "$dev") && (echo -en "\n${_mounted}"; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||
[ $dev = "/dev/sda" ] && (echo -en "${_coward} ${dev} ."; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||
[ $dev = "/dev/nvme01" ] && (echo -en "${_coward} ${dev} ."; read -n1 -p " ${_anykey} ${_retry}. " back) && continue
|
||||
done
|
||||
|
||||
clear
|
||||
echo -e "\n\t\t${_laststep}\n"
|
||||
# echo -e " \t${_anykey} ${_continue}.\n"
|
||||
echo -e " ${white}ISO${sysc} -----> ${white}${iso}${sysc} "
|
||||
# echo -e " Device --> ${dev}\n "
|
||||
# echo -e "$($lsblk_cmd ${dev})" | grep -Ew "(PATH|/dev/sd[a-z])"
|
||||
echo -en " ${white}Device${sysc} --> "
|
||||
($lsblk_cmd ${dev}) | /bin/grep -w ${dev}
|
||||
|
||||
echo -e "\n\tThe file ${white}$iso${sysc} exists."
|
||||
echo -e "\t(${_nochecks})"
|
||||
echo -e "\tThe block device ${yellow}${dev}${sysc} was found and seems Ok to use.\n\n"
|
||||
echo -e "\t${_abort}"
|
||||
echo -en "\t${_write} ${yellow}$dev${sysc} . "
|
||||
read -n1 go
|
||||
|
||||
echo -e "\n ${aqua}Writing ${white}${iso}${aqua} to ${yellow}$dev${aqua} ...${sysc}"
|
||||
|
||||
sudo dd bs=4M oflag=direct status=progress if="${iso}" of=${dev}'
|
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=Welcome to Peppermint
|
||||
Exec=welcome
|
||||
Icon=/usr/share/pixmaps/peppermint.png
|
||||
Terminal=false
|
||||
Categories=Settings
|
||||
StartupNotify=True
|
||||
Name[en_US]=Welcome to Peppermint
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Name=btop++
|
||||
GenericName=System Monitor
|
||||
GenericName[it]=Monitor di sistema
|
||||
Comment=Resource monitor that shows usage and stats for processor, memory, disks, network and processes
|
||||
Comment[it]=Monitoraggio delle risorse: mostra utilizzo e statistiche per CPU, dischi, rete e processi
|
||||
Icon=btopep
|
||||
Exec=xfce4-terminal -H -e "sh -c 'btop'"
|
||||
Terminal=true
|
||||
Categories=XFCE;GTK;Settings;X-XFCE-SettingsDialog;
|
||||
OnlyShowIn=XFCE;
|
||||
Keywords=system;process;task
|
|
@ -0,0 +1,164 @@
|
|||
[Desktop Entry]
|
||||
Name=GDebi Package Installer
|
||||
Name[ar]=مثبت الحزم GDebi
|
||||
Name[ast]=Instalador de Paquetes GDebi
|
||||
Name[bg]=Инсталатор на пакет
|
||||
Name[bn]=প্যাকেজ ইনস্টলার
|
||||
Name[bs]=GDebi Paketni Instaler
|
||||
Name[ca]=Instal·lador de paquets GDebi
|
||||
Name[ca@valencia]=Instal·lador de paquets GDebi
|
||||
Name[cs]=Instalátor balíků GDebi
|
||||
Name[da]=GDebi pakkeinstalleringsprogram
|
||||
Name[de]=GDebi-Paket-Installationsprogramm
|
||||
Name[el]=Εγκατάσταση πακέτων GDebi
|
||||
Name[en_AU]=GDebi Package Installer
|
||||
Name[en_CA]=GDebi Package Installer
|
||||
Name[en_GB]=GDebi Package Installer
|
||||
Name[eo]=Instalilo de GDebi-pakaĵoj
|
||||
Name[es]=Instalador de paquetes GDebi
|
||||
Name[et]=GDebi Paketipaigaldus
|
||||
Name[eu]=GDebi pakete-instalatzailea
|
||||
Name[fi]=GDebi-paketinasentaja
|
||||
Name[fo]=GDebi Pakka innleggjari
|
||||
Name[fr]=Installateur de paquets GDebi
|
||||
Name[gl]=Instalador de paquetes GDebi
|
||||
Name[he]=מתקין החבילות GDebi
|
||||
Name[hu]=GDebi csomagtelepítő
|
||||
Name[id]=Pemasang Paket GDebi
|
||||
Name[it]=Installatore pacchetto GDebi
|
||||
Name[ja]=GDebi パッケージインストーラー
|
||||
Name[ko]=GDebi 패키지 설치 프로그램
|
||||
Name[lt]=„GDebi“ paketų diegyklė
|
||||
Name[ms]=Pemasang Pakej GDebi
|
||||
Name[nb]=GDebi pakkeinstallerer
|
||||
Name[nl]=GDebi pakketinstalleerder
|
||||
Name[oc]=Installador de paquets GDebi
|
||||
Name[pl]=Instalator pakietów GDebi
|
||||
Name[pt]=Instalador de Pacotes
|
||||
Name[pt_BR]=Instalador de pacotes GDebi
|
||||
Name[ro]=GDebi instalator de pachete
|
||||
Name[ru]=Программа установки пакетов GDebi
|
||||
Name[sk]=Inštalátor balíkov GDebi
|
||||
Name[sl]=Namestilnik paketov GDebi
|
||||
Name[sr]=ГДеби — Инсталер пакета
|
||||
Name[sv]=Paketinstalleraren GDebi
|
||||
Name[te]=GDebi ప్యాకేజీ స్థాపకం
|
||||
Name[tr]=GDebi Paket Kurucu
|
||||
Name[uk]=Встановлювач пакунків GDebi
|
||||
Name[ur]=جی ڈیبی پیکج انسٹالر
|
||||
Name[zh_CN]=GDebi 软件包安装程序
|
||||
Name[zh_HK]=GDebi 套件安裝程式
|
||||
Name[zh_TW]=GDebi 套件安裝程式
|
||||
GenericName=Package Installer
|
||||
GenericName[ar]=مثبت الحزم
|
||||
GenericName[ast]=Instalador de paquetes
|
||||
GenericName[bg]=Инсталатор на пакети
|
||||
GenericName[bn]=প্যাকেজ ইনস্টলার
|
||||
GenericName[bs]=Paketni instaler
|
||||
GenericName[ca]=Instal·lador de paquets
|
||||
GenericName[ca@valencia]=Instal·lador de paquets
|
||||
GenericName[cs]=Instalátor balíků
|
||||
GenericName[da]=Pakkeinstalleringsprogram
|
||||
GenericName[de]=Paket-Installationsprogramm
|
||||
GenericName[el]=Εγκατάσταση πακέτων
|
||||
GenericName[en_AU]=Package Installer
|
||||
GenericName[en_CA]=Package Installer
|
||||
GenericName[en_GB]=Package Installer
|
||||
GenericName[eo]=Instalilo de pakaĵoj
|
||||
GenericName[es]=Instalador de paquetes
|
||||
GenericName[et]=Paketti paigaldus
|
||||
GenericName[eu]=Pakete-instalatzailea
|
||||
GenericName[fi]=Paketinasentaja
|
||||
GenericName[fo]=Pakkainnleggjari
|
||||
GenericName[fr]=Installateur de paquets
|
||||
GenericName[gl]=Instalador de paquetes
|
||||
GenericName[he]=מתקין החבילות
|
||||
GenericName[hr]=Paketni instaler
|
||||
GenericName[hu]=Csomagtelepítő
|
||||
GenericName[id]=Pemasang Paket
|
||||
GenericName[it]=Installatore pacchetto
|
||||
GenericName[ja]=パッケージインストーラー
|
||||
GenericName[ko]=패키지 설치 프로그램
|
||||
GenericName[ku]=Sazgera Paketan
|
||||
GenericName[lt]=Paketų diegyklė
|
||||
GenericName[ms]=Pemasang Pakej
|
||||
GenericName[nb]=Pakkeinstallerer
|
||||
GenericName[nl]=Pakketinstalleerder
|
||||
GenericName[oc]=Installador de paquets
|
||||
GenericName[pl]=Instalator pakietów
|
||||
GenericName[pt]=Instalador de Pacotes
|
||||
GenericName[pt_BR]=Instalador de Pacotes
|
||||
GenericName[ro]=Instalator pachete
|
||||
GenericName[ru]=Программа установки пакетов
|
||||
GenericName[sk]=Inštalátor balíkov
|
||||
GenericName[sl]=Namestilnik paketov
|
||||
GenericName[sr]=Инсталер пакета
|
||||
GenericName[sv]=Paketinstallerare
|
||||
GenericName[te]=ప్యాకేజీ స్థాపకం
|
||||
GenericName[tr]=Paket Kurucu
|
||||
GenericName[uk]=Встановлювач пакунків
|
||||
GenericName[ur]=پیکج تنصیب کار
|
||||
GenericName[zh_CN]=软件包安装程序
|
||||
GenericName[zh_HK]=套件安裝程式
|
||||
GenericName[zh_TW]=套件安裝程式
|
||||
Comment=Install and view software packages
|
||||
Comment[ar]=تثبيت و عرض حزم البرامج
|
||||
Comment[ast]=Instalar y ver paquetes de software
|
||||
Comment[bg]=Инсталиране и преглед на пакети
|
||||
Comment[bn]=সফটওয়্যার প্যাকেজ ইনস্টল করুন এবং দেখুন
|
||||
Comment[bs]=Instaliraj i vidi softverski paket
|
||||
Comment[ca]=Instal·la i visualitza paquets de programari
|
||||
Comment[ca@valencia]=Instal·la i visualitza paquets de programari
|
||||
Comment[cs]=Instalovat a prohlížet balíky
|
||||
Comment[da]=Installer og vis softwarepakker
|
||||
Comment[de]=Software-Pakete installieren und betrachten
|
||||
Comment[el]=Εγκαταστήστε και εμφανίστε πακέτα λογισμικού
|
||||
Comment[en_AU]=Install and view software packages
|
||||
Comment[en_CA]=Install and view software packages
|
||||
Comment[en_GB]=Install and view software packages
|
||||
Comment[eo]=Instali kaj vidi pakaĵojn de programaroj
|
||||
Comment[es]=Instala y muestra paquetes de software
|
||||
Comment[eu]=Instalatu eta ikusi software paketeak
|
||||
Comment[fi]=Asenna ja tarkastele ohjelmapaketteja
|
||||
Comment[fo]=Legg inn og vís ritbúnaðarpakkar
|
||||
Comment[fr]=Installer et lister les paquets logiciels
|
||||
Comment[gl]=Instalar e ver paquetes de software
|
||||
Comment[he]=התקנה וצפייה של חבילות תכנה
|
||||
Comment[hr]=Instaliraj i pregledaj pakete
|
||||
Comment[hu]=Szoftvercsomagok telepítése és megjelenítése
|
||||
Comment[id]=Pasang dan tinjau paket-paket piranti lunak
|
||||
Comment[it]=Installa e visualizza pacchetti software
|
||||
Comment[ja]=ソフトウェアパッケージのインストールと表示を行います
|
||||
Comment[ko]=소프트웨어 패키지를 설치하고 봅니다
|
||||
Comment[ku]=Paketên nivîsbariyê saz bike û lê binêre
|
||||
Comment[lt]=Įdiegti ir peržiūrėti programinės įrangos paketus
|
||||
Comment[ms]=Pasang dan papar pakej perisian
|
||||
Comment[nb]=Installer og vis programvarepakker
|
||||
Comment[nl]=Programmapakketten installeren en bekijken
|
||||
Comment[oc]=Installar e far la lista dels paquets logicials
|
||||
Comment[pl]=Instaluje i wyświetla informacje o pakietach oprogramowania
|
||||
Comment[pt]=Instalar e ver pacotes de software
|
||||
Comment[pt_BR]=Instalar e visualizar pacotes de programa
|
||||
Comment[ro]=Instalare şi vizualizare pachete software
|
||||
Comment[ru]=Программа установки и просмотра пакетов программ
|
||||
Comment[sk]=Inštalácia a zobrazenie balíkov softvéru
|
||||
Comment[sl]=Nameščanje in ogled paketov programske opreme
|
||||
Comment[sr]=Инсталирајте и погледајте софтверске пакете
|
||||
Comment[sv]=Installera och visa programpaket
|
||||
Comment[te]=సాఫ్ట్వేర్ ప్యాకేజీలను స్థాపించు మరియు చూడు
|
||||
Comment[tr]=Yazılım paketlerini kur ve izle
|
||||
Comment[uk]=Встановити та оглянути програмні пакунки
|
||||
Comment[ur]=اردو ترجمہ از محمد علی مکی
|
||||
Comment[zh_CN]=安装和查看软件包
|
||||
Comment[zh_HK]=安裝和檢視軟件套件
|
||||
Comment[zh_TW]=安裝和檢視軟體套件
|
||||
Exec=sh -c "gdebi-gtk %f"
|
||||
Icon=gnome-mime-application-x-deb
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=System;
|
||||
MimeType=application/vnd.debian.binary-package;
|
||||
NotShowIn=KDE;
|
||||
X-Ubuntu-Gettext-Domain=gdebi
|
||||
StartupNotify=true
|
||||
Keywords=package;apt;dpkg;install
|
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Name=hblock
|
||||
GenericName=hblock
|
||||
Comment=A GUI for the xDaily Update Tool
|
||||
Categories=XFCE;GTK;Settings;X-XFCE-SettingsDialog;
|
||||
Type=Application
|
||||
Exec=xfce4-terminal -H -e "sh -c '/usr/local/bin/hblock'"
|
||||
Icon=hblock
|
||||
Terminal=false
|
||||
NoDisplay=false
|
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Name=Kumo
|
||||
GenericName=Kumo
|
||||
Comment=Simple SSB Launcher
|
||||
Categories=Network;
|
||||
Type=Application
|
||||
Exec=kumo
|
||||
Icon=/usr/share/pixmaps/kumo.png
|
||||
Terminal=false
|
||||
NoDisplay=false
|
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Name=Networking
|
||||
GenericName=Networking
|
||||
Comment=Networking Tool
|
||||
Categories=XFCE;GTK;Settings;X-XFCE-SettingsDialog;
|
||||
Type=Application
|
||||
Exec=nm-connection-editor
|
||||
Icon=network
|
||||
Terminal=false
|
||||
NoDisplay=false
|
|
@ -0,0 +1,67 @@
|
|||
[Desktop Entry]
|
||||
Name=Plank
|
||||
GenericName=Dock
|
||||
Comment[am]=በጣም ቀላል
|
||||
Comment[ar]=بسيط بغباء.
|
||||
Comment[bg]=Пределно прост.
|
||||
Comment[bs]=Glupavo jednostavan.
|
||||
Comment[ca]=Estúpidament simple.
|
||||
Comment[cs]=Stupidně jednoduchý.
|
||||
Comment[da]=Super simpel.
|
||||
Comment[de]=Lächerlich einfach.
|
||||
Comment[el]=Βλακωδώς απλό.
|
||||
Comment[en_AU]=Stupidly simple.
|
||||
Comment[en_CA]=Stupidly simple.
|
||||
Comment[en_GB]=Stupidly simple.
|
||||
Comment[eo]=Stulte simple.
|
||||
Comment[es]=Estúpidamente simple.
|
||||
Comment[et]=Hämmastavalt lihtne.
|
||||
Comment[eu]=Erraza baino errazagoa.
|
||||
Comment[fi]=Todella yksinkertainen.
|
||||
Comment[fr]=Stupidement simple.
|
||||
Comment[ga]=Simplíocht shimplí.
|
||||
Comment[gd]=Cho furasta 's a ghabhas.
|
||||
Comment[gl]=Estupidamente simple.
|
||||
Comment[he]=טפשי עד כמה שזה פשוט
|
||||
Comment[hr]=Neviđeno jednostavan
|
||||
Comment[hu]=Nagyszerűen egyszerű.
|
||||
Comment[id]=Begitu sederhana.
|
||||
Comment[it]=Stupidamente semplice.
|
||||
Comment[ja]=超シンプル
|
||||
Comment[ka]=ძალიან მარტივი აი ძალიან
|
||||
Comment[ko]=어처구니없으리 만치 단순한.
|
||||
Comment[lt]=Kvailai paprastas.
|
||||
Comment[lv]=Muļķīgi vienkārši.
|
||||
Comment[ml]=അനായാസം.
|
||||
Comment[ms]=Ringkas la sangat.
|
||||
Comment[nb]=Uforstandig enkelt.
|
||||
Comment[ne]=एकदमै सरल
|
||||
Comment[nl]=Belachelijk eenvoudig.
|
||||
Comment[nn]=Idiotsikkert
|
||||
Comment[pl]=Idiotycznie prosty.
|
||||
Comment[pt]=Estupidamente simples.
|
||||
Comment[pt_BR]=Estupidamente simples.
|
||||
Comment[ro]=Stupid de simplu.
|
||||
Comment[ru]=До безумного прост.
|
||||
Comment[sk]=Primitívne jednoduchý.
|
||||
Comment[sl]=Bedasto preprost.
|
||||
Comment[sma]=dle dan aelhkies.
|
||||
Comment[sr]=Шашаво једноставно.
|
||||
Comment[sr@latin]=Glupavo jenostavan.
|
||||
Comment[sv]=Galet enkelt.
|
||||
Comment[ta]=மிகவும் எளிது
|
||||
Comment[te]=చాలా సరళమైనది.
|
||||
Comment[th]=ง่ายเหี้ยๆ
|
||||
Comment[tr]=Son derece basit.
|
||||
Comment[uk]=Просто легкий.
|
||||
Comment[uz]=Ahmoqona darajada sodda.
|
||||
Comment[vi]=Cực kì đơn giản.
|
||||
Comment[zh_CN]=简单得无语。
|
||||
Comment[zh_TW]=極簡。
|
||||
Comment=Stupidly simple.
|
||||
Categories=Utility;
|
||||
Type=Application
|
||||
Exec=plank
|
||||
Icon=plank
|
||||
Terminal=false
|
||||
NoDisplay=false
|
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Name=Suggested
|
||||
GenericName=Suggested
|
||||
Comment=A GUI for the the suggested Tool
|
||||
Categories=XFCE;GTK;Settings;X-XFCE-SettingsDialog;
|
||||
Type=Application
|
||||
Exec=suggested
|
||||
Icon=suggested
|
||||
Terminal=false
|
||||
NoDisplay=false
|
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Name=System Information
|
||||
GenericName=System Info
|
||||
Comment=System information Tool
|
||||
Categories=XFCE;GTK;Settings;X-XFCE-SettingsDialog;
|
||||
Type=Application
|
||||
Exec=xfce4-terminal -H -e "sh -c 'pfetch'"
|
||||
Icon=system_info
|
||||
Terminal=false
|
||||
NoDisplay=false
|
|
@ -0,0 +1,74 @@
|
|||
[Desktop Entry]
|
||||
Name=xDaily
|
||||
Name[en]=xDaily
|
||||
Name[pt]=xDiário
|
||||
Name[es]=xDiario
|
||||
Name[fr]=xQuotidien
|
||||
Name[de]=xTäglich
|
||||
Name[it]=xGiornaliero
|
||||
Name[zh]=每日
|
||||
Name[ja]=エクスデイリー
|
||||
Name[ko]=엑스데일리
|
||||
Name[ru]=xЕжедневно
|
||||
Name[ar]=إكس ديلي
|
||||
Name[nl]=xDagelijks
|
||||
Name[sv]=xDagligen
|
||||
Name[no]=xDaglig
|
||||
Name[da]=xDaglig
|
||||
Name[fi]=xPäivittäin
|
||||
Name[pl]=xCodziennie
|
||||
Name[cs]=xDenně
|
||||
Name[el]=xΚαθημερινά
|
||||
Name[tr]=xGünlük
|
||||
|
||||
GenericName=xDaily
|
||||
GenericName[en]=xDaily
|
||||
GenericName[pt]=xDiário
|
||||
GenericName[es]=xDiario
|
||||
GenericName[fr]=xQuotidien
|
||||
GenericName[de]=xTäglich
|
||||
GenericName[it]=xGiornaliero
|
||||
GenericName[zh]=每日
|
||||
GenericName[ja]=エクスデイリー
|
||||
GenericName[ko]=엑스데일리
|
||||
GenericName[ru]=xЕжедневно
|
||||
GenericName[ar]=إكس ديلي
|
||||
GenericName[nl]=xDagelijks
|
||||
GenericName[sv]=xDagligen
|
||||
GenericName[no]=xDaglig
|
||||
GenericName[da]=xDaglig
|
||||
GenericName[fi]=xPäivittäin
|
||||
GenericName[pl]=xCodziennie
|
||||
GenericName[cs]=xDenně
|
||||
GenericName[el]=xΚαθημερινά
|
||||
GenericName[tr]=xGünlük
|
||||
|
||||
Comment=A GUI for the xDaily Update Tool
|
||||
Comment[en]=A GUI for the xDaily Update Tool
|
||||
Comment[pt]=Uma interface gráfica para a ferramenta de atualização xDiário
|
||||
Comment[es]=Una interfaz gráfica para la herramienta de actualización xDiario
|
||||
Comment[fr]=Une interface graphique pour l'outil de mise à jour xQuotidien
|
||||
Comment[de]=Eine grafische Benutzeroberfläche für das xTäglich-Aktualisierungswerkzeug
|
||||
Comment[it]=Un'interfaccia grafica per lo strumento di aggiornamento xGiornaliero
|
||||
Comment[zh]=xDaily 更新工具的图形用户界面
|
||||
Comment[ja]=xDaily アップデートツールのGUI
|
||||
Comment[ko]=xDaily 업데이트 도구용 GUI
|
||||
Comment[ru]=Графический интерфейс для инструмента обновления xDaily
|
||||
Comment[ar]=واجهة رسومية لأداة التحديث xDaily
|
||||
Comment[nl]=Een GUI voor de xDaily-update tool
|
||||
Comment[sv]=En GUI för xDaily-uppdateringsverktyget
|
||||
Comment[no]=En GUI for xDaily-oppdateringsverktøyet
|
||||
Comment[da]=En GUI til xDaily-opdateringsværktøjet
|
||||
Comment[fi]=Graafinen käyttöliittymä xDaily-päivitystyökalulle
|
||||
Comment[pl]=Graficzny interfejs narzędzia aktualizacji xDaily
|
||||
Comment[cs]=Grafické rozhraní pro nástroj xDaily Update
|
||||
Comment[el]=Ένα GUI για το εργαλείο ενημέρωσης xDaily
|
||||
Comment[tr]=xDaily Güncelleme Aracı için bir GUI
|
||||
|
||||
Categories=XFCE;GTK;Settings;X-XFCE-SettingsDialog;
|
||||
Type=Application
|
||||
Exec=xdaily-gui
|
||||
Icon=xd
|
||||
Terminal=false
|
||||
NoDisplay=false
|
||||
|
After Width: | Height: | Size: 20 KiB |
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=Welcome to Peppermint
|
||||
Exec=welcome
|
||||
Icon=/usr/share/pixmaps/peppermint.png
|
||||
Terminal=false
|
||||
StartupNotify=True
|
||||
Name[en_US]=Welcome to Peppermint
|
||||
Path=
|
|
@ -0,0 +1,196 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
. ./lib.sh
|
||||
|
||||
PROGNAME=$(basename "$0")
|
||||
ARCH=$(uname -m)
|
||||
IMAGES="base"
|
||||
TRIPLET=
|
||||
REPO=
|
||||
DATE=$(date -u +%Y%m%d)
|
||||
|
||||
usage() {
|
||||
cat <<-EOH
|
||||
Usage: $PROGNAME [options ...] [-- mklive options ...]
|
||||
|
||||
Wrapper script around mklive.sh for several standard flavors of live images.
|
||||
Adds void-installer and other helpful utilities to the generated images.
|
||||
|
||||
OPTIONS
|
||||
-a <arch> Set XBPS_ARCH in the image
|
||||
-b <variant> One of base, enlightenment, xfce, mate, cinnamon, gnome, kde,
|
||||
lxde, or lxqt (default: base). May be specified multiple times
|
||||
to build multiple variants
|
||||
-d <date> Override the datestamp on the generated image (YYYYMMDD format)
|
||||
-t <arch-date-variant>
|
||||
Equivalent to setting -a, -b, and -d
|
||||
-r <repo> Use this XBPS repository. May be specified multiple times
|
||||
-h Show this help and exit
|
||||
-V Show version and exit
|
||||
|
||||
Other options can be passed directly to mklive.sh by specifying them after the --.
|
||||
See mklive.sh -h for more details.
|
||||
EOH
|
||||
}
|
||||
|
||||
while getopts "a:b:d:t:hr:V" opt; do
|
||||
case $opt in
|
||||
a) ARCH="$OPTARG";;
|
||||
b) IMAGES="$OPTARG";;
|
||||
d) DATE="$OPTARG";;
|
||||
r) REPO="-r $OPTARG $REPO";;
|
||||
t) TRIPLET="$OPTARG";;
|
||||
V) version; exit 0;;
|
||||
h) usage; exit 0;;
|
||||
*) usage >&2; exit 1;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND - 1))
|
||||
|
||||
INCLUDEDIR=$(mktemp -d)
|
||||
trap "cleanup" INT TERM
|
||||
|
||||
cleanup() {
|
||||
rm -rf "$INCLUDEDIR"
|
||||
}
|
||||
|
||||
setup_pipewire() {
|
||||
PKGS="$PKGS pipewire alsa-pipewire"
|
||||
mkdir -p "$INCLUDEDIR"/etc/xdg/autostart
|
||||
ln -sf /usr/share/applications/pipewire.desktop "$INCLUDEDIR"/etc/xdg/autostart/
|
||||
mkdir -p "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d
|
||||
ln -sf /usr/share/examples/wireplumber/10-wireplumber.conf "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d/
|
||||
ln -sf /usr/share/examples/pipewire/20-pipewire-pulse.conf "$INCLUDEDIR"/etc/pipewire/pipewire.conf.d/
|
||||
mkdir -p "$INCLUDEDIR"/etc/alsa/conf.d
|
||||
ln -sf /usr/share/alsa/alsa.conf.d/50-pipewire.conf "$INCLUDEDIR"/etc/alsa/conf.d
|
||||
ln -sf /usr/share/alsa/alsa.conf.d/99-pipewire-default.conf "$INCLUDEDIR"/etc/alsa/conf.d
|
||||
}
|
||||
|
||||
build_variant() {
|
||||
variant="$1"
|
||||
shift
|
||||
IMG=void-live-${ARCH}-${DATE}-${variant}.iso
|
||||
GRUB_PKGS="grub-i386-efi grub-x86_64-efi"
|
||||
A11Y_PKGS="espeakup void-live-audio brltty"
|
||||
PKGS="dialog octoxbps cryptsetup lvm2 mdadm void-docs-browse xtools-minimal xmirror chrony $A11Y_PKGS $GRUB_PKGS"
|
||||
XORG_PKGS="xorg xorg-input-drivers xorg-video-drivers setxkbmap xauth font-misc-misc terminus-font dejavu-fonts-ttf orca"
|
||||
SERVICES="sshd chronyd"
|
||||
|
||||
LIGHTDM_SESSION=''
|
||||
|
||||
case $variant in
|
||||
base)
|
||||
SERVICES="$SERVICES dhcpcd wpa_supplicant acpid"
|
||||
;;
|
||||
enlightenment)
|
||||
PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk3-greeter enlightenment terminology udisks2 firefox"
|
||||
SERVICES="$SERVICES acpid dhcpcd wpa_supplicant lightdm dbus polkitd"
|
||||
LIGHTDM_SESSION=enlightenment
|
||||
;;
|
||||
xfce)
|
||||
PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk3-greeter lightdm-gtk3-greeter-settings xfce4 gnome-themes-standard gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox xfce4-pulseaudio-plugin mousepad mugshot menulibre thunar-archive-plugin thunar-volman xfce4-battery-plugin xfce4-clipman-plugin xfce4-power-manager xfce4-taskmanager xfce4-terminal xfce4-whiskermenu-plugin xarchiver alsa-utils bluez btop console-setup cups curl dconf-editor dbus-x11 cantarell-fonts liberation-fonts-ttf git wget gnome-disk-utility gparted gvfs samba inxi network-manager-applet ntp python3-pip python3-pipx python3-tkinter python3-Pillow system-config-printer simple-scan smartmontools smbclient spice-vdagent sqlite wireless-tools"
|
||||
SERVICES="$SERVICES dbus lightdm NetworkManager polkitd bluetoothd cupsd avahi-daemon udisksd upowerd ntpd smbd nmbd spice-vdagentd"
|
||||
LIGHTDM_SESSION=xfce
|
||||
;;
|
||||
mate)
|
||||
PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk3-greeter mate mate-extra gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox"
|
||||
SERVICES="$SERVICES dbus lightdm NetworkManager polkitd"
|
||||
LIGHTDM_SESSION=mate
|
||||
;;
|
||||
cinnamon)
|
||||
PKGS="$PKGS $XORG_PKGS lightdm lightdm-gtk3-greeter cinnamon gnome-keyring colord gnome-terminal gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox"
|
||||
SERVICES="$SERVICES dbus lightdm NetworkManager polkitd"
|
||||
LIGHTDM_SESSION=cinnamon
|
||||
;;
|
||||
gnome)
|
||||
PKGS="$PKGS $XORG_PKGS gnome firefox"
|
||||
SERVICES="$SERVICES dbus gdm NetworkManager polkitd"
|
||||
;;
|
||||
kde)
|
||||
PKGS="$PKGS $XORG_PKGS kde5 konsole firefox dolphin NetworkManager"
|
||||
SERVICES="$SERVICES dbus NetworkManager sddm"
|
||||
;;
|
||||
lxde)
|
||||
PKGS="$PKGS $XORG_PKGS lxde lightdm lightdm-gtk3-greeter gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox"
|
||||
SERVICES="$SERVICES acpid dbus dhcpcd wpa_supplicant lightdm polkitd"
|
||||
LIGHTDM_SESSION=LXDE
|
||||
;;
|
||||
lxqt)
|
||||
PKGS="$PKGS $XORG_PKGS lxqt sddm gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox"
|
||||
SERVICES="$SERVICES dbus dhcpcd wpa_supplicant sddm polkitd"
|
||||
;;
|
||||
*)
|
||||
>&2 echo "Unknown variant $variant"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$LIGHTDM_SESSION" ]; then
|
||||
mkdir -p "$INCLUDEDIR"/etc/lightdm
|
||||
echo "$LIGHTDM_SESSION" > "$INCLUDEDIR"/etc/lightdm/.session
|
||||
# needed to show the keyboard layout menu on the login screen
|
||||
cat <<- EOF > "$INCLUDEDIR"/etc/lightdm/lightdm-gtk-greeter.conf
|
||||
[greeter]
|
||||
indicators = ~host;~spacer;~clock;~spacer;~layout;~session;~a11y;~power
|
||||
EOF
|
||||
fi
|
||||
|
||||
if [ "$variant" != base ]; then
|
||||
setup_pipewire
|
||||
fi
|
||||
|
||||
./mklive.sh -a "$ARCH" -o "$IMG" -p "$PKGS" -S "$SERVICES" -I "$INCLUDEDIR" ${REPO} "$@"
|
||||
|
||||
cleanup
|
||||
}
|
||||
|
||||
if [ ! -x mklive.sh ]; then
|
||||
echo mklive.sh not found >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -x installer.sh ]; then
|
||||
MKLIVE_VERSION="$(PROGNAME='' version)"
|
||||
installer=$(mktemp)
|
||||
sed "s/@@MKLIVE_VERSION@@/${MKLIVE_VERSION}/" installer.sh > "$installer"
|
||||
install -Dm755 "$installer" "$INCLUDEDIR"/usr/bin/void-installer
|
||||
rm "$installer"
|
||||
else
|
||||
echo installer.sh not found >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "$TRIPLET" ]; then
|
||||
VARIANT="${TRIPLET##*-}"
|
||||
REST="${TRIPLET%-*}"
|
||||
DATE="${REST##*-}"
|
||||
ARCH="${REST%-*}"
|
||||
build_variant "$VARIANT" "$@"
|
||||
else
|
||||
for image in $IMAGES; do
|
||||
build_variant "$image" "$@"
|
||||
done
|
||||
fi
|
||||
|
||||
move_isos() {
|
||||
echo "Movendo as ISOs para /var/www/html..."
|
||||
mv void-live-${ARCH}-${DATE}-*.iso /var/www/html/ || { echo "Erro ao mover as ISOs"; exit 1; }
|
||||
}
|
||||
|
||||
# No final do script, após a chamada de build_variant
|
||||
if [ -n "$TRIPLET" ]; then
|
||||
VARIANT="${TRIPLET##*-}"
|
||||
REST="${TRIPLET%-*}"
|
||||
DATE="${REST##*-}"
|
||||
ARCH="${REST%-*}"
|
||||
build_variant "$VARIANT" "$@"
|
||||
else
|
||||
for image in $IMAGES; do
|
||||
build_variant "$image" "$@"
|
||||
done
|
||||
fi
|
||||
|
||||
move_isos
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
################################################################################
|
||||
|
||||
Welcome to the PeppermintOS Linux Live system! PeppermintOS is now based on Void Linux, offering a lightweight, fast, and stable experience.
|
||||
|
||||
Two users are available to log in:
|
||||
|
||||
- **root** : password **peppermintos**
|
||||
- **pep** : password **peppermintos**
|
||||
|
||||
The `anon` user has `sudo(8)` privileges to run any command without a password.
|
||||
|
||||
To start the installation, type:
|
||||
|
||||
# pep-installer
|
||||
|
||||
and follow the on-screen instructions. To install additional software, configure your network interface and use:
|
||||
|
||||
- **xbps-install(1)** to install or update packages
|
||||
- **xbps-query(1)** to query package information
|
||||
|
||||
The PeppermintOS Handbook is also available offline in multiple formats and can be accessed with the `peppermint-docs(1)` utility.
|
||||
|
||||
Our thanks to the Void Linux team for providing this robust and versatile base, which has helped PeppermintOS reach new levels of efficiency and usability.
|
||||
|
||||
Thank you for choosing PeppermintOS!
|
||||
|
||||
https://www.peppermintos.com
|
||||
|
||||
################################################################################
|
||||
|
After Width: | Height: | Size: 20 KiB |
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# Configuration file for GRUB.
|
||||
#
|
||||
GRUB_DEFAULT=0
|
||||
#GRUB_HIDDEN_TIMEOUT=0
|
||||
#GRUB_HIDDEN_TIMEOUT_QUIET=false
|
||||
GRUB_TIMEOUT=5
|
||||
GRUB_DISTRIBUTOR="Peppermintos"
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4"
|
||||
# Uncomment to use basic console
|
||||
#GRUB_TERMINAL_INPUT="console"
|
||||
# Uncomment to disable graphical terminal
|
||||
#GRUB_TERMINAL_OUTPUT=console
|
||||
GRUB_BACKGROUND=/usr/share/pep-artwork/splash.png
|
||||
GRUB_GFXMODE=360x768x32
|
||||
#GRUB_DISABLE_LINUX_UUID=true
|
||||
#GRUB_DISABLE_RECOVERY=true
|
||||
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
|
||||
# modes only. Entries specified as foreground/background.
|
||||
#GRUB_COLOR_NORMAL="light-blue/black"
|
||||
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
|
|
@ -0,0 +1,76 @@
|
|||
#!/bin/sh
|
||||
# Void Linux Automatic Install Configuration
|
||||
|
||||
# ===
|
||||
# Disk Configuration
|
||||
# ===
|
||||
# disk: the disk to install to
|
||||
# default: the first disk that isn't the installer
|
||||
#disk=/dev/hda
|
||||
|
||||
# bootpartitionsize: controls how large the boot partition will be
|
||||
# default: 500M
|
||||
#bootpartitionsize=500M
|
||||
|
||||
# swapsize: how large should the swap partition be
|
||||
# default: equal to the installed physical memory
|
||||
#swapsize=
|
||||
|
||||
# ===
|
||||
# XBPS Configuration
|
||||
# ===
|
||||
# xbpsrepository: which repo should the install pull from
|
||||
# default: https://repo-default.voidlinux.org/current
|
||||
#xbpsrepository="https://repo-default.voidlinux.org/current"
|
||||
|
||||
# pkgs: additional packages to install into the target
|
||||
# default: none
|
||||
#pkgs=""
|
||||
|
||||
# ===
|
||||
# Default User
|
||||
# ===
|
||||
# username: the username of the user to be created
|
||||
# default: voidlinux
|
||||
#username=""
|
||||
|
||||
# password: password to set for the new user
|
||||
# default: unset (will prompt during install)
|
||||
# Warning: This does not work in musl!
|
||||
#password=""
|
||||
|
||||
# ===
|
||||
# Misc. Options
|
||||
# ===
|
||||
# timezone: Timezone in TZ format
|
||||
# default: America/Chicago
|
||||
#timezone="America/Chicago"
|
||||
|
||||
# keymap: Keymap to use by default
|
||||
# default: us
|
||||
#keymap="us"
|
||||
|
||||
# locale: initial glibc locale
|
||||
# default: en_US.UTF-8
|
||||
#libclocale=en.US.UTF-8
|
||||
|
||||
# hostname: static hostname for the system
|
||||
# default: derived from DNS
|
||||
#hostname=VoidLinux
|
||||
|
||||
# end_action: what to do at the end of the install
|
||||
# default: shutdown
|
||||
# alternate values: reboot, script, func
|
||||
#end_action=shutdown
|
||||
|
||||
# end_script: script to optionally run at end of install
|
||||
# the user script must reside somewhere xbps-uhelper fetch
|
||||
# can retrieve it from
|
||||
# default: not set
|
||||
#end_script=""
|
||||
|
||||
# end_function: a function to optionally be run at
|
||||
# the end of the install.
|
||||
#end_function() {
|
||||
#
|
||||
#}
|
|
@ -0,0 +1,300 @@
|
|||
#!/bin/sh
|
||||
|
||||
type getargbool >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||
|
||||
# These functions pulled from void's excellent mklive.sh
|
||||
VAI_info_msg() {
|
||||
printf "\033[1m%s\n\033[m" "$@"
|
||||
}
|
||||
|
||||
VAI_print_step() {
|
||||
CURRENT_STEP=$((CURRENT_STEP+1))
|
||||
VAI_info_msg "[${CURRENT_STEP}/${STEP_COUNT}] $*"
|
||||
}
|
||||
|
||||
# ----------------------- Install Functions ------------------------
|
||||
|
||||
VAI_welcome() {
|
||||
clear
|
||||
printf "=============================================================\n"
|
||||
printf "================ Peppermintos Auto-Installer ================\n"
|
||||
printf "=============================================================\n"
|
||||
}
|
||||
|
||||
VAI_get_address() {
|
||||
mkdir -p /var/lib/dhclient
|
||||
|
||||
# This will fork, but it means that over a slow link the DHCP
|
||||
# lease will still be maintained. It also doesn't have a
|
||||
# hard-coded privsep user in it like dhcpcd.
|
||||
dhclient
|
||||
}
|
||||
|
||||
VAI_partition_disk() {
|
||||
# Paritition Disk
|
||||
sfdisk "${disk}" <<EOF
|
||||
,$bootpartitionsize
|
||||
,${swapsize}K
|
||||
;
|
||||
EOF
|
||||
}
|
||||
|
||||
VAI_format_disk() {
|
||||
# Make Filesystems
|
||||
mkfs.ext4 -F "${disk}1"
|
||||
mkfs.ext4 -F "${disk}3"
|
||||
if [ "${swapsize}" -ne 0 ] ; then
|
||||
mkswap -f "${disk}2"
|
||||
fi
|
||||
}
|
||||
|
||||
VAI_mount_target() {
|
||||
# Mount targetfs
|
||||
mkdir -p "${target}"
|
||||
mount "${disk}3" "${target}"
|
||||
mkdir "${target}/boot"
|
||||
mount "${disk}1" "${target}/boot"
|
||||
}
|
||||
|
||||
VAI_install_xbps_keys() {
|
||||
mkdir -p "${target}/var/db/xbps/keys"
|
||||
cp /var/db/xbps/keys/* "${target}/var/db/xbps/keys"
|
||||
}
|
||||
|
||||
VAI_install_base_system() {
|
||||
# Install a base system
|
||||
XBPS_ARCH="${XBPS_ARCH}" xbps-install -Sy -R "${xbpsrepository}" -r /mnt base-system grub
|
||||
|
||||
# Install additional packages
|
||||
if [ -n "${pkgs}" ] ; then
|
||||
# shellcheck disable=SC2086
|
||||
XBPS_ARCH="${XBPS_ARCH}" xbps-install -Sy -R "${xbpsrepository}" -r /mnt ${pkgs}
|
||||
fi
|
||||
}
|
||||
|
||||
VAI_prepare_chroot() {
|
||||
# Mount dev, bind, proc, etc into chroot
|
||||
mount -t proc proc "${target}/proc"
|
||||
mount --rbind /sys "${target}/sys"
|
||||
mount --rbind /dev "${target}/dev"
|
||||
}
|
||||
|
||||
VAI_configure_sudo() {
|
||||
# Give wheel sudo
|
||||
echo "%wheel ALL=(ALL:ALL) ALL" > "${target}/etc/sudoers.d/00-wheel"
|
||||
chmod 0440 "${target}/etc/sudoers.d/00-wheel"
|
||||
}
|
||||
|
||||
VAI_correct_root_permissions() {
|
||||
chroot "${target}" chown root:root /
|
||||
chroot "${target}" chmod 755 /
|
||||
}
|
||||
|
||||
VAI_configure_hostname() {
|
||||
# Set the hostname
|
||||
echo "${hostname}" > "${target}/etc/hostname"
|
||||
}
|
||||
|
||||
VAI_configure_rc_conf() {
|
||||
# Set the value of various tokens
|
||||
sed -i "s:Europe/Madrid:${timezone}:" "${target}/etc/rc.conf"
|
||||
sed -i "s:\"es\":\"${keymap}\":" "${target}/etc/rc.conf"
|
||||
|
||||
# Activate various tokens
|
||||
sed -i "s:#HARDWARECLOCK:HARDWARECLOCK:" "${target}/etc/rc.conf"
|
||||
sed -i "s:#TIMEZONE:TIMEZONE:" "${target}/etc/rc.conf"
|
||||
sed -i "s:#KEYMAP:KEYMAP:" "${target}/etc/rc.conf"
|
||||
}
|
||||
|
||||
VAI_add_user() {
|
||||
chroot "${target}" useradd -m -s /bin/bash -U -G wheel,users,audio,video,cdrom,input "${username}"
|
||||
if [ -z "${password}" ] ; then
|
||||
chroot "${target}" passwd "${username}"
|
||||
else
|
||||
# For reasons that remain unclear, this does not work in musl
|
||||
echo "${username}:${password}" | chpasswd -c SHA512 -R "${target}"
|
||||
fi
|
||||
}
|
||||
|
||||
VAI_configure_grub() {
|
||||
# Set hostonly
|
||||
echo "hostonly=yes" > "${target}/etc/dracut.conf.d/hostonly.conf"
|
||||
|
||||
# Choose the newest kernel
|
||||
kernel_version="$(chroot "${target}" xbps-query linux | awk -F "[-_]" '/pkgver/ {print $2}')"
|
||||
|
||||
# Install grub
|
||||
chroot "${target}" grub-install "${disk}"
|
||||
chroot "${target}" xbps-reconfigure -f "linux${kernel_version}"
|
||||
|
||||
# Correct the grub install
|
||||
chroot "${target}" update-grub
|
||||
}
|
||||
|
||||
VAI_configure_fstab() {
|
||||
# Grab UUIDs
|
||||
uuid1="$(blkid -s UUID -o value "${disk}1")"
|
||||
uuid2="$(blkid -s UUID -o value "${disk}2")"
|
||||
uuid3="$(blkid -s UUID -o value "${disk}3")"
|
||||
|
||||
# Installl UUIDs into /etc/fstab
|
||||
echo "UUID=$uuid3 / ext4 defaults,errors=remount-ro 0 1" >> "${target}/etc/fstab"
|
||||
echo "UUID=$uuid1 /boot ext4 defaults 0 2" >> "${target}/etc/fstab"
|
||||
if [ "${swapsize}" -ne 0 ] ; then
|
||||
echo "UUID=$uuid2 swap swap defaults 0 0" >> "${target}/etc/fstab"
|
||||
fi
|
||||
}
|
||||
|
||||
VAI_configure_locale() {
|
||||
# Set the libc-locale iff glibc
|
||||
case "${XBPS_ARCH}" in
|
||||
*-musl)
|
||||
VAI_info_msg "Glibc locales are not supported on musl"
|
||||
;;
|
||||
*)
|
||||
sed -i "/${libclocale}/s/#//" "${target}/etc/default/libc-locales"
|
||||
|
||||
chroot "${target}" xbps-reconfigure -f glibc-locales
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
VAI_end_action() {
|
||||
case $end_action in
|
||||
reboot)
|
||||
VAI_info_msg "Rebooting the system"
|
||||
sync
|
||||
umount -R "${target}"
|
||||
reboot -f
|
||||
;;
|
||||
shutdown)
|
||||
VAI_info_msg "Shutting down the system"
|
||||
sync
|
||||
umount -R "${target}"
|
||||
poweroff -f
|
||||
;;
|
||||
script)
|
||||
VAI_info_msg "Running user provided script"
|
||||
xbps-uhelper fetch "${end_script}>/script"
|
||||
chmod +x /script
|
||||
target=${target} xbpsrepository=${xbpsrepository} /script
|
||||
;;
|
||||
func)
|
||||
VAI_info_msg "Running user provided function"
|
||||
end_function
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
VAI_configure_autoinstall() {
|
||||
# -------------------------- Setup defaults ---------------------------
|
||||
bootpartitionsize="500M"
|
||||
disk="$(lsblk -ipo NAME,TYPE,MOUNTPOINT | awk '{if ($2=="disk") {disks[$1]=0; last=$1} if ($3=="/") {disks[last]++}} END {for (a in disks) {if(disks[a] == 0){print a; break}}}')"
|
||||
hostname="$(ip -4 -o -r a | awk -F'[ ./]' '{x=$7} END {print x}')"
|
||||
# XXX: Set a manual swapsize here if the default doesn't fit your use case
|
||||
swapsize="$(awk -F"\n" '/MemTotal/ {split($0, b, " "); print b[2] }' /proc/meminfo)";
|
||||
target="/mnt"
|
||||
timezone="America/Chicago"
|
||||
keymap="us"
|
||||
libclocale="en_US.UTF-8"
|
||||
username="pep"
|
||||
end_action="shutdown"
|
||||
end_script="/bin/true"
|
||||
|
||||
XBPS_ARCH="$(xbps-uhelper arch)"
|
||||
case $XBPS_ARCH in
|
||||
*-musl)
|
||||
xbpsrepository="https://repo-default.voidlinux.org/current/musl"
|
||||
;;
|
||||
*)
|
||||
xbpsrepository="https://repo-default.voidlinux.org/current"
|
||||
;;
|
||||
esac
|
||||
|
||||
# --------------- Pull config URL out of kernel cmdline -------------------------
|
||||
set +e
|
||||
if getargbool 0 autourl ; then
|
||||
set -e
|
||||
xbps-uhelper fetch "$(getarg autourl)>/etc/autoinstall.cfg"
|
||||
|
||||
else
|
||||
set -e
|
||||
mv /etc/autoinstall.default /etc/autoinstall.cfg
|
||||
fi
|
||||
|
||||
# Read in the resulting config file which we got via some method
|
||||
if [ -f /etc/autoinstall.cfg ] ; then
|
||||
VAI_info_msg "Reading configuration file"
|
||||
. ./etc/autoinstall.cfg
|
||||
fi
|
||||
|
||||
# Bail out if we didn't get a usable disk
|
||||
if [ -z "$disk" ] ; then
|
||||
die "No valid disk!"
|
||||
fi
|
||||
}
|
||||
|
||||
VAI_main() {
|
||||
CURRENT_STEP=0
|
||||
STEP_COUNT=16
|
||||
|
||||
VAI_welcome
|
||||
|
||||
VAI_print_step "Bring up the network"
|
||||
VAI_get_address
|
||||
|
||||
VAI_print_step "Configuring installer"
|
||||
VAI_configure_autoinstall
|
||||
|
||||
VAI_print_step "Configuring disk using scheme 'Atomic'"
|
||||
VAI_partition_disk
|
||||
VAI_format_disk
|
||||
|
||||
VAI_print_step "Mounting the target filesystems"
|
||||
VAI_mount_target
|
||||
|
||||
VAI_print_step "Installing XBPS keys"
|
||||
VAI_install_xbps_keys
|
||||
|
||||
VAI_print_step "Installing the base system"
|
||||
VAI_install_base_system
|
||||
|
||||
VAI_print_step "Granting sudo to default user"
|
||||
VAI_configure_sudo
|
||||
|
||||
VAI_print_step "Setting hostname"
|
||||
VAI_configure_hostname
|
||||
|
||||
VAI_print_step "Configure rc.conf"
|
||||
VAI_configure_rc_conf
|
||||
|
||||
VAI_print_step "Preparing the chroot"
|
||||
VAI_prepare_chroot
|
||||
|
||||
VAI_print_step "Fix ownership of /"
|
||||
VAI_correct_root_permissions
|
||||
|
||||
VAI_print_step "Adding default user"
|
||||
VAI_add_user
|
||||
|
||||
VAI_print_step "Configuring GRUB"
|
||||
VAI_configure_grub
|
||||
|
||||
VAI_print_step "Configuring /etc/fstab"
|
||||
VAI_configure_fstab
|
||||
|
||||
VAI_print_step "Configuring libc-locales"
|
||||
VAI_configure_locale
|
||||
|
||||
VAI_print_step "Performing end-action"
|
||||
VAI_end_action
|
||||
}
|
||||
|
||||
# If we are using the autoinstaller, launch it
|
||||
if getargbool 0 auto ; then
|
||||
set -e
|
||||
VAI_main
|
||||
# Very important to release this before returning to dracut code
|
||||
set +e
|
||||
fi
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/bash
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
check() {
|
||||
return 255
|
||||
}
|
||||
|
||||
depends() {
|
||||
echo network
|
||||
}
|
||||
|
||||
install() {
|
||||
inst /usr/bin/awk
|
||||
inst /usr/bin/chmod
|
||||
inst /usr/bin/chroot
|
||||
inst /usr/bin/clear
|
||||
inst /usr/bin/cp
|
||||
inst /usr/bin/chpasswd
|
||||
inst /usr/bin/dhclient
|
||||
inst /usr/bin/dhclient-script
|
||||
inst /usr/bin/halt
|
||||
inst /usr/bin/install
|
||||
inst /usr/bin/lsblk
|
||||
inst /usr/bin/mkdir
|
||||
inst /usr/bin/mkfs.ext4
|
||||
inst /usr/bin/mkswap
|
||||
inst /usr/bin/mount
|
||||
inst /usr/bin/resolvconf
|
||||
inst /usr/bin/sfdisk
|
||||
inst /usr/bin/sync
|
||||
inst /usr/bin/xbps-install
|
||||
inst /usr/bin/xbps-uhelper
|
||||
inst /usr/bin/xbps-query
|
||||
|
||||
inst_multiple /var/db/xbps/keys/*
|
||||
inst_multiple /usr/share/xbps.d/*
|
||||
|
||||
inst_multiple /etc/ssl/certs/*
|
||||
inst /etc/ssl/certs.pem
|
||||
|
||||
inst_hook pre-mount 01 "$moddir/install.sh"
|
||||
inst "$moddir/autoinstall.cfg" /etc/autoinstall.default
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
#!/bin/bash
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
check() {
|
||||
return 255
|
||||
}
|
||||
|
||||
depends() {
|
||||
echo network
|
||||
}
|
||||
|
||||
install() {
|
||||
inst /usr/bin/awk
|
||||
inst /usr/bin/basename
|
||||
inst /usr/bin/bash
|
||||
inst /usr/bin/cat
|
||||
inst /usr/bin/cfdisk
|
||||
inst /usr/bin/chroot
|
||||
inst /usr/bin/clear
|
||||
inst /usr/bin/cut
|
||||
inst /usr/bin/cp
|
||||
inst /usr/bin/dhcpcd
|
||||
inst /usr/bin/dialog
|
||||
inst /usr/bin/echo
|
||||
inst /usr/bin/env
|
||||
inst /usr/bin/find
|
||||
inst /usr/bin/find
|
||||
inst /usr/bin/grep
|
||||
inst /usr/bin/head
|
||||
inst /usr/bin/id
|
||||
inst /usr/bin/ln
|
||||
inst /usr/bin/ls
|
||||
inst /usr/bin/lsblk
|
||||
inst /usr/bin/mke2fs
|
||||
inst /usr/bin/mkfs.btrfs
|
||||
inst /usr/bin/mkfs.f2fs
|
||||
inst /usr/bin/mkfs.vfat
|
||||
inst /usr/bin/mkfs.xfs
|
||||
inst /usr/bin/mkswap
|
||||
inst /usr/bin/mktemp
|
||||
inst /usr/bin/mount
|
||||
inst /usr/bin/reboot
|
||||
inst /usr/bin/rm
|
||||
inst /usr/bin/sed
|
||||
inst /usr/bin/sh
|
||||
inst /usr/bin/sort
|
||||
inst /usr/bin/sync
|
||||
inst /usr/bin/stdbuf
|
||||
inst /usr/bin/sleep
|
||||
inst /usr/bin/touch
|
||||
inst /usr/bin/xargs
|
||||
inst /usr/bin/xbps-install
|
||||
inst /usr/bin/xbps-reconfigure
|
||||
inst /usr/bin/xbps-remove
|
||||
inst /usr/bin/xbps-uhelper
|
||||
|
||||
inst /usr/libexec/dhcpcd-hooks/20-resolv.conf
|
||||
inst /usr/libexec/dhcpcd-run-hooks
|
||||
inst /usr/libexec/coreutils/libstdbuf.so
|
||||
|
||||
inst_multiple /var/db/xbps/keys/*
|
||||
inst_multiple /usr/share/xbps.d/*
|
||||
inst_multiple /usr/share/zoneinfo/*/*
|
||||
|
||||
inst_multiple /etc/ssl/certs/*
|
||||
inst /etc/ssl/certs.pem
|
||||
|
||||
inst /etc/default/libc-locales
|
||||
inst /etc/group
|
||||
|
||||
# We need to remove a choice here since the installer's initrd
|
||||
# can't function as a local source. Strictly we shouldn't be
|
||||
# doing this from dracut's installation function, but this is the
|
||||
# last place that file really exists 'on disk' in the sense that
|
||||
# we can modify it, so this change is applied here.
|
||||
sed -i '/Packages from ISO image/d' "$moddir/installer.sh"
|
||||
|
||||
# The system doesn't have a real init up so the reboot is going to
|
||||
# be rough, we make it an option though if the end user wants to
|
||||
# do this...
|
||||
sed -i "s:shutdown -r now:sync && reboot -f:" "$moddir/installer.sh"
|
||||
|
||||
inst "$moddir/installer.sh" /usr/bin/void-installer
|
||||
inst_hook pre-mount 05 "$moddir/netmenu.sh"
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
dialog --colors --keep-tite --no-shadow --no-mouse \
|
||||
--backtitle "\Zb\Z7Peppermintos installation -- https://peppermintos.com/\Zn" \
|
||||
--cancel-label "Reboot" --aspect 20 \
|
||||
--menu "Select an Action:" 10 50 2 \
|
||||
"Install" "Run pep-installer" \
|
||||
"Shell" "Run dash" \
|
||||
2>/tmp/netmenu.action
|
||||
|
||||
if [ ! $? ] ; then
|
||||
reboot -f
|
||||
fi
|
||||
|
||||
case $(cat /tmp/netmenu.action) in
|
||||
"Install") /usr/bin/void-installer ; exec sh ;;
|
||||
"Shell") exec sh ;;
|
||||
esac
|
|
@ -0,0 +1,8 @@
|
|||
SUBSYSTEM!="block", GOTO="ps_end"
|
||||
ACTION!="add|change", GOTO="ps_end"
|
||||
# Also don't process disks that are slated to be a multipath device
|
||||
ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="ps_end"
|
||||
|
||||
KERNEL=="mtdblock[0-9]*", IMPORT BLKID
|
||||
|
||||
LABEL="ps_end"
|
|
@ -0,0 +1,20 @@
|
|||
SUBSYSTEM!="block", GOTO="pss_end"
|
||||
ACTION!="add|change", GOTO="pss_end"
|
||||
# Also don't process disks that are slated to be a multipath device
|
||||
ENV{DM_MULTIPATH_DEVICE_PATH}=="?*", GOTO="pss_end"
|
||||
|
||||
ACTION=="change", KERNEL=="dm-[0-9]*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}!="1", GOTO="do_pss"
|
||||
KERNEL=="mtdblock*", GOTO="do_pss"
|
||||
|
||||
GOTO="pss_end"
|
||||
|
||||
LABEL="do_pss"
|
||||
# by-path (parent device path)
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="", DEVPATH!="*/virtual/*", IMPORT PATH_ID
|
||||
ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}"
|
||||
ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
|
||||
|
||||
# by-label/by-uuid links (filesystem metadata)
|
||||
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
|
||||
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
|
||||
LABEL="pss_end"
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh -x
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
type getargbool >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||
|
||||
if getargbool 0 live.accessibility; then
|
||||
[ -d "${NEWROOT}/etc/sv/espeakup" ] && ln -s "/etc/sv/espeakup" "${NEWROOT}/etc/runit/runsvdir/current/"
|
||||
[ -d "${NEWROOT}/etc/sv/brltty" ] && ln -s "/etc/sv/brltty" "${NEWROOT}/etc/runit/runsvdir/current/"
|
||||
fi
|
|
@ -0,0 +1,57 @@
|
|||
#!/bin/sh -x
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
if ! type getarg >/dev/null 2>&1 && ! type getargbool >/dev/null 2>&1; then
|
||||
. /lib/dracut-lib.sh
|
||||
fi
|
||||
|
||||
echo pep-live > ${NEWROOT}/etc/hostname
|
||||
|
||||
USERNAME=$(getarg live.user)
|
||||
USERSHELL=$(getarg live.shell)
|
||||
|
||||
[ -z "$USERNAME" ] && USERNAME=pep
|
||||
[ -x $NEWROOT/bin/bash -a -z "$USERSHELL" ] && USERSHELL=/bin/bash
|
||||
[ -z "$USERSHELL" ] && USERSHELL=/bin/sh
|
||||
|
||||
# Create /etc/default/live.conf to store USER.
|
||||
echo "USERNAME=$USERNAME" >> ${NEWROOT}/etc/default/live.conf
|
||||
chmod 644 ${NEWROOT}/etc/default/live.conf
|
||||
|
||||
if ! grep -q ${USERSHELL} ${NEWROOT}/etc/shells ; then
|
||||
echo ${USERSHELL} >> ${NEWROOT}/etc/shells
|
||||
fi
|
||||
|
||||
# Create new user and remove password. We'll use autologin by default.
|
||||
chroot ${NEWROOT} useradd -m -c $USERNAME -G audio,video,wheel -s $USERSHELL $USERNAME
|
||||
chroot ${NEWROOT} passwd -d $USERNAME >/dev/null 2>&1
|
||||
|
||||
# Setup default root/user password (voidlinux).
|
||||
chroot ${NEWROOT} sh -c 'echo "root:peppermintos" | chpasswd -c SHA512'
|
||||
chroot ${NEWROOT} sh -c "echo "$USERNAME:peppermintos" | chpasswd -c SHA512"
|
||||
|
||||
# Enable sudo permission by default.
|
||||
if [ -f ${NEWROOT}/etc/sudoers ]; then
|
||||
echo "${USERNAME} ALL=(ALL:ALL) NOPASSWD: ALL" > "${NEWROOT}/etc/sudoers.d/99-pep-live"
|
||||
fi
|
||||
|
||||
if [ -d ${NEWROOT}/etc/polkit-1 ]; then
|
||||
# If polkit is installed allow users in the wheel group to run anything.
|
||||
cat > ${NEWROOT}/etc/polkit-1/rules.d/pep-live.rules <<_EOF
|
||||
polkit.addAdminRule(function(action, subject) {
|
||||
return ["unix-group:wheel"];
|
||||
});
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (subject.isInGroup("wheel")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
_EOF
|
||||
chroot ${NEWROOT} chown polkitd:polkitd /etc/polkit-1/rules.d/pep-live.rules
|
||||
fi
|
||||
|
||||
if getargbool 0 live.autologin; then
|
||||
sed -i "s,GETTY_ARGS=\"--noclear\",GETTY_ARGS=\"--noclear -a $USERNAME\",g" ${NEWROOT}/etc/sv/agetty-tty1/conf
|
||||
fi
|
|
@ -0,0 +1,63 @@
|
|||
#!/bin/sh
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||
|
||||
USERNAME=$(getarg live.user)
|
||||
[ -z "$USERNAME" ] && USERNAME=pep
|
||||
|
||||
# Configure GDM autologin
|
||||
if [ -d ${NEWROOT}/etc/gdm ]; then
|
||||
GDMCustomFile=${NEWROOT}/etc/gdm/custom.conf
|
||||
AutologinParameters="AutomaticLoginEnable=true\nAutomaticLogin=$USERNAME"
|
||||
|
||||
# Prevent from updating if parameters already present (persistent usb key)
|
||||
if ! `grep -qs 'AutomaticLoginEnable' $GDMCustomFile` ; then
|
||||
if ! `grep -qs '\[daemon\]' $GDMCustomFile` ; then
|
||||
echo '[daemon]' >> $GDMCustomFile
|
||||
fi
|
||||
sed -i "s/\[daemon\]/\[daemon\]\n$AutologinParameters/" $GDMCustomFile
|
||||
fi
|
||||
fi
|
||||
|
||||
# Configure sddm autologin for the kde iso.
|
||||
if [ -x ${NEWROOT}/usr/bin/sddm ]; then
|
||||
cat > ${NEWROOT}/etc/sddm.conf <<_EOF
|
||||
[Autologin]
|
||||
User=${USERNAME}
|
||||
Session=plasma.desktop
|
||||
_EOF
|
||||
fi
|
||||
|
||||
# Configure lightdm autologin.
|
||||
if [ -r "${NEWROOT}/etc/lightdm/lightdm.conf" ]; then
|
||||
sed -i -e "s|^\#\(autologin-user=\).*|\1$USERNAME|" \
|
||||
"${NEWROOT}/etc/lightdm/lightdm.conf"
|
||||
sed -i -e "s|^\#\(autologin-user-timeout=\).*|\10|" \
|
||||
"${NEWROOT}/etc/lightdm/lightdm.conf"
|
||||
sed -i -e "s|^\#\(autologin-session=\).*|\1$(cat "${NEWROOT}/etc/lightdm/.session")|" \
|
||||
"${NEWROOT}/etc/lightdm/lightdm.conf"
|
||||
fi
|
||||
|
||||
# Configure lxdm autologin.
|
||||
if [ -r ${NEWROOT}/etc/lxdm/lxdm.conf ]; then
|
||||
sed -e "s,.*autologin.*=.*,autologin=$USERNAME," -i ${NEWROOT}/etc/lxdm/lxdm.conf
|
||||
if [ -x ${NEWROOT}/usr/bin/enlightenment_start ]; then
|
||||
sed -e "s,.*session.*=.*,session=/usr/bin/enlightenment_start," -i ${NEWROOT}/etc/lxdm/lxdm.conf
|
||||
elif [ -x ${NEWROOT}/usr/bin/startxfce4 ]; then
|
||||
sed -e "s,.*session.*=.*,session=/usr/bin/startxfce4," -i ${NEWROOT}/etc/lxdm/lxdm.conf
|
||||
elif [ -x ${NEWROOT}/usr/bin/mate-session ]; then
|
||||
sed -e "s,.*session.*=.*,session=/usr/bin/mate-session," -i ${NEWROOT}/etc/lxdm/lxdm.conf
|
||||
elif [ -x ${NEWROOT}/usr/bin/cinnamon-session ]; then
|
||||
sed -e "s,.*session.*=.*,session=/usr/bin/cinnamon-session," -i ${NEWROOT}/etc/lxdm/lxdm.conf
|
||||
elif [ -x ${NEWROOT}/usr/bin/i3 ]; then
|
||||
sed -e "s,.*session.*=.*,session=/usr/bin/i3," -i ${NEWROOT}/etc/lxdm/lxdm.conf
|
||||
elif [ -x ${NEWROOT}/usr/bin/startlxde ]; then
|
||||
sed -e "s,.*session.*=.*,session=/usr/bin/startlxde," -i ${NEWROOT}/etc/lxdm/lxdm.conf
|
||||
elif [ -x ${NEWROOT}/usr/bin/startlxqt ]; then
|
||||
sed -e "s,.*session.*=.*,session=/usr/bin/startlxqt," -i ${NEWROOT}/etc/lxdm/lxdm.conf
|
||||
elif [ -x ${NEWROOT}/usr/bin/startfluxbox ]; then
|
||||
sed -e "s,.*session.*=.*,session=/usr/bin/startfluxbox," -i ${NEWROOT}/etc/lxdm/lxdm.conf
|
||||
fi
|
||||
fi
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||
|
||||
CONSOLE=$(getarg console)
|
||||
case "$CONSOLE" in
|
||||
*ttyS0*)
|
||||
ln -s /etc/sv/agetty-ttyS0 ${NEWROOT}/etc/runit/runsvdir/default/
|
||||
;;
|
||||
*hvc0*)
|
||||
ln -s /etc/sv/agetty-hvc0 ${NEWROOT}/etc/runit/runsvdir/default/
|
||||
;;
|
||||
*hvsi0*)
|
||||
ln -s /etc/sv/agetty-hvsi0 ${NEWROOT}/etc/runit/runsvdir/default/
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
||||
|
||||
LOCALE=$(getarg locale.LANG)
|
||||
[ -z "$LOCALE" ] && LOCALE="en_US.UTF-8"
|
||||
|
||||
# also enable this locale in newroot.
|
||||
echo "LANG=$LOCALE" > $NEWROOT/etc/locale.conf
|
||||
echo "LC_COLLATE=C" >> $NEWROOT/etc/locale.conf
|
||||
|
||||
# set keymap too.
|
||||
KEYMAP=$(getarg vconsole.keymap)
|
||||
[ -z "$KEYMAP" ] && KEYMAP="us"
|
||||
|
||||
if [ -f ${NEWROOT}/etc/vconsole.conf ]; then
|
||||
sed -e "s,^KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/vconsole.conf
|
||||
elif [ -f ${NEWROOT}/etc/rc.conf ]; then
|
||||
sed -e "s,^#KEYMAP=.*,KEYMAP=$KEYMAP," -i $NEWROOT/etc/rc.conf
|
||||
fi
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||
|
||||
check() {
|
||||
return 255
|
||||
}
|
||||
|
||||
depends() {
|
||||
echo dmsquash-live
|
||||
}
|
||||
|
||||
install() {
|
||||
inst /usr/bin/chroot
|
||||
inst /usr/bin/chmod
|
||||
inst /usr/bin/sed
|
||||
|
||||
if [ -e /usr/bin/memdiskfind ]; then
|
||||
inst /usr/bin/memdiskfind
|
||||
instmods mtdblock phram
|
||||
inst_rules "$moddir/59-mtd.rules" "$moddir/61-mtd.rules"
|
||||
prepare_udev_rules 59-mtd.rules 61-mtd.rules
|
||||
inst_hook pre-udev 01 "$moddir/mtd.sh"
|
||||
fi
|
||||
|
||||
inst_hook pre-pivot 01 "$moddir/adduser.sh"
|
||||
inst_hook pre-pivot 02 "$moddir/display-manager-autologin.sh"
|
||||
inst_hook pre-pivot 02 "$moddir/getty-serial.sh"
|
||||
inst_hook pre-pivot 03 "$moddir/locale.sh"
|
||||
inst_hook pre-pivot 04 "$moddir/accessibility.sh"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
MEMDISK=$(memdiskfind)
|
||||
if [ "$MEMDISK" ]; then
|
||||
modprobe phram phram=memdisk,$MEMDISK
|
||||
modprobe mtdblock
|
||||
printf 'KERNEL=="mtdblock0", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root /dev/mtdblock0"\n' >> /etc/udev/rules.d/99-live-squash.rules
|
||||
fi
|
After Width: | Height: | Size: 7.2 KiB |
|
@ -0,0 +1,15 @@
|
|||
insmod usbms
|
||||
insmod usb_keyboard
|
||||
insmod part_gpt
|
||||
insmod part_msdos
|
||||
insmod fat
|
||||
insmod iso9660
|
||||
insmod udf
|
||||
insmod ext2
|
||||
insmod reiserfs
|
||||
insmod ntfs
|
||||
insmod hfsplus
|
||||
insmod linux
|
||||
insmod chain
|
||||
search --file --no-floppy --set=peplive "/boot/grub/grub_pep.cfg"
|
||||
source "(${peplive})/boot/grub/grub_pep.cfg"
|
|
@ -0,0 +1,96 @@
|
|||
|
||||
set pager="1"
|
||||
set locale_dir="(${peplive})/boot/grub/locale"
|
||||
|
||||
if [ -e "${prefix}/${grub_cpu}-${grub_platform}/all_video.mod" ]; then
|
||||
insmod all_video
|
||||
else
|
||||
insmod efi_gop
|
||||
insmod efi_uga
|
||||
insmod video_bochs
|
||||
insmod video_cirrus
|
||||
fi
|
||||
|
||||
insmod font
|
||||
|
||||
if loadfont "(${peplive})/boot/grub/fonts/unicode.pf2" ; then
|
||||
insmod gfxterm
|
||||
set gfxmode="auto"
|
||||
|
||||
terminal_input console
|
||||
terminal_output gfxterm
|
||||
|
||||
insmod png
|
||||
background_image "(${peplive})/boot/isolinux/@@SPLASHIMAGE@@"
|
||||
fi
|
||||
|
||||
# Set default menu entry
|
||||
default=linux
|
||||
timeout=15
|
||||
timeout_style=menu
|
||||
|
||||
# GRUB init tune for accessibility
|
||||
play 600 988 1 1319 4
|
||||
|
||||
if [ cpuid -l ]; then
|
||||
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@)" --id "linux" {
|
||||
set gfxpayload="keep"
|
||||
linux (${peplive})/boot/vmlinuz \
|
||||
root=live:CDLABEL=PEP_LIVE ro init=/sbin/init \
|
||||
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
|
||||
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
|
||||
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@
|
||||
initrd (${peplive})/boot/initrd
|
||||
}
|
||||
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) (RAM)" --id "linuxram" {
|
||||
set gfxpayload="keep"
|
||||
linux (${peplive})/boot/vmlinuz \
|
||||
root=live:CDLABEL=PEP_LIVE ro init=/sbin/init \
|
||||
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
|
||||
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
|
||||
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ rd.live.ram
|
||||
initrd (${peplive})/boot/initrd
|
||||
}
|
||||
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) with speech" --hotkey s --id "linuxa11y" {
|
||||
set gfxpayload="keep"
|
||||
linux (${peplive})/boot/vmlinuz \
|
||||
root=live:CDLABEL=PEP_LIVE ro init=/sbin/init \
|
||||
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
|
||||
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
|
||||
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin
|
||||
initrd (${peplive})/boot/initrd
|
||||
}
|
||||
menuentry "@@BOOT_TITLE@@ @@KERNVER@@ (@@ARCH@@) with speech (RAM)" --hotkey r --id "linuxa11yram" {
|
||||
set gfxpayload="keep"
|
||||
linux (${peplive})/boot/vmlinuz \
|
||||
root=live:CDLABEL=PEP_LIVE ro init=/sbin/init \
|
||||
rd.luks=0 rd.md=0 rd.dm=0 loglevel=4 gpt add_efi_memmap \
|
||||
vconsole.unicode=1 vconsole.keymap=@@KEYMAP@@ \
|
||||
locale.LANG=@@LOCALE@@ @@BOOT_CMDLINE@@ live.accessibility live.autologin rd.live.ram
|
||||
initrd (${peplive})/boot/initrd
|
||||
}
|
||||
if [ "${grub_platform}" == "efi" ]; then
|
||||
menuentry "Run Memtest86+ (RAM test)" --id memtest {
|
||||
set gfxpayload="keep"
|
||||
linux (${peplive})/boot/memtest.efi
|
||||
}
|
||||
menuentry 'UEFI Firmware Settings' --id uefifw {
|
||||
fwsetup
|
||||
}
|
||||
else
|
||||
menuentry "Run Memtest86+ (RAM test)" --id memtest {
|
||||
set gfxpayload="keep"
|
||||
linux (${peplive})/boot/memtest.bin
|
||||
}
|
||||
fi
|
||||
|
||||
menuentry "System restart" --id restart {
|
||||
echo "System rebooting..."
|
||||
reboot
|
||||
}
|
||||
|
||||
menuentry "System shutdown" --id poweroff {
|
||||
echo "System shutting down..."
|
||||
halt
|
||||
}
|
||||
fi
|
|
@ -0,0 +1 @@
|
|||
system-run.svg
|
|
@ -0,0 +1 @@
|
|||
dialog-ok-apply.svg
|
|
@ -0,0 +1 @@
|
|||
run-build.svg
|
|
@ -0,0 +1 @@
|
|||
dialog-error.svg
|
|
@ -0,0 +1 @@
|
|||
database-index.svg
|
|
@ -0,0 +1 @@
|
|||
appointment-new.svg
|
|
@ -0,0 +1 @@
|
|||
folder-new.svg
|
|
@ -0,0 +1 @@
|
|||
tag.svg
|
|
@ -0,0 +1,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">
|
||||
.ColorScheme-Text { color:#aaaaaa; } .ColorScheme-Highlight { color:#5294e2; }
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor" class="ColorScheme-Text" d="M 8 1 C 4.137 1 1 4.137 1 8 C 1 11.863 4.137 15 8 15 C 11.863 15 15 11.863 15 8 C 15 4.137 11.863 1 8 1 z M 8 3 C 9.0194 3 9.959 3.28763 10.75 3.8125 L 3.8125 10.75 C 3.28763 9.95898 3 9.0194 3 8 C 3 5.2407 5.2408 3 8 3 z M 12.1875 5.25 C 12.71237 6.04102 13 6.9806 13 8 C 13 10.7592 10.7592 13 8 13 C 6.9806 13 6.041 12.71237 5.25 12.1875 L 12.1875 5.25 z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 674 B |
|
@ -0,0 +1,12 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">
|
||||
.ColorScheme-Text { color:#555555; } .ColorScheme-Highlight { color:#4285f4; } .ColorScheme-NeutralText { color:#ff9800; } .ColorScheme-PositiveText { color:#4caf50; } .ColorScheme-NegativeText { color:#f44336; }
|
||||
</style>
|
||||
</defs>
|
||||
<g>
|
||||
<circle style="fill:currentColor" class="ColorScheme-Text" cx="3" cy="8" r="2"/>
|
||||
<circle style="fill:currentColor" class="ColorScheme-Text" cx="8" cy="8" r="2"/>
|
||||
<circle style="fill:currentColor" class="ColorScheme-Text" cx="13" cy="8" r="2"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 642 B |
|
@ -0,0 +1 @@
|
|||
fork.svg
|
|
@ -0,0 +1 @@
|
|||
im-user.svg
|
|
@ -0,0 +1 @@
|
|||
archive-insert.svg
|
|
@ -0,0 +1 @@
|
|||
archive-insert-directory.svg
|
|
@ -0,0 +1 @@
|
|||
flag-red.svg
|
|
@ -0,0 +1 @@
|
|||
media-view-subtitles.svg
|
|
@ -0,0 +1 @@
|
|||
list-add.svg
|
|
@ -0,0 +1,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">
|
||||
.ColorScheme-Text { color:#aaaaaa; } .ColorScheme-Highlight { color:#5294e2; }
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor" class="ColorScheme-Text" d="M 3,1 C 1.89,1 1,1.89 1,3 V 13 C 1,14.11 1.89,15 3,15 H 13 C 14.11,15 15,14.11 15,13 V 3 C 15,1.89 14.11,1 13,1 Z M 8,4 C 10.21,4 12,5.79 12,8 V 8.5 C 12,9.33 11.33,10 10.5,10 10.06,10 9.64,9.8 9.35,9.46 9,9.79 8.52,10 8,10 6.9,10 6,9.1 6,8 6,6.9 6.9,6 8,6 9.1,6 10,6.9 10,8 V 8.5 C 10,8.78 10.22,9 10.5,9 10.78,9 11,8.78 11,8.5 V 8 C 11,6.34 9.66,5 8,5 6.34,5 5,6.34 5,8 5,9.66 6.34,11 8,11 H 10.5 C 10.5,11 11,11 11,11.5 10.97,12 10.5,12 10.5,12 H 8 C 5.79,12 4,10.21 4,8 4,5.79 5.79,4 8,4 Z M 8,7 C 7.45,7 7,7.45 7,8 7,8.55 7.45,9 8,9 8.55,9 9,8.55 9,8 9,7.45 8.55,7 8,7 Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 887 B |
|
@ -0,0 +1 @@
|
|||
address-book-new.svg
|
|
@ -0,0 +1,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">
|
||||
.ColorScheme-Text { color:#aaaaaa; } .ColorScheme-Highlight { color:#5294e2; }
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor" class="ColorScheme-Text" d="M 3 1 L 3 11 L 1 11 L 1 13 L 3 13 L 3 15 L 5 15 L 5 13 L 15 13 L 15 11 L 5 11 L 5 9.5 L 7.90625 7.3203125 L 10.027344 9.4414062 L 15 4.0878906 L 15 1.1484375 L 9.9726562 6.5585938 L 8.09375 4.6796875 L 5 7 L 5 1 L 3 1 z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 551 B |
|
@ -0,0 +1,9 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
|
||||
<defs>
|
||||
<linearGradient id="linearGradient4177" x1="8" x2="8" y1="15" y2="1" gradientUnits="userSpaceOnUse">
|
||||
<stop style="stop-color:#aaaaaa" offset="0"/>
|
||||
<stop style="stop-color:#aaaaaa;stop-opacity:0" offset="1" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path style="fill:url(#linearGradient4177)" d="M 1 1 L 1 15 L 15 15 L 15 1 L 1 1 z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 462 B |
|
@ -0,0 +1,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">
|
||||
.ColorScheme-Text { color:#aaaaaa; } .ColorScheme-Highlight { color:#5294e2; }
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor" class="ColorScheme-Text" d="M 11 2 A 3 3 0 0 0 8.1757812 4 L 1 4 L 1 6 L 8.1738281 6 A 3 3 0 0 0 11 8 A 3 3 0 0 0 13.824219 6 L 15 6 L 15 4 L 13.826172 4 A 3 3 0 0 0 11 2 z M 6 8 A 3 3 0 0 0 3.1757812 10 L 1 10 L 1 12 L 3.1738281 12 A 3 3 0 0 0 6 14 A 3 3 0 0 0 8.8242188 12 L 15 12 L 15 10 L 8.8261719 10 A 3 3 0 0 0 6 8 z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 613 B |
|
@ -0,0 +1,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">
|
||||
.ColorScheme-Text { color:#aaaaaa; } .ColorScheme-Highlight { color:#5294e2; }
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor" class="ColorScheme-Text" d="M 4 1 L 4 3.1738281 A 3 3 0 0 0 2 6 A 3 3 0 0 0 4 8.8242188 L 4 15 L 6 15 L 6 8.8261719 A 3 3 0 0 0 8 6 A 3 3 0 0 0 6 3.1757812 L 6 1 L 4 1 z M 10 1 L 10 8.1738281 A 3 3 0 0 0 8 11 A 3 3 0 0 0 10 13.824219 L 10 15 L 12 15 L 12 13.826172 A 3 3 0 0 0 14 11 A 3 3 0 0 0 12 8.1757812 L 12 1 L 10 1 z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 613 B |
|
@ -0,0 +1 @@
|
|||
address-book-new.svg
|
|
@ -0,0 +1,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1" viewBox="0 0 16 16">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">
|
||||
.ColorScheme-Text { color:#aaaaaa; } .ColorScheme-Highlight { color:#5294e2; }
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor" class="ColorScheme-Text" d="M 8,1 0.5,9 H 3 v 6 h 3 v -4 h 4 v 4 h 3 V 9 h 2.5 z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 384 B |
|
@ -0,0 +1 @@
|
|||
cm_runterm.svg
|
|
@ -0,0 +1 @@
|
|||
folder-new.svg
|
|
@ -0,0 +1 @@
|
|||
document-import.svg
|
|
@ -0,0 +1 @@
|
|||
folder-new.svg
|
|
@ -0,0 +1 @@
|
|||
configure.svg
|
|
@ -0,0 +1 @@
|
|||
edit-delete.svg
|
|
@ -0,0 +1,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">
|
||||
.ColorScheme-Text { color:#aaaaaa; } .ColorScheme-Highlight { color:#5294e2; }
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor" class="ColorScheme-Text" d="M 1 0 L 1 16 L 3 16 L 3 15 L 3 0 L 1 0 z M 3 15 L 5.5 15 L 6.5625 12 L 11.4375 12 L 12.5 15 L 15.28125 15 L 10 1 L 8 1 L 3 15 z M 9 5 L 10.75 10 L 7.25 10 L 9 5 z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 480 B |
|
@ -0,0 +1,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">
|
||||
.ColorScheme-Text { color:#aaaaaa; } .ColorScheme-Highlight { color:#5294e2; }
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor" class="ColorScheme-Text" d="M 9 1 L 9 8 L 14 8 L 14 1 L 9 1 z M 2 3 L 2 8 L 7 8 L 7 3 L 2 3 z M 1 10 L 1 12 L 15 12 L 15 10 L 1 10 z M 9 13 L 9 15 L 14 15 L 14 13 L 9 13 z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 461 B |
|
@ -0,0 +1,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<defs>
|
||||
<style id="current-color-scheme" type="text/css">
|
||||
.ColorScheme-Text { color:#aaaaaa; } .ColorScheme-Highlight { color:#5294e2; }
|
||||
</style>
|
||||
</defs>
|
||||
<path style="fill:currentColor" class="ColorScheme-Text" d="M 7 1 L 7 2 L 3 2 L 3 6 L 7 6 L 7 10 L 3 10 L 3 14 L 7 14 L 7 15 L 9 15 L 9 14 L 13 14 L 13 10 L 9 10 L 9 6 L 13 6 L 13 2 L 9 2 L 9 1 L 7 1 z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 459 B |