Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:markkp:branches:Base:System
s390-tools
s390-tools-sles15sp5-ap_tools-ap-check-use-new-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File s390-tools-sles15sp5-ap_tools-ap-check-use-new-mdevctl-install-location.patch of Package s390-tools
From 4b5937f142c7381e8cdad3ea3f55a4931a862488 Mon Sep 17 00:00:00 2001 From: Matthew Rosato <mjrosato@linux.ibm.com> Date: Tue, 15 Nov 2022 12:40:35 -0500 Subject: [PATCH] ap_tools/ap-check: use new mdevctl install location MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mdevctl has been updated to use /usr/lib/mdevctl/scripts.d/callouts/ instead of /etc/mdevctl.d/scripts.d/callouts/. The /etc location is considered deprecated, meaning mdevctl will also look at that location for now but might eventually stop looking in /etc for callout scripts. Based on that, update the installation location for the ap-check callout. However, because older versions of mdevctl will still only look in /etc, let's also put a wrapper script in /etc for now to provide backward compatibility, and plan to remove it at a later time. Link: https://github.com/mdevctl/mdevctl/commit/df6bb57429ba7425e8b7901b0580ed7e616b6c4f Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/139 Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com> Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com> --- ap_tools/Makefile | 20 +++++++++++++++++--- ap_tools/ap-check.sh | 15 +++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 ap_tools/ap-check.sh diff --git a/ap_tools/Makefile b/ap_tools/Makefile index 77fe4c3..a79624a 100644 --- a/ap_tools/Makefile +++ b/ap_tools/Makefile @@ -1,8 +1,11 @@ include ../common.mak -MDEVCTL_DIR = /etc/mdevctl.d/ -MDEVCTL_SCRIPTS = /etc/mdevctl.d/scripts.d/ -MDEVCTL_CALLOUTS = /etc/mdevctl.d/scripts.d/callouts/ +MDEVCTL_DIR = /usr/lib/mdevctl/ +MDEVCTL_SCRIPTS = /usr/lib/mdevctl/scripts.d/ +MDEVCTL_CALLOUTS = /usr/lib/mdevctl/scripts.d/callouts/ +MDEVCTL_DEP_DIR = /etc/mdevctl.d/ +MDEVCTL_DEP_SCRIPTS = /etc/mdevctl.d/scripts.d/ +MDEVCTL_DEP_CALLOUTS = /etc/mdevctl.d/scripts.d/callouts/ libs = $(rootdir)/libap/libap.a \ $(rootdir)/libutil/libutil.a @@ -32,6 +35,17 @@ install: all fi; \ $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 ap-check \ $(DESTDIR)$(MDEVCTL_CALLOUTS) + @if [ ! -d $(DESTDIR)$(MDEVCTL_DEP_CALLOUTS) ]; then \ + mkdir -p $(DESTDIR)$(MDEVCTL_DEP_CALLOUTS); \ + chown $(OWNER).$(GROUP) $(DESTDIR)$(MDEVCTL_DEP_DIR); \ + chown $(OWNER).$(GROUP) $(DESTDIR)$(MDEVCTL_DEP_SCRIPTS); \ + chown $(OWNER).$(GROUP) $(DESTDIR)$(MDEVCTL_DEP_CALLOUTS); \ + chmod 755 $(DESTDIR)$(MDEVCTL_DEP_DIR); \ + chmod 755 $(DESTDIR)$(MDEVCTL_DEP_SCRIPTS); \ + chmod 755 $(DESTDIR)$(MDEVCTL_DEP_CALLOUTS); \ + fi; \ + $(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 ap-check.sh \ + $(DESTDIR)$(MDEVCTL_DEP_CALLOUTS) endif clean: diff --git a/ap_tools/ap-check.sh b/ap_tools/ap-check.sh new file mode 100644 index 0000000..d8a4e77 --- /dev/null +++ b/ap_tools/ap-check.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# +# ap-check.sh - Wrapper script for 'ap-check' binary +# +# mdevctl has deprecated the /etc/mdevctl.d/scripts.d/callouts/ location in +# newer releases. This wrapper ensures that mdevctl 1.2.0 and older can +# still access 'ap-check' for now, and will be removed at a later time. +# +# Copyright 2022 IBM Corp. +# +# s390-tools is free software; you can redistribute it and/or modify +# it under the terms of the MIT license. See LICENSE for details. +# + +[ -e /usr/lib/mdevctl/scripts.d/callouts/ap-check ] && /usr/lib/mdevctl/scripts.d/callouts/ap-check "$@" -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor