From 19c274d2c17dc22b7f3dd7e59d7eca09e4e5f7f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Wed, 7 Sep 2016 14:22:34 +0200 Subject: [PATCH] - rebased to 1.36.0 - switch cpuplugd to systemd service --- .gitignore | 10 +- cpuplugd.initd | 112 ------------------ ...atch => s390-tools-1.36.0-zipl-flags.patch | 8 +- s390utils.spec | 37 +++--- sources | 2 +- 5 files changed, 25 insertions(+), 144 deletions(-) delete mode 100644 cpuplugd.initd rename s390-tools-1.34.0-zipl-flags.patch => s390-tools-1.36.0-zipl-flags.patch (82%) diff --git a/.gitignore b/.gitignore index d3b899d..2370297 100644 --- a/.gitignore +++ b/.gitignore @@ -3,13 +3,5 @@ cmsfs-1.1.8c.tar.gz lib-zfcp-hbaapi-2.0.tar.gz src_vipa-2.0.4.tar.gz /lib-zfcp-hbaapi-2.1.tar.gz -/s390-tools-1.14.0.tar.bz2 -/s390-tools-1.16.0.tar.bz2 -/s390-tools-1.17.0.tar.bz2 -/s390-tools-1.19.0.tar.bz2 -/s390-tools-1.20.0.tar.bz2 -/s390-tools-1.23.0.tar.bz2 /src_vipa-2.1.0.tar.gz -/s390-tools-1.29.0.tar.bz2 -/s390-tools-1.30.0.tar.bz2 -/s390-tools-1.34.0.tar.bz2 +/s390-tools-*.tar.bz2 diff --git a/cpuplugd.initd b/cpuplugd.initd deleted file mode 100644 index 16bfa97..0000000 --- a/cpuplugd.initd +++ /dev/null @@ -1,112 +0,0 @@ -#! /bin/sh -# -# chkconfig: - 90 10 -# description: Start the cpu hotplug daemon for Linux on System z -# processname: cpuplugd -# config: /etc/sysconfig/cpuplugd -# pidfile: /var/run/cpuplugd.pid - -### BEGIN INIT INFO -# Provides: cpuplugd -# Required-Start: $local_fs $remote_fs -# Required-Stop: $local_fs $remote_fs -# Default-Start: -# Default-Stop: 0 1 2 3 4 5 6 -# Short-Description: Start the cpu hotplug daemon for Linux on System z -# Description: Starts the cpuplugd. It uses the configuration -# file /etc/sysconfig/cpuplugd -### END INIT INFO - -# Source function library. -. /etc/rc.d/init.d/functions - -exec="/usr/sbin/cpuplugd" -prog="cpuplugd" -config="/etc/sysconfig/cpuplugd" - -lockfile=/var/lock/subsys/$prog - -start() { - [ -x $exec ] || exit 5 - [ -f $config ] || exit 6 - [ `id -u` -eq 0 ] || exit 4 - echo -n $"Starting $prog: " - daemon $exec -c $config - retval=$? - echo - [ $retval -eq 0 ] && touch $lockfile - return $retval -} - -stop() { - [ `id -u` -eq 0 ] || exit 4 - echo -n $"Stopping $prog: " - killproc $exec - retval=$? - echo - [ $retval -eq 0 ] && rm -f $lockfile - return $retval -} - -restart() { - stop - # - # We have to wait 2-3 seconds here. When the daemon is stopped it takes - # the time we sleep to reactivate cpus. If we restart to fast and - # cpuplugd wasn't able to restore some settings we may get a undesired - # online cpu count after cpuplugd shutdown - # - sleep 4 - start -} - -reload() { - restart -} - -force_reload() { - restart -} - -rh_status() { - # run checks to determine if the service is running or use generic status -# status -l $prog $exec - status $exec -} - -rh_status_q() { - rh_status >/dev/null 2>&1 -} - - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 -esac -exit $? diff --git a/s390-tools-1.34.0-zipl-flags.patch b/s390-tools-1.36.0-zipl-flags.patch similarity index 82% rename from s390-tools-1.34.0-zipl-flags.patch rename to s390-tools-1.36.0-zipl-flags.patch index 4c2f48a..da642fe 100644 --- a/s390-tools-1.34.0-zipl-flags.patch +++ b/s390-tools-1.36.0-zipl-flags.patch @@ -1,4 +1,4 @@ -From 9093cab19f973c3d42b9c24565b94bc6e06159fa Mon Sep 17 00:00:00 2001 +From 584fd01d78e94d98ea2cb21954789fcc844fabcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Fri, 22 Apr 2016 13:21:50 +0200 Subject: [PATCH] zipl: disable strict aliasing for bootloader @@ -8,11 +8,11 @@ Subject: [PATCH] zipl: disable strict aliasing for bootloader 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipl/boot/Makefile b/zipl/boot/Makefile -index ebb734d..d84e10d 100644 +index bb8a19d..f1f4401 100644 --- a/zipl/boot/Makefile +++ b/zipl/boot/Makefile @@ -4,7 +4,7 @@ include ../../common.mak - CFLAGS = -Os -g -I../include -D__ASSEMBLY__ \ + CFLAGS_BOOT = -Os -g -I../include -D__ASSEMBLY__ \ -DS390_TOOLS_RELEASE=$(S390_TOOLS_RELEASE) \ -fno-builtin -ffreestanding -fno-asynchronous-unwind-tables \ - -fno-delete-null-pointer-checks \ @@ -21,5 +21,5 @@ index ebb734d..d84e10d 100644 -mstack-size=8192 -mstack-guard=128 -msoft-float $(WARNFLAGS) -- -2.4.11 +2.7.4 diff --git a/s390utils.spec b/s390utils.spec index c95777d..d160d05 100644 --- a/s390utils.spec +++ b/s390utils.spec @@ -4,7 +4,7 @@ Name: s390utils Summary: Utilities and daemons for IBM System/z Group: System Environment/Base -Version: 1.34.0 +Version: 1.36.0 Release: 1%{?dist} Epoch: 2 License: GPLv2 and GPLv2+ and CPL @@ -29,11 +29,10 @@ Source14: device_cio_free Source15: device_cio_free.service Source16: ccw_init Source17: ccw.udev -Source18: cpuplugd.initd Source19: mon_statd.initd Source21: normalize_dasd_arg -Patch1: s390-tools-1.34.0-zipl-flags.patch +Patch1: s390-tools-1.36.0-zipl-flags.patch Patch1000: cmsfs-1.1.8-warnings.patch Patch1001: cmsfs-1.1.8-kernel26.patch @@ -137,8 +136,8 @@ install -p -m 755 etc/init.d/dumpconf ${RPM_BUILD_ROOT}%{_initddir}/dumpconf install -p -m 644 etc/sysconfig/mon_statd ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig install -p -m 755 %{SOURCE19} ${RPM_BUILD_ROOT}%{_initddir}/mon_statd -install -p -m 644 etc/sysconfig/cpuplugd ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig -install -p -m 755 %{SOURCE18} ${RPM_BUILD_ROOT}%{_initddir}/cpuplugd +install -p -m 644 etc/cpuplugd.conf ${RPM_BUILD_ROOT}%{_sysconfdir}/ +install -p -m 755 systemd/cpuplugd.service ${RPM_BUILD_ROOT}%{_unitdir}/ install -Dp -m 644 etc/udev/rules.d/*.rules ${RPM_BUILD_ROOT}%{_udevrulesdir} @@ -552,10 +551,10 @@ fi License: GPLv2+ Summary: Daemon that manages CPU and memory resources Group: System Environment/Daemons -Requires: coreutils -Requires(pre): chkconfig -Requires(preun): chkconfig -Requires(preun): initscripts +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +BuildRequires: systemd %description cpuplugd Daemon that manages CPU and memory resources based on a set of rules. @@ -563,22 +562,20 @@ Depending on the workload CPUs can be enabled or disabled. The amount of memory can be increased or decreased exploiting the CMM1 feature. %post cpuplugd -/sbin/chkconfig --add cpuplugd +%systemd_post cpuplugd.service %preun cpuplugd -if [ $1 = 0 ]; then - # not for updates - /sbin/service cpuplugd stop > /dev/null 2>&1 - /sbin/chkconfig --del cpuplugd -fi -: +%systemd_preun cpuplugd.service + +%postun cpuplugd +%systemd_postun_with_restart cpuplugd.service %files cpuplugd -%{_initddir}/cpuplugd -%config(noreplace) %{_sysconfdir}/sysconfig/cpuplugd +%config(noreplace) %{_sysconfdir}/cpuplugd.conf %{_sbindir}/cpuplugd %{_mandir}/man5/cpuplugd.conf.5* %{_mandir}/man8/cpuplugd.8* +%{_unitdir}/cpuplugd.service # # *********************** s390-tools ziomon package ************************* @@ -812,6 +809,10 @@ User-space development files for the s390/s390x architecture. %changelog +* Wed Sep 07 2016 Dan Horák - 2:1.36.0-1 +- rebased to 1.36.0 +- switch cpuplugd to systemd service + * Fri Apr 22 2016 Dan Horák - 2:1.34.0-1 - rebased to 1.34.0 diff --git a/sources b/sources index 9f11421..72748b4 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ 71a8ee5918f2c44c385fcfe8350cdc98 cmsfs-1.1.8c.tar.gz 6011b33227d843a6e2f8144331f4b3d4 src_vipa-2.1.0.tar.gz -0621adf62cca1beff110170b2681a9c8 s390-tools-1.34.0.tar.bz2 +51b1c326c971cfda2a101313e7cfd13b s390-tools-1.36.0.tar.bz2