summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/kbd/APKBUILD32
-rw-r--r--system/kbd/consolefont.confd20
-rw-r--r--system/kbd/consolefont.initd70
-rw-r--r--system/kbd/keymaps.confd24
-rw-r--r--system/kbd/keymaps.initd77
-rw-r--r--system/openrc/0007-make-consolefont-service-compatible-with-busyboxs-se.patch70
-rw-r--r--system/openrc/APKBUILD11
7 files changed, 224 insertions, 80 deletions
diff --git a/system/kbd/APKBUILD b/system/kbd/APKBUILD
index d54e7f29c..deb7fb205 100644
--- a/system/kbd/APKBUILD
+++ b/system/kbd/APKBUILD
@@ -2,9 +2,9 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=kbd
pkgver=2.2.0_git20190823
-pkgrel=0
+pkgrel=1
pkgdesc="Console keyboard and font management utilities"
-url=" "
+url="https://kbd-project.org/"
arch="all"
options="!check" # padding error on at least ppc64
license="GPL-2.0+"
@@ -12,8 +12,13 @@ depends=""
checkdepends="check-dev"
makedepends="linux-headers linux-pam-dev autoconf automake libtool"
subpackages="$pkgname-doc $pkgname-fonts::noarch $pkgname-keymaps::noarch
- $pkgname-lang"
-source="https://dev.sick.bike/dist/$pkgname-$pkgver.tar.xz"
+ $pkgname-lang $pkgname-openrc"
+source="https://dev.sick.bike/dist/$pkgname-$pkgver.tar.xz
+ consolefont.confd
+ consolefont.initd
+ keymaps.confd
+ keymaps.initd
+ "
prepare() {
default_prepare
@@ -37,6 +42,19 @@ check() {
package() {
make DESTDIR="$pkgdir" install
+
+ for i in consolefont keymaps; do
+ install -Dm644 "$srcdir"/$i.confd \
+ "$pkgdir"/etc/conf.d/$i
+ install -Dm755 "$srcdir"/$i.initd \
+ "$pkgdir"/etc/init.d/$i
+ done
+}
+
+openrc() {
+ default_openrc
+ license="BSD-2-Clause"
+ replaces="openrc<0.24.1-r10"
}
fonts() {
@@ -52,4 +70,8 @@ keymaps() {
mv "$pkgdir"/usr/share/unimaps "$subpkgdir"/usr/share/
}
-sha512sums="7f6202aeb17d6224095447a92d999478220457e1e7cadb90a7c40ca7f3b0c5b1f672db1995fb69652ca37558a75df582bfb5fea5772f3b1e040fe39f8f54504e kbd-2.2.0_git20190823.tar.xz"
+sha512sums="7f6202aeb17d6224095447a92d999478220457e1e7cadb90a7c40ca7f3b0c5b1f672db1995fb69652ca37558a75df582bfb5fea5772f3b1e040fe39f8f54504e kbd-2.2.0_git20190823.tar.xz
+19761fdd2b32c1bbcc9254b89b7893741e144b917a75410af3f274553fe61e2f56cbbd17ff77ac929e9377604663cbbfd9e53c73e7d41e71de6de573730950c7 consolefont.confd
+1e67f75f27ec5de8f71489c83f78e53e8fd0925ae2d82dabf516f98905c5aff206a8e943e92b6af413eae5f0ecb9c2240526dfc3c56811a8dc1d19ced561bba3 consolefont.initd
+af7d37fc6be1382414ca8245ca6f8d2ee8b82650b8a08eebbd980cf6dd2b92524fce2851ce0b2cd67e915488c12044ab50c5ab1f01c3072af87eed3e058ac268 keymaps.confd
+510d7eb582a914fa7cfb868d0c3d55a21ee1519033117d0943a153528b5810d09f6421ddc02d93906c1a66fb7e07e86240f38dad0d38cfb5a8c7e9a6335a937f keymaps.initd"
diff --git a/system/kbd/consolefont.confd b/system/kbd/consolefont.confd
new file mode 100644
index 000000000..4c41d0633
--- /dev/null
+++ b/system/kbd/consolefont.confd
@@ -0,0 +1,20 @@
+# The consolefont service is not activated by default. If you need to
+# use it, you should run "rc-update add consolefont boot" as root.
+#
+# consolefont specifies the default font that you'd like Linux to use on the
+# console. You will have to install a package such as kbd-fonts or
+# terminus-font to have a selection; they will be installed in
+# /usr/share/consolefonts.
+#
+# The following (from terminus-font) is a good font for HiDPI screens.
+#consolefont="ter-i32n"
+
+# consoletranslation is the charset map file to use. Leave commented to use
+# the default one. Have a look in /usr/share/consoletrans for a selection of
+# map files you can use.
+#consoletranslation="8859-1_to_uni"
+
+# unicodemap is the unicode map file to use. Leave commented to use the
+# default one. Have a look in /usr/share/unimaps (from the kbd-keymaps
+# package) for a selection of map files you can use.
+#unicodemap="iso01"
diff --git a/system/kbd/consolefont.initd b/system/kbd/consolefont.initd
new file mode 100644
index 000000000..63d8601c5
--- /dev/null
+++ b/system/kbd/consolefont.initd
@@ -0,0 +1,70 @@
+#!/sbin/openrc-run
+# Copyright (c) 2007-2015 The OpenRC Authors.
+# See the Authors file at the top-level directory of this distribution and
+# https://github.com/OpenRC/openrc/blob/master/AUTHORS
+#
+# This file is part of OpenRC. It is subject to the license terms in
+# the LICENSE file found in the top-level directory of this
+# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
+# This file may not be copied, modified, propagated, or distributed
+# except according to the terms contained in the LICENSE file.
+
+description="Sets a font for the consoles."
+
+depend()
+{
+ need localmount termencoding
+ after hotplug bootmisc modules
+ keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
+}
+
+start()
+{
+ ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
+ consolefont=${consolefont:-${CONSOLEFONT}}
+ unicodemap=${unicodemap:-${UNICODEMAP}}
+ consoletranslation=${consoletranslation:-${CONSOLETRANSLATION}}
+
+ if [ -z "$consolefont" ]; then
+ ebegin "Using the default console font"
+ eend 0
+ return 0
+ fi
+
+ if [ "$ttyn" = 0 ]; then
+ ebegin "Skipping font setup (rc_tty_number == 0)"
+ eend 0
+ return 0
+ fi
+
+ local x= param= sf_param= retval=0 ttydev=/dev/tty
+
+ # Get additional parameters
+ if [ -n "$consoletranslation" ]; then
+ param="$param -m $consoletranslation"
+ fi
+ if [ -n "${unicodemap}" ]; then
+ param="$param -u $unicodemap"
+ fi
+
+ # Set the console font
+ ebegin "Setting console font [$consolefont]"
+ [ -d /dev/vc ] && ttydev=/dev/vc/
+ x=1
+ while [ $x -le $ttyn ]; do
+ if ! setfont $consolefont $param -C $ttydev$x >/dev/null; then
+ retval=1
+ break
+ fi
+ : $(( x += 1 ))
+ done
+ eend $retval
+
+ # Store the font so we can use it ASAP on boot
+ if [ $retval -eq 0 ] && checkpath -W "$RC_LIBEXECDIR"; then
+ mkdir -p "$RC_LIBEXECDIR"/console
+ setfont -O "$RC_LIBEXECDIR"/console/font
+ fi
+
+ return $retval
+}
diff --git a/system/kbd/keymaps.confd b/system/kbd/keymaps.confd
new file mode 100644
index 000000000..9a2863413
--- /dev/null
+++ b/system/kbd/keymaps.confd
@@ -0,0 +1,24 @@
+# Use keymap to specify the default console keymap. There is a complete tree
+# of keymaps in /usr/share/keymaps to choose from (from the kbd-keymaps
+# package).
+keymap="us"
+
+# Should we first load the 'windowkeys' console keymap? Most x86 users will
+# say "yes" here. Note that non-x86 users should leave it as "no".
+# Loading this keymap will enable VT switching (like ALT+Left/Right)
+# using the special windows keys on the linux console.
+windowkeys="NO"
+
+# The maps to load for extended keyboards. Most users will leave this as is.
+extended_keymaps=""
+#extended_keymaps="backspace keypad euro2"
+
+# Tell dumpkeys(1) to interpret character action codes to be
+# from the specified character set.
+# This only matters if you set unicode="yes" in /etc/rc.conf.
+# For a list of valid sets, run `dumpkeys --help`
+dumpkeys_charset=""
+
+# Some fonts map AltGr-E to the currency symbol instead of the Euro.
+# To fix this, set to "yes"
+fix_euro="NO"
diff --git a/system/kbd/keymaps.initd b/system/kbd/keymaps.initd
new file mode 100644
index 000000000..49e41b0e7
--- /dev/null
+++ b/system/kbd/keymaps.initd
@@ -0,0 +1,77 @@
+#!/sbin/openrc-run
+# Copyright (c) 2007-2015 The OpenRC Authors.
+# See the Authors file at the top-level directory of this distribution and
+# https://github.com/OpenRC/openrc/blob/master/AUTHORS
+#
+# This file is part of OpenRC. It is subject to the license terms in
+# the LICENSE file found in the top-level directory of this
+# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
+# This file may not be copied, modified, propagated, or distributed
+# except according to the terms contained in the LICENSE file.
+
+description="Applies a keymap for the consoles."
+
+depend()
+{
+ need localmount termencoding
+ after bootmisc
+ keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
+}
+
+start()
+{
+ ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
+ : ${unicode:=$UNICODE}
+ : ${keymap:=$KEYMAP}
+ : ${extended_keymaps:=$EXTENDED_KEYMAPS}
+ : ${windowkeys:=$SET_WINDOWSKEYS}
+ : ${fix_euro:=$FIX_EURO}
+ : ${dumpkeys_charset:=${DUMPKEYS_CHARSET}}
+
+ if [ -z "$keymap" ]; then
+ eerror "You need to setup keymap in /etc/conf.d/keymaps first"
+ return 1
+ fi
+
+ local ttydev=/dev/tty n=
+ [ -d /dev/vc ] && ttydev=/dev/vc/
+
+ # Force linux keycodes for PPC.
+ if [ -f /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes ]; then
+ echo 1 > /proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes
+ fi
+
+ local wkeys= kmode="-a" msg="ASCII"
+ if yesno $unicode; then
+ kmode="-u"
+ msg="UTF-8"
+ fi
+ yesno $windowkeys && wkeys="windowkeys"
+
+ # Set terminal encoding to either ASCII or UNICODE.
+ # See utf-8(7) for more information.
+ ebegin "Setting keyboard mode [$msg]"
+ n=1
+ while [ $n -le $ttyn ]; do
+ kbd_mode $kmode -C $ttydev$n
+ : $(( n += 1 ))
+ done
+ eend 0
+
+ ebegin "Loading key mappings [$keymap]"
+ loadkeys -q $wkeys $keymap $extended_keymaps
+ eend $? "Error loading key mappings" || return $?
+
+ if yesno $fix_euro; then
+ ebegin "Fixing font for euro symbol"
+ # Fix some fonts displaying the Euro, #173528.
+ echo "altgr keycode 18 = U+20AC" | loadkeys -q -
+ eend $?
+ fi
+
+ # Save the keymapping for use immediately at boot
+ if checkpath -W "$RC_LIBEXECDIR"; then
+ mkdir -p "$RC_LIBEXECDIR"/console
+ dumpkeys >"$RC_LIBEXECDIR"/console/keymap
+ fi
+}
diff --git a/system/openrc/0007-make-consolefont-service-compatible-with-busyboxs-se.patch b/system/openrc/0007-make-consolefont-service-compatible-with-busyboxs-se.patch
deleted file mode 100644
index 6c23e2ab0..000000000
--- a/system/openrc/0007-make-consolefont-service-compatible-with-busyboxs-se.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 3d0d2b89745597ea973129eafa3f999cf19d761f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
-Date: Wed, 17 Aug 2016 17:52:58 +0200
-Subject: [PATCH 7/7] make consolefont service compatible with busyboxs setfont
- applet
-
-Compared to kdbs setfont program it doesn't support -O and -m.
----
- conf.d/consolefont | 11 ++---------
- init.d/consolefont.in | 7 ++-----
- 2 files changed, 4 insertions(+), 14 deletions(-)
-
-diff --git a/conf.d/consolefont b/conf.d/consolefont
-index e01ae842..75544b2f 100644
---- a/conf.d/consolefont
-+++ b/conf.d/consolefont
-@@ -3,16 +3,9 @@
- #
- # consolefont specifies the default font that you'd like Linux to use on the
- # console. You can find a good selection of fonts in /usr/share/consolefonts;
--# you shouldn't specify the trailing ".psf.gz", just the font name below.
--# To use the default console font, comment out the CONSOLEFONT setting below.
--consolefont="default8x16"
-+consolefont="default8x16.psf.gz"
-
- # consoletranslation is the charset map file to use. Leave commented to use
- # the default one. Have a look in /usr/share/consoletrans for a selection of
- # map files you can use.
--#consoletranslation="8859-1_to_uni"
--
--# unicodemap is the unicode map file to use. Leave commented to use the
--# default one. Have a look in /usr/share/unimaps for a selection of map files
--# you can use.
--#unicodemap="iso01"
-+#consoletranslation="8859-1_to_uni.trans"
-diff --git a/init.d/consolefont.in b/init.d/consolefont.in
-index 9fe95afa..173ed426 100644
---- a/init.d/consolefont.in
-+++ b/init.d/consolefont.in
-@@ -22,7 +22,6 @@ start()
- {
- ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
- consolefont=${consolefont:-${CONSOLEFONT}}
-- unicodemap=${unicodemap:-${UNICODEMAP}}
- consoletranslation=${consoletranslation:-${CONSOLETRANSLATION}}
-
- if [ -z "$consolefont" ]; then
-@@ -43,9 +42,6 @@ start()
- if [ -n "$consoletranslation" ]; then
- param="$param -m $consoletranslation"
- fi
-- if [ -n "${unicodemap}" ]; then
-- param="$param -u $unicodemap"
-- fi
-
- # Set the console font
- ebegin "Setting console font [$consolefont]"
-@@ -63,7 +59,8 @@ start()
- # Store the font so we can use it ASAP on boot
- if [ $retval -eq 0 ] && checkpath -W "$RC_LIBEXECDIR"; then
- mkdir -p "$RC_LIBEXECDIR"/console
-- setfont -O "$RC_LIBEXECDIR"/console/font
-+ zcat "/usr/share/consolefonts/$consolefont" \
-+ > "$RC_LIBEXECDIR"/console/font
- fi
-
- return $retval
---
-2.11.0
-
diff --git a/system/openrc/APKBUILD b/system/openrc/APKBUILD
index ac9d8b184..c2cb32220 100644
--- a/system/openrc/APKBUILD
+++ b/system/openrc/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer:
pkgname=openrc
pkgver=0.24.1
-pkgrel=9
+pkgrel=10
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="https://github.com/OpenRC/openrc"
arch="all"
@@ -19,7 +19,6 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgve
0004-hide-error-when-migrating-var-run-to-run.patch
0005-rc-pull-in-sysinit-and-boot-as-stacked-levels-when-n.patch
0006-mount-efivars-read-only.patch
- 0007-make-consolefont-service-compatible-with-busyboxs-se.patch
openrc-configuration.patch
@@ -69,8 +68,11 @@ package() {
rm "$pkgdir"/etc/conf.d/network
rm "$pkgdir"/etc/init.d/network
- # we use console-setup for keymaps
- rm "$pkgdir"/etc/init.d/keymaps
+ # we ship these in system/kbd
+ for i in consolefont keymaps; do
+ rm "$pkgdir"/etc/conf.d/$i
+ rm "$pkgdir"/etc/init.d/$i
+ done
# we use gettys-openrc for TTY
rm "$pkgdir"/etc/init.d/agetty
@@ -86,7 +88,6 @@ aedf77f9159fefb4bd5f30a29a33b6aedbc986c9a0f993aa928cc79fbe24aac76bd9e5974dcce52e
d54630d40a2d6b10a325cb012d4efcda997a60c008ca953ce5d60059d3f267308a59dabddf93a5fc0d301aa91967137d144effbe5f574394af768ce4ebc48738 0004-hide-error-when-migrating-var-run-to-run.patch
39a35c54ec9112fe84c901ed155a711cec8e194af02d5483ee60b80743dab12391e6fdc7b3da2f86844dd4edcf53e681ff95bd4d6fa1101a89ce54dce2ddbb7c 0005-rc-pull-in-sysinit-and-boot-as-stacked-levels-when-n.patch
7221dd2daccd8844f6f9481b7b5921abc2711c8abd1a4bb72f04db8fd8e734b817f5d0d571daea0e2e05d3bc687f75ee1d8025249996bdee0b3328e18d9da7d3 0006-mount-efivars-read-only.patch
-234c4f3cf39df3350dbea25c00b8d584794b28194f44c726767a6a16d91a26fee1b5d2dd16635f19803fc015b4e9d99c52b23128e6b815938b88365feba8cf59 0007-make-consolefont-service-compatible-with-busyboxs-se.patch
2dde266f3176456724e4b0c40476e7061e31986b67744b4a53c71ba0d3896860b4569e3af2ea4777a9d8fe3b6282ff869666570f1daa86cdc410c0e09805c990 openrc-configuration.patch
12bb6354e808fbf47bbab963de55ee7901738b4a912659982c57ef2777fff9a670e867fcb8ec316a76b151032c92dc89a950d7d1d835ef53f753a8f3b41d2cec openrc.logrotate
99b542c0903ad6874b8c308b2e0660a4fe2ff9db962dfec65325cd12c368873a2ae800d5e6d42dc4deff775e1d5c0068869eb72581f7ab16e88d5738afe1d3dd hostname.initd