add de-p1st-locale; use LUKS2

This commit is contained in:
Daniel Langbein 2021-05-02 17:19:20 +02:00
parent e2da4a1138
commit 9076b33aac
6 changed files with 107 additions and 1 deletions

View File

@ -121,8 +121,11 @@ function format() {
echo "Formatting boot partition ${BOOT_PART} ..." echo "Formatting boot partition ${BOOT_PART} ..."
mkfs.fat -F32 "${BOOT_PART}" || return $? mkfs.fat -F32 "${BOOT_PART}" || return $?
# Note:
# FDE: GRUB does support LUKS2 since this commit: https://git.savannah.gnu.org/cgit/grub.git/commit/?id=365e0cc3e7e44151c14dd29514c2f870b49f9755
# -> Using "--type luks1" is no longer required.
echo "Creating encrypted luks partition ${LUKS_PART} ..." echo "Creating encrypted luks partition ${LUKS_PART} ..."
printf "%s" "${LUKS_PWD}" | cryptsetup luksFormat --type luks1 \ printf "%s" "${LUKS_PWD}" | cryptsetup luksFormat \
--cipher aes-xts-plain64 --key-size 512 --hash sha512 \ --cipher aes-xts-plain64 --key-size 512 --hash sha512 \
--iter-time 10000 --use-random "${LUKS_PART}" || return $? --iter-time 10000 --use-random "${LUKS_PART}" || return $?

View File

@ -0,0 +1,13 @@
post_install() {
holo apply
locale-gen
}
post_upgrade() {
holo apply
locale-gen
}
post_remove() {
holo apply
}

View File

@ -0,0 +1,33 @@
# Maintainer: Daniel Langbein <daniel@systemli.org>
_pkgname=locale
_reponame=arch
pkgname="de-p1st-$_pkgname"
pkgver=0.0.1
pkgrel=1
pkgdesc="locale and timezone"
arch=('any')
url="https://codeberg.org/privacy1st/${_reponame}"
license=('MIT')
groups=()
depends=('holo')
makedepends=('git')
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install='.install'
changelog=
source=("git+${url}.git")
noextract=()
sha256sums=('SKIP')
package() {
cd "${_reponame}/pkg/${pkgname}"
install -Dm0644 locale.conf "$pkgdir"/etc/locale.conf
install -Dm0544 locale.gen.holoscript "$pkgdir"/usr/share/holo/files/"$pkgname"/etc/locale.gen.holoscript
ln -sf /usr/share/zoneinfo/Europe/Berlin "$pkgdir"/etc/localtime
}

View File

@ -0,0 +1,21 @@
# locale
## locale.conf
* Archwiki: [Locale](https://wiki.archlinux.org/index.php/Locale)
* -> run `locale -a` to list enabled locales and check for error messages such as `locale: Cannot set LC_CTYPE to default locale: No such file or directory`
* (German) Archwiki: [complete locale.conf example](https://wiki.archlinux.de/title/Locale.conf)
## locale.gen
1) Edit `/etc/locale.gen`
2) Run `locale-gen`
From Archwiki: [locale#Generating_locales](https://wiki.archlinux.org/title/locale#Generating_locales)
> locale-gen also runs with every update of glibc. [1](https://github.com/archlinux/svntogit-packages/blob/packages/glibc/trunk/glibc.install#L2)
## timezone
Archwiki: [Installation_guide#Time_zone](https://wiki.archlinux.org/index.php/Installation_guide#Time_zone)

View File

@ -0,0 +1,27 @@
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_COLLATE=C
LC_TIME=de_DE.UTF-8
LC_MONETARY=de_DE.UTF-8
# LC_NUMERIC: Formatting rules for non monetary numeric values.
LC_NUMERIC=de_DE.UTF-8
# LC_CTYPE: This category determines the interpretation of byte
# sequences as characters (e.g., single versus multibyte
# characters), character classifications (e.g., alphabetic
# or digit), and the behavior of character classes.
LC_CTYPE=de_DE.UTF-8
# LC_MESSAGES: This category affects the language in which messages are
# displayed
# Note: This affects the language used by many programs (XFCE4, xournal++, etc.)
LC_MESSAGES=en_US.UTF-8
LC_PAPER=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
# LC_NAME: Change settings that describe the formats used to address persons.
LC_NAME=de_DE.UTF-8
# LC_ADDRESS: Change settings that describe the formats (e.g., postal
# addresses) used to describe locations and geography-
# related items.
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=

View File

@ -0,0 +1,9 @@
#!/bin/sh
# stdin: default config
# stdout: modified config
echo 'de_DE.UTF-8 UTF-8
# de_DE ISO-8859-1
# de_DE@euro ISO-8859-15
en_US.UTF-8 UTF-8
# en_US ISO-8859-1'