mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-23 01:16:04 +01:00
custom archiso welcome message; refactor: holo depends on git and base; add ssh package
This commit is contained in:
parent
32aa0cbea9
commit
4d86257c1f
@ -1,9 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
|
||||||
# https://wiki.archlinux.org/index.php/Archiso#Prepare_a_custom_profile
|
|
||||||
#
|
|
||||||
# TODO: set custom welcome message in /etc/motd
|
|
||||||
#
|
|
||||||
BUILD_DIR=/out
|
BUILD_DIR=/out
|
||||||
|
|
||||||
PKGS=()
|
PKGS=()
|
||||||
@ -13,6 +9,9 @@ PKGS+=('de-p1st-screen') # longer scrollback history in screen
|
|||||||
PKGS+=('de-p1st-pacman') # [de-p1st] mirror enabled
|
PKGS+=('de-p1st-pacman') # [de-p1st] mirror enabled
|
||||||
PKGS+=('de-p1st-installer') # de-p1st-installer script
|
PKGS+=('de-p1st-installer') # de-p1st-installer script
|
||||||
|
|
||||||
|
ENABLE_SSH=true
|
||||||
|
SSH_PUB_KEY='ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCpgihAg8Qzu5q+AGXHLR7p+rrS1yB0KlZb/Y/EwZT15EhEtsUMqBMRiY0TdjKQU0broyygZnymccLmCXvihEgk3zk/hP8VEDmN5wmE2tRBPR4lSjo8E1R8N79G+gaFkwi93QYh57MsGfa9k4tvGrJy0yaD7GrPqtQf+IIuvV14WJQAqnikTdbFqRjk5JGearYLU7jSKa+9NmR7JQ9NExoyIPgmQ/pd0Xc2qt8k5UGfz3HM9MAmIVQ30whK6m1iYZ8nxEidHrfreQx8NOa7ujo4zQnV1NYvRUjObr/qyIhPU6DYLT2mVRNupQFKx6LI38O4U13heugUFqJ3zvog3aDsriFiv8jzJAJvWXx7Q3TqKhqiG9VTkwBw1NDbCAOXKiEdMfiCYbdCfpNgdepU75bMloJcSQQVUqoH2tQhSbwKLuRFgOnyaHpvWbieXBRcUnfG8gg4p4jqiwx5laweEeOIOD/i7G1Mjx7Dj2ctnT/ILat/xsf+Y0W4eJr3bc5L9ghgw6wsKbNSqwjFUCFcHcARK3gvSH+hO2/BpgMVoyvZjO5PNuUqfsZ7bIIs5cDdyB/ly3irKuaRz1+3x1x4gPgSiOcji7HxPwogzhPsyfoRLHNt9tJ5X4nF2Iz1M5RTJpbZCi6yEj+9Q85FVjD76BEWuZe18kRrwhuLf/XgKdF9tQ== openpgp:0xA8B75370'
|
||||||
|
|
||||||
################################
|
################################
|
||||||
|
|
||||||
# Write-permission for user "build"
|
# Write-permission for user "build"
|
||||||
@ -67,9 +66,22 @@ for PKG in "${PKGS[@]}"; do
|
|||||||
echo "${PKG}" >>"${BUILD_DIR}"/profile/packages.x86_64
|
echo "${PKG}" >>"${BUILD_DIR}"/profile/packages.x86_64
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# source: https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/airootfs/etc/motd
|
||||||
|
echo 'To install [38;2;23;147;209mArch Linux[0m run the following command:
|
||||||
|
[35mde-p1st-installer[0m
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
For Wi-Fi, authenticate to the wireless network using the [35miwctl[0m utility.
|
||||||
|
For mobile broadband (WWAN) modems, connect with the [35mmmcli[0m utility.
|
||||||
|
Ethernet, WLAN and WWAN interfaces using DHCP should work automatically.
|
||||||
|
' > "${BUILD_DIR}"/profile/airootfs/etc/motd || exit $?
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
mkdir "${BUILD_DIR}/work_dir" && mkdir "${BUILD_DIR}/out_dir" || exit $?
|
mkdir "${BUILD_DIR}/work_dir" && mkdir "${BUILD_DIR}/out_dir" || exit $?
|
||||||
|
|
||||||
echo "running 'sudo mkarchiso' ..."
|
echo "running 'sudo mkarchiso' ..."
|
||||||
sudo mkarchiso -v -w "${BUILD_DIR}/work_dir" -o "${BUILD_DIR}/out_dir" "${BUILD_DIR}/profile" || exit $?
|
sudo mkarchiso -v -w "${BUILD_DIR}/work_dir" -o "${BUILD_DIR}/out_dir" "${BUILD_DIR}/profile" || exit $?
|
||||||
|
|
||||||
|
sudo chown -R "build:wheel" /out/out_dir
|
||||||
|
@ -20,7 +20,7 @@ depends+=(libva-mesa-driver)
|
|||||||
# "HW-vide-acceleration: VDPAU"
|
# "HW-vide-acceleration: VDPAU"
|
||||||
depends+=(mesa-vdpau)
|
depends+=(mesa-vdpau)
|
||||||
# holo
|
# holo
|
||||||
depends+=('holo' 'base') # without base "holo apply" may fail on initial system installation
|
depends+=('holo' 'git' 'base') # without base "holo apply" may fail on initial system installation
|
||||||
|
|
||||||
makedepends=('git')
|
makedepends=('git')
|
||||||
provides=('de-p1st-gpu') # implicitly provides $pkgname
|
provides=('de-p1st-gpu') # implicitly provides $pkgname
|
||||||
|
@ -8,7 +8,7 @@ pkgdesc="grub with configuration"
|
|||||||
arch=('any')
|
arch=('any')
|
||||||
url="https://codeberg.org/privacy1st/${_reponame}"
|
url="https://codeberg.org/privacy1st/${_reponame}"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=('grub' 'holo' 'git')
|
depends=('grub' 'holo' 'git' 'base')
|
||||||
makedepends=('git')
|
makedepends=('git')
|
||||||
install='.install'
|
install='.install'
|
||||||
changelog=
|
changelog=
|
||||||
|
@ -8,7 +8,7 @@ pkgdesc="locale and timezone"
|
|||||||
arch=('any')
|
arch=('any')
|
||||||
url="https://codeberg.org/privacy1st/${_reponame}"
|
url="https://codeberg.org/privacy1st/${_reponame}"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=('holo' 'git')
|
depends=('holo' 'git' 'base')
|
||||||
makedepends=('git')
|
makedepends=('git')
|
||||||
backup=('etc/locale.conf' 'etc/localtime')
|
backup=('etc/locale.conf' 'etc/localtime')
|
||||||
install='.install'
|
install='.install'
|
||||||
|
@ -8,7 +8,7 @@ pkgdesc="Personalized makepkg.conf"
|
|||||||
arch=('any')
|
arch=('any')
|
||||||
url="https://codeberg.org/privacy1st/${_reponame}"
|
url="https://codeberg.org/privacy1st/${_reponame}"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=('pacman' 'holo' 'git') # /etc/makepkg.conf belongs to pacman
|
depends=('pacman' 'holo' 'git' 'base') # /etc/makepkg.conf belongs to pacman
|
||||||
makedepends=('git')
|
makedepends=('git')
|
||||||
install='.install'
|
install='.install'
|
||||||
changelog=
|
changelog=
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# save stdin (content of /etc/mkinitcpio.conf) in variable
|
# save stdin (content of /etc/mkinitcpio.conf) in variable
|
||||||
stdin=$(cat)
|
stdin=$(cat)
|
||||||
|
|
||||||
# MODULES is empty
|
# assert MODULES is empty
|
||||||
echo "$stdin" | grep '^MODULES=()'
|
echo "$stdin" | grep '^MODULES=()'
|
||||||
|
|
||||||
# assert HOOKS is as expected
|
# assert HOOKS is as expected
|
||||||
|
@ -8,7 +8,7 @@ pkgdesc="nano with configuration"
|
|||||||
arch=('any')
|
arch=('any')
|
||||||
url="https://codeberg.org/privacy1st/${_reponame}"
|
url="https://codeberg.org/privacy1st/${_reponame}"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=('nano' 'holo' 'git')
|
depends=('nano' 'holo' 'git' 'base')
|
||||||
makedepends=('git')
|
makedepends=('git')
|
||||||
install='.install'
|
install='.install'
|
||||||
source=("git+${url}.git")
|
source=("git+${url}.git")
|
||||||
|
@ -8,7 +8,7 @@ pkgdesc="pacman with configuration"
|
|||||||
arch=('any')
|
arch=('any')
|
||||||
url="https://codeberg.org/privacy1st/${_reponame}"
|
url="https://codeberg.org/privacy1st/${_reponame}"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=('pacman' 'holo' 'git')
|
depends=('pacman' 'holo' 'git' 'base')
|
||||||
makedepends=('git')
|
makedepends=('git')
|
||||||
optdepends=('de-p1st-pacman-mirrorlist')
|
optdepends=('de-p1st-pacman-mirrorlist')
|
||||||
install='.install'
|
install='.install'
|
||||||
|
@ -8,7 +8,7 @@ pkgdesc="screen with configuration"
|
|||||||
arch=('any')
|
arch=('any')
|
||||||
url="https://codeberg.org/privacy1st/${_reponame}"
|
url="https://codeberg.org/privacy1st/${_reponame}"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
depends=('screen' 'holo' 'git')
|
depends=('screen' 'holo' 'git' 'base')
|
||||||
makedepends=('git')
|
makedepends=('git')
|
||||||
install='.install'
|
install='.install'
|
||||||
source=("git+${url}.git")
|
source=("git+${url}.git")
|
||||||
|
@ -14,7 +14,7 @@ depends=('sddm' 'sddm-nordic-theme-git')
|
|||||||
# Main.qml:28:1: module "org.kde.plasma.extras" is not installed
|
# Main.qml:28:1: module "org.kde.plasma.extras" is not installed
|
||||||
depends+=('plasma-framework')
|
depends+=('plasma-framework')
|
||||||
# See TODO below
|
# See TODO below
|
||||||
depends+=('holo' 'git')
|
depends+=('holo' 'git' 'base')
|
||||||
|
|
||||||
makedepends=('git')
|
makedepends=('git')
|
||||||
install='.install'
|
install='.install'
|
||||||
|
@ -9,7 +9,7 @@ arch=('any')
|
|||||||
url="https://codeberg.org/privacy1st/${_reponame}"
|
url="https://codeberg.org/privacy1st/${_reponame}"
|
||||||
license=('MIT')
|
license=('MIT')
|
||||||
groups=()
|
groups=()
|
||||||
depends=('ccid' 'opensc' 'systemd' 'holo' 'git' 'de-p1st-gnupg')
|
depends=('ccid' 'opensc' 'systemd' 'holo' 'git' 'base' 'de-p1st-gnupg')
|
||||||
makedepends=('git')
|
makedepends=('git')
|
||||||
install='.install'
|
install='.install'
|
||||||
source=("git+${url}.git")
|
source=("git+${url}.git")
|
||||||
|
17
pkg/de-p1st-ssh/.install
Normal file
17
pkg/de-p1st-ssh/.install
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
## arg 1: the new package version
|
||||||
|
post_install() {
|
||||||
|
holo apply
|
||||||
|
systemctl preset-all
|
||||||
|
}
|
||||||
|
|
||||||
|
## arg 1: the new package version
|
||||||
|
## arg 2: the old package version
|
||||||
|
post_upgrade() {
|
||||||
|
holo apply
|
||||||
|
systemctl preset-all
|
||||||
|
}
|
||||||
|
|
||||||
|
## arg 1: the old package version
|
||||||
|
post_remove() {
|
||||||
|
holo apply
|
||||||
|
}
|
22
pkg/de-p1st-ssh/PKGBUILD
Normal file
22
pkg/de-p1st-ssh/PKGBUILD
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Maintainer: Daniel Langbein <daniel@systemli.org>
|
||||||
|
_pkgname=ssh
|
||||||
|
_reponame=arch
|
||||||
|
pkgname="de-p1st-$_pkgname"
|
||||||
|
pkgver=0.0.1
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="ssh with configuration"
|
||||||
|
arch=('any')
|
||||||
|
url="https://codeberg.org/privacy1st/${_reponame}"
|
||||||
|
license=('MIT')
|
||||||
|
depends=('openssh' 'systemd')
|
||||||
|
depends+=('holo' 'git' 'base') # holo and its dependencies: git for holo-diff; without base "holo apply" may fail on initial system installation
|
||||||
|
makedepends=('git')
|
||||||
|
install='.install'
|
||||||
|
source=("git+${url}.git")
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "${_reponame}/pkg/${pkgname}"
|
||||||
|
|
||||||
|
install -Dm0644 systemd.preset "$pkgdir"/usr/lib/systemd/system-preset/20-"$pkgname".preset
|
||||||
|
}
|
23
pkg/de-p1st-ssh/sshd_config.holoscript
Normal file
23
pkg/de-p1st-ssh/sshd_config.holoscript
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# stdin: default config
|
||||||
|
# stdout: modified config
|
||||||
|
|
||||||
|
# save stdin (content of /etc/ssh/sshd_config) in variable
|
||||||
|
stdin=$(cat)
|
||||||
|
|
||||||
|
# asertions
|
||||||
|
echo "$stdin" | grep '^UsePAM yes$'
|
||||||
|
#
|
||||||
|
echo "$stdin" | grep '^#PermitRootLogin\s.*$'
|
||||||
|
echo "$stdin" | grep '^#PubkeyAuthentication\s.*$'
|
||||||
|
echo "$stdin" | grep '^#PasswordAuthentication\s.*$'
|
||||||
|
echo "$stdin" | grep '^#PermitEmptyPasswords\s.*$'
|
||||||
|
echo "$stdin" | grep '^#X11Forwarding\s.*$'
|
||||||
|
|
||||||
|
sed '
|
||||||
|
s|^#PermitRootLogin\s.*$|PermitRootLogin no|;
|
||||||
|
s|^#PubkeyAuthentication\s.*$|PubkeyAuthentication yes|;
|
||||||
|
s|^#PasswordAuthentication\s.*$|PasswordAuthentication no|;
|
||||||
|
s|^#PermitEmptyPasswords\s.*$|PermitEmptyPasswords no|;
|
||||||
|
s|^#X11Forwarding\s.*$|X11Forwarding no|
|
||||||
|
' <<< "$stdin"
|
1
pkg/de-p1st-ssh/systemd.preset
Normal file
1
pkg/de-p1st-ssh/systemd.preset
Normal file
@ -0,0 +1 @@
|
|||||||
|
enable sshd.service
|
@ -10,7 +10,8 @@ url="https://codeberg.org/privacy1st/${_reponame}"
|
|||||||
license=('MIT')
|
license=('MIT')
|
||||||
groups=()
|
groups=()
|
||||||
depends=()
|
depends=()
|
||||||
makedepends=('git')
|
depends+=('holo' 'git' 'base') # holo and its dependencies: git for holo-diff; without base "holo apply" may fail on initial system installation
|
||||||
|
makedepends=('git') # to fetch source(s) via git
|
||||||
optdepends=()
|
optdepends=()
|
||||||
provides=()
|
provides=()
|
||||||
conflicts=()
|
conflicts=()
|
||||||
|
Loading…
Reference in New Issue
Block a user