diff options
author | Tuan Hoang <tmhoang@linux.vnet.ibm.com> | 2019-01-29 03:48:57 +0100 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2019-02-06 07:42:54 +0000 |
commit | 28d9a37f27e810798196424f52208e6914924e24 (patch) | |
tree | 8579d49b4fb22e0ae9e3e78827ab3797b688fbf6 | |
parent | 82df7628dc704a75eef75cadbc67f1f71d00e7eb (diff) | |
download | aports-28d9a37f27e810798196424f52208e6914924e24.tar.bz2 aports-28d9a37f27e810798196424f52208e6914924e24.tar.xz |
main/openrc: use tod as hwclock on s390x
-rw-r--r-- | main/openrc/APKBUILD | 4 | ||||
-rw-r--r-- | main/openrc/use-tod-as-clocksource-for-s390x.patch | 42 |
2 files changed, 45 insertions, 1 deletions
diff --git a/main/openrc/APKBUILD b/main/openrc/APKBUILD index ad15f6767f..6272fc9bd2 100644 --- a/main/openrc/APKBUILD +++ b/main/openrc/APKBUILD @@ -2,7 +2,7 @@ pkgname=openrc pkgver=0.39.2 _ver=${pkgver/_git*/} -pkgrel=3 +pkgrel=4 pkgdesc="OpenRC manages the services, startup and shutdown of a host" url="https://gitweb.gentoo.org/proj/openrc.git" arch="all" @@ -21,6 +21,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgve 0001-fsck-don-t-add-C0-to-busybox-fsck.patch 0008-fix-undeclared-UT_LINESIZE.patch do-not-complain-if-interrupted-by-a-signal.patch + use-tod-as-clocksource-for-s390x.patch openrc.logrotate hostname.initd @@ -92,6 +93,7 @@ d54630d40a2d6b10a325cb012d4efcda997a60c008ca953ce5d60059d3f267308a59dabddf93a5fc dbe3f170440f0f357f31ac4d49c56a9a7ec22172df2701bf4a0afdee22aedda1f88b9fa5ffdbe19a5eea3c764ad0e4c802e19b95b7082a72d423d46d30c18edd 0001-fsck-don-t-add-C0-to-busybox-fsck.patch e56ea82dbf8bf6b4cff4fa48db8e4f06589094ba99aad930fc498e2fe235db6ce2afe96e2bc047dd9066a4057d4e3691f8d0148ad5fed5d8191c0e2415a48f69 0008-fix-undeclared-UT_LINESIZE.patch 25a32c87a7e95e3c891156855b3c501cd529bb39810b362204cf187c2a4230b51cc9b6d96d0750ca4ef454fd7ef0bb01533e059ef35ab27939aafc4da551a6f5 do-not-complain-if-interrupted-by-a-signal.patch +92308a9935aff53a39842520f881b61ce21f2c7d26a8fe849df13461c2b6e270cd33eacbbe895dbc03e3783718a44e79393e41df27e8aeff82f260c22ef1170e use-tod-as-clocksource-for-s390x.patch 12bb6354e808fbf47bbab963de55ee7901738b4a912659982c57ef2777fff9a670e867fcb8ec316a76b151032c92dc89a950d7d1d835ef53f753a8f3b41d2cec openrc.logrotate 259552165ee5e9ca973bbe18d1d9ec5cc67526cb26a9e0ac717076ef4913bb7ff4055d6ccb9f77996ed9c00b67f46edba552e1a21b836068a112dda2428502b3 hostname.initd c06eac7264f6cc6888563feeae5ca745aae538323077903de1b19102e4f16baa34c18b8c27af5dd5423e7670834e2261e9aa55f2b1ec8d8fdc2be105fe894d55 hwdrivers.initd diff --git a/main/openrc/use-tod-as-clocksource-for-s390x.patch b/main/openrc/use-tod-as-clocksource-for-s390x.patch new file mode 100644 index 0000000000..c28a101c9f --- /dev/null +++ b/main/openrc/use-tod-as-clocksource-for-s390x.patch @@ -0,0 +1,42 @@ +diff --git a/init.d/hwclock.in b/init.d/hwclock.in +index 024bff0..758f1fa 100644 +--- a/init.d/hwclock.in ++++ b/init.d/hwclock.in +@@ -41,7 +41,7 @@ setupopts() + { + case "$(uname -m)" in + s390*) +- utc="s390" ++ utc="UTC" + ;; + *) + if [ -e /proc/devices ] && \ +@@ -98,7 +98,7 @@ start() + fi + + ebegin "Setting system clock using the hardware clock [$utc]" +- if [ -e /proc/modules ]; then ++ if [ -e /proc/modules ] && [ "$(arch)" != "s390x" ]; then + if ! rtc_exists; then + for x in rtc-cmos rtc genrtc; do + modprobe -q $x && rtc_exists && modname="$x" && break +@@ -118,7 +118,10 @@ start() + : $(( retval += $? )) + fi + +- if yesno ${clock_hctosys:-YES}; then ++ if [ "$(arch)" = "s390x" ]; then ++ date -s "@$(/bin/tod_s390x)" ++ : $(( retval += $? )) ++ elif yesno ${clock_hctosys:-YES}; then + _hwclock --hctosys $utc_cmd $(get_noadjfile) $clock_args + : $(( retval += $? )) + fi +@@ -132,6 +135,7 @@ stop() + { + # Don't tweak the hardware clock on LiveCD halt. + [ -n "$CDBOOT" ] && return 0 ++ [ "$(arch)" = "s390x" ] && return 0 + yesno ${clock_systohc:-YES} || return 0 + + local retval=0 errstr="" |