OpenRC: merge some local changes.
* Move all patches to xbps-changes.diff. * Provide /etc/conf.d/locale and set "en_US" by default. * Move rc.conf to /etc/default/rc.conf. Set unicode, rc_shell and rc_logger by default. * Explain in keymaps that keyboard layout must also be specified, like "qwerty/es"; otherwise lodkeys will fail to use the correct keymap if there exists duplicate keymaps with the same name. Bump revision. --HG-- extra : convert_revision : 0b99d27c67cb0d7d055e769bb9a0c6b640adfe87
This commit is contained in:
parent
ddf15ba5fd
commit
6af47b83fb
8 changed files with 157 additions and 57 deletions
|
@ -1,14 +0,0 @@
|
||||||
http://roy.marples.name/projects/openrc/ticket/177
|
|
||||||
|
|
||||||
--- src/rc/rc.c.orig 2009-06-20 08:14:19.018885584 +0200
|
|
||||||
+++ src/rc/rc.c 2009-06-20 08:13:52.000000000 +0200
|
|
||||||
@@ -45,6 +45,9 @@ const char rc_copyright[] = "Copyright (
|
|
||||||
|
|
||||||
#ifdef __linux__
|
|
||||||
# include <asm/setup.h> /* for COMMAND_LINE_SIZE */
|
|
||||||
+# ifndef COMMAND_LINE_SIZE
|
|
||||||
+# define COMMAND_LINE_SIZE 2048
|
|
||||||
+# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
9
templates/OpenRC/files/locale.confd
Normal file
9
templates/OpenRC/files/locale.confd
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#
|
||||||
|
# Sets the system locale in /etc/profile.d/locale.sh
|
||||||
|
# through the environmental variable LANG.
|
||||||
|
#
|
||||||
|
# Please note that the init.d script by default will use the UTF8
|
||||||
|
# variant for the selected locale, so be aware that non-UTF8 locales
|
||||||
|
# won't be supported without modifications to the init.d script.
|
||||||
|
#
|
||||||
|
system_locale="en_US"
|
|
@ -1,5 +1,6 @@
|
||||||
#!/sbin/runscript
|
#!/sbin/runscript
|
||||||
|
|
||||||
|
: ${system_locale:=en_US}
|
||||||
description="Sets a system locale"
|
description="Sets a system locale"
|
||||||
|
|
||||||
depend()
|
depend()
|
||||||
|
@ -13,16 +14,15 @@ start()
|
||||||
{
|
{
|
||||||
: >/etc/profile.d/locale.sh
|
: >/etc/profile.d/locale.sh
|
||||||
chmod 755 /etc/profile.d/locale.sh
|
chmod 755 /etc/profile.d/locale.sh
|
||||||
[ -z "$LOCALE" ] && LOCALE="en_US"
|
|
||||||
|
|
||||||
# Check if requested locale was already created
|
# Check if requested locale was already created
|
||||||
if ! $(locale -a|grep -q $LOCALE.utf8); then
|
if ! $(locale -a|grep -q "${system_locale}.utf8"); then
|
||||||
[ ! -d /usr/lib/locale ] && mkdir -p /usr/lib/locale
|
[ ! -d /usr/lib/locale ] && mkdir -p /usr/lib/locale
|
||||||
ebegin "Building locale [$LOCALE] [UTF-8]"
|
ebegin "Building locale [${system_locale}] [UTF-8]"
|
||||||
localedef -i $LOCALE -f UTF-8 $LOCALE
|
localedef -i ${system_locale} -f UTF-8 ${system_locale}
|
||||||
eend $?
|
eend $?
|
||||||
fi
|
fi
|
||||||
# Set user defined locale
|
# Set user defined locale
|
||||||
einfo "Setting system locale [$LOCALE] [UTF-8]"
|
einfo "Setting system locale [${system_locale}] [UTF-8]"
|
||||||
echo "export LANG=$LOCALE.UTF-8" >> /etc/profile.d/locale.sh
|
echo "export LANG=${system_locale}.UTF-8" >> /etc/profile.d/locale.sh
|
||||||
}
|
}
|
||||||
|
|
14
templates/OpenRC/files/rc.conf
Normal file
14
templates/OpenRC/files/rc.conf
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#
|
||||||
|
# Global OpenRC default configuration. Please note that defaults
|
||||||
|
# are set in /etc/default/rc.conf.
|
||||||
|
#
|
||||||
|
# Use this file to customize the system startup process.
|
||||||
|
#
|
||||||
|
if [ -r /etc/default/rc.conf ]; then
|
||||||
|
. /etc/default/rc.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Add your settings after this line, default settings will be
|
||||||
|
# overriden and defaults always will be preserved.
|
||||||
|
#
|
|
@ -1,11 +0,0 @@
|
||||||
--- support/sysvinit/inittab.orig 2009-05-07 12:03:07.533948107 +0000
|
|
||||||
+++ support/sysvinit/inittab 2009-05-07 12:04:45.178070711 +0000
|
|
||||||
@@ -18,7 +18,7 @@ l3:3:wait:/sbin/rc default
|
|
||||||
l4:4:wait:/sbin/rc default
|
|
||||||
l5:5:wait:/sbin/rc default
|
|
||||||
l6:6:wait:/sbin/rc reboot
|
|
||||||
-l6r:6:wait:/sbin/reboot -dk
|
|
||||||
+l6r:6:wait:/sbin/reboot -dfi
|
|
||||||
#z6:6:respawn:/sbin/sulogin
|
|
||||||
|
|
||||||
# new-style single-user
|
|
|
@ -1,9 +1,9 @@
|
||||||
# Template file for 'OpenRC'
|
# Template file for 'OpenRC'
|
||||||
pkgname=OpenRC
|
pkgname=OpenRC
|
||||||
version=0.5.0
|
version=0.5.0
|
||||||
revision=3
|
revision=4
|
||||||
wrksrc=openrc-${version}
|
wrksrc=openrc-${version}
|
||||||
patch_files="xbps-locale-service.diff"
|
patch_files="xbps-changes.diff"
|
||||||
distfiles="http://roy.marples.name/downloads/openrc/openrc-$version.tar.bz2"
|
distfiles="http://roy.marples.name/downloads/openrc/openrc-$version.tar.bz2"
|
||||||
build_style=gnu_makefile
|
build_style=gnu_makefile
|
||||||
short_desc="Universal init system"
|
short_desc="Universal init system"
|
||||||
|
@ -19,9 +19,9 @@ long_desc="
|
||||||
|
|
||||||
conf_files="/etc/rc.conf /etc/conf.d/bootmisc /etc/conf.d/consolefont
|
conf_files="/etc/rc.conf /etc/conf.d/bootmisc /etc/conf.d/consolefont
|
||||||
/etc/conf.d/dmesg /etc/conf.d/fsck /etc/conf.d/hostname /etc/conf.d/hwclock
|
/etc/conf.d/dmesg /etc/conf.d/fsck /etc/conf.d/hostname /etc/conf.d/hwclock
|
||||||
/etc/conf.d/keymaps /etc/conf.d/local /etc/conf.d/localmount
|
/etc/conf.d/keymaps /etc/conf.d/local /etc/conf.d/locale
|
||||||
/etc/conf.d/modules /etc/conf.d/network /etc/conf.d/urandom
|
/etc/conf.d/localmount /etc/conf.d/modules /etc/conf.d/network
|
||||||
/etc/inittab"
|
/etc/conf.d/urandom /etc/inittab"
|
||||||
|
|
||||||
Add_dependency full glibc
|
Add_dependency full glibc
|
||||||
Add_dependency full psmisc
|
Add_dependency full psmisc
|
||||||
|
@ -44,4 +44,9 @@ post_install()
|
||||||
${DESTDIR}/etc/inittab
|
${DESTDIR}/etc/inittab
|
||||||
install -D -m644 ${FILESDIR}/$pkgname.logrotate \
|
install -D -m644 ${FILESDIR}/$pkgname.logrotate \
|
||||||
${DESTDIR}/etc/logrotate.d/OpenRC
|
${DESTDIR}/etc/logrotate.d/OpenRC
|
||||||
|
install -D -m644 ${FILESDIR}/locale.confd \
|
||||||
|
${DESTDIR}/etc/conf.d/locale
|
||||||
|
install -d ${DESTDIR}/etc/default
|
||||||
|
mv ${DESTDIR}/etc/rc.conf ${DESTDIR}/etc/default
|
||||||
|
install -m 644 ${FILESDIR}/rc.conf ${DESTDIR}/etc
|
||||||
}
|
}
|
||||||
|
|
118
templates/OpenRC/xbps-changes.diff
Normal file
118
templates/OpenRC/xbps-changes.diff
Normal file
|
@ -0,0 +1,118 @@
|
||||||
|
xbps changes:
|
||||||
|
|
||||||
|
* Installs a "locale" service into the "boot" runlevel to set
|
||||||
|
a global system locale.
|
||||||
|
* Adds consolefont by default in "boot" runlevel.
|
||||||
|
* Modified inittab to pass correct parameters to reboot(8).
|
||||||
|
* Build fix for kernel>=2.6.30
|
||||||
|
* Sets unicode, rc_logger and rc_shell in /etc/rc.conf by default.
|
||||||
|
* Sets windowkeys and fix_euro in /etc/conf.d/keymaps by default.
|
||||||
|
|
||||||
|
--- runlevels/Makefile.Linux.orig 2009-05-07 15:48:37.075825332 +0000
|
||||||
|
+++ runlevels/Makefile.Linux 2009-05-07 15:48:52.008557039 +0000
|
||||||
|
@@ -1,3 +1,3 @@
|
||||||
|
SYSINIT+= devfs dmesg
|
||||||
|
-BOOT+= hwclock keymaps modules mtab procfs termencoding
|
||||||
|
+BOOT+= consolefont hwclock keymaps modules mtab procfs termencoding locale
|
||||||
|
SHUTDOWN+= killprocs mount-ro
|
||||||
|
--- init.d/Makefile.Linux.orig 2009-05-07 15:55:26.156910483 +0000
|
||||||
|
+++ init.d/Makefile.Linux 2009-05-07 15:55:35.682853819 +0000
|
||||||
|
@@ -2,7 +2,7 @@ NET_LO= net.lo
|
||||||
|
|
||||||
|
SRCS+= devfs.in dmesg.in hwclock.in consolefont.in keymaps.in killprocs.in \
|
||||||
|
modules.in mount-ro.in mtab.in numlock.in procfs.in sysfs.in \
|
||||||
|
- termencoding.in
|
||||||
|
+ termencoding.in locale.in
|
||||||
|
|
||||||
|
.SUFFIXES: .Linux.in
|
||||||
|
|
||||||
|
--- support/sysvinit/inittab.orig 2009-05-07 12:03:07.533948107 +0000
|
||||||
|
+++ support/sysvinit/inittab 2009-05-07 12:04:45.178070711 +0000
|
||||||
|
@@ -18,7 +18,7 @@ l3:3:wait:/sbin/rc default
|
||||||
|
l4:4:wait:/sbin/rc default
|
||||||
|
l5:5:wait:/sbin/rc default
|
||||||
|
l6:6:wait:/sbin/rc reboot
|
||||||
|
-l6r:6:wait:/sbin/reboot -dk
|
||||||
|
+l6r:6:wait:/sbin/reboot -dfi
|
||||||
|
#z6:6:respawn:/sbin/sulogin
|
||||||
|
|
||||||
|
# new-style single-user
|
||||||
|
.Linux.in:
|
||||||
|
--- src/rc/rc.c.orig 2009-06-20 08:14:19.018885584 +0200
|
||||||
|
+++ src/rc/rc.c 2009-06-20 08:13:52.000000000 +0200
|
||||||
|
@@ -45,6 +45,9 @@ const char rc_copyright[] = "Copyright (
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
# include <asm/setup.h> /* for COMMAND_LINE_SIZE */
|
||||||
|
+# ifndef COMMAND_LINE_SIZE
|
||||||
|
+# define COMMAND_LINE_SIZE 2048
|
||||||
|
+# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
--- conf.d/keymaps.orig 2009-10-09 17:09:02.537481085 +0200
|
||||||
|
+++ conf.d/keymaps 2009-10-09 17:12:19.694535631 +0200
|
||||||
|
@@ -1,10 +1,14 @@
|
||||||
|
# Use KEYMAP to specify the default console keymap. There is a complete tree
|
||||||
|
# of keymaps in /usr/share/keymaps to choose from.
|
||||||
|
-keymap="us"
|
||||||
|
+#
|
||||||
|
+# Please note that is mandatory to also specify the keyboard layout model,
|
||||||
|
+# i.e qwerty, dvorak, etc; because otherwise loadkeys(1) will use the first
|
||||||
|
+# one it finds and some keymaps do have the same name.
|
||||||
|
+keymap="qwerty/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".
|
||||||
|
-windowkeys="NO"
|
||||||
|
+windowkeys="yes"
|
||||||
|
|
||||||
|
# The maps to load for extended keyboards. Most users will leave this as is.
|
||||||
|
extended_keymaps=""
|
||||||
|
@@ -18,4 +22,4 @@ dumpkeys_charset=""
|
||||||
|
|
||||||
|
# Some fonts map AltGr-E to the currency symbol ¤ instead of the Euro €
|
||||||
|
# To fix this, set to "yes"
|
||||||
|
-fix_euro="NO"
|
||||||
|
+fix_euro="yes"
|
||||||
|
--- etc/rc.conf.in.orig 2009-06-05 10:20:11.000000000 +0200
|
||||||
|
+++ etc/rc.conf.in 2009-10-09 18:12:16.137121909 +0200
|
||||||
|
@@ -1,5 +1,9 @@
|
||||||
|
-# Global OpenRC configuration settings
|
||||||
|
-
|
||||||
|
+# Global OpenRC default configuration settings.
|
||||||
|
+#
|
||||||
|
+# WARNING: if you want to change these settings, use
|
||||||
|
+# /etc/rc.conf. This file sets global default settings and
|
||||||
|
+# they MUST be overwritten in /etc/rc.conf instead.
|
||||||
|
+#
|
||||||
|
# Set to "YES" if you want the rc system to try and start services
|
||||||
|
# in parallel for a slight speed improvement. When running in parallel we
|
||||||
|
# prefix the service output with it's name as the output will get
|
||||||
|
@@ -18,7 +22,7 @@
|
||||||
|
# If not specified we use $SHELL, otherwise the one specified in /etc/passwd,
|
||||||
|
# otherwise /bin/sh
|
||||||
|
# Linux users could specify /sbin/sulogin
|
||||||
|
-#rc_shell=/bin/sh
|
||||||
|
+rc_shell=/sbin/sulogin
|
||||||
|
|
||||||
|
# Do we allow any started service in the runlevel to satisfy the depedency
|
||||||
|
# or do we want all of them regardless of state? For example, if net.eth0
|
||||||
|
@@ -44,7 +48,7 @@
|
||||||
|
# /var/log/rc.log
|
||||||
|
# NOTE: Linux systems require the devfs service to be started before
|
||||||
|
# logging can take place and as such cannot log the sysinit runlevel.
|
||||||
|
-#rc_logger="YES"
|
||||||
|
+rc_logger="YES"
|
||||||
|
|
||||||
|
# By default we filter the environment for our running scripts. To allow other
|
||||||
|
# variables through, add them here. Use a * to allow all variables through.
|
||||||
|
@@ -73,7 +77,7 @@
|
||||||
|
# There variables are shared between many init scripts
|
||||||
|
|
||||||
|
# Set unicode to YES to turn on unicode support for keyboards and screens.
|
||||||
|
-#unicode="NO"
|
||||||
|
+unicode="YES"
|
||||||
|
|
||||||
|
# Network fstypes. Below is the default.
|
||||||
|
net_fs_list="afs cifs coda davfs fuse gfs ncpfs nfs nfs4 ocfs2 shfs smbfs"
|
|
@ -1,21 +0,0 @@
|
||||||
Installs a "locale" service into the "boot" runlevel, to set
|
|
||||||
a the system locale.
|
|
||||||
|
|
||||||
--- runlevels/Makefile.Linux.orig 2009-05-07 15:48:37.075825332 +0000
|
|
||||||
+++ runlevels/Makefile.Linux 2009-05-07 15:48:52.008557039 +0000
|
|
||||||
@@ -1,3 +1,3 @@
|
|
||||||
SYSINIT+= devfs dmesg
|
|
||||||
-BOOT+= hwclock keymaps modules mtab procfs termencoding
|
|
||||||
+BOOT+= hwclock keymaps modules mtab procfs termencoding locale
|
|
||||||
SHUTDOWN+= killprocs mount-ro
|
|
||||||
--- init.d/Makefile.Linux.orig 2009-05-07 15:55:26.156910483 +0000
|
|
||||||
+++ init.d/Makefile.Linux 2009-05-07 15:55:35.682853819 +0000
|
|
||||||
@@ -2,7 +2,7 @@ NET_LO= net.lo
|
|
||||||
|
|
||||||
SRCS+= devfs.in dmesg.in hwclock.in consolefont.in keymaps.in killprocs.in \
|
|
||||||
modules.in mount-ro.in mtab.in numlock.in procfs.in sysfs.in \
|
|
||||||
- termencoding.in
|
|
||||||
+ termencoding.in locale.in
|
|
||||||
|
|
||||||
.SUFFIXES: .Linux.in
|
|
||||||
.Linux.in:
|
|
Loading…
Add table
Reference in a new issue