Merge pull request #337 from jpoimboe/core-module-path

kpatch: change core module path again
This commit is contained in:
Seth Jennings 2014-07-29 09:44:20 -05:00
commit c884811bb9
5 changed files with 18 additions and 8 deletions

View File

@ -7,7 +7,7 @@ PREFIX ?= /usr/local
LIBDIR ?= lib
BINDIR = $(DESTDIR)$(PREFIX)/bin
SBINDIR = $(DESTDIR)$(PREFIX)/sbin
MODULESDIR = $(DESTDIR)$(PREFIX)/$(LIBDIR)/modules
MODULESDIR = $(DESTDIR)$(PREFIX)/$(LIBDIR)/kpatch
LIBEXECDIR = $(DESTDIR)$(PREFIX)/libexec/kpatch
DATADIR = $(DESTDIR)$(PREFIX)/share/kpatch
MANDIR = $(DESTDIR)$(PREFIX)/share/man/man1

View File

@ -1,6 +1,6 @@
Name: kpatch
Summary: Dynamic kernel patching
Version: 0.1.7
Version: 0.1.9
License: GPLv2
Group: System Environment/Kernel
URL: http://github.com/dynup/kpatch
@ -85,7 +85,7 @@ rm -rf %{buildroot}
%files %{KVER}
%defattr(-,root,root,-)
%{_usr}/lib/modules/%{KVER}/extra/%{name}/*
%{_usr}/lib/kpatch/%{KVER}
%files build
%defattr(-,root,root,-)
@ -95,6 +95,10 @@ rm -rf %{buildroot}
%{_mandir}/man1/kpatch-build.1*
%changelog
* Mon Jul 28 2014 Josh Poimboeuf <jpoimboe@redhat.com> - 0.1.9-1
- moved core module to /usr/lib/kpatch
- rebased to current version
* Mon Jul 07 2014 Udo Seidel <udoseidel@gmx.de> - 0.1.7-1
- rebased to current version

View File

@ -26,7 +26,7 @@ install() {
inst /usr/bin/dirname
# install core module
inst_any -d /usr/lib/modules/$kernel/extra/kpatch/kpatch.ko /usr/local/lib/modules/$kernel/extra/kpatch/kpatch.ko /usr/lib/modules/$kernel/extra/kpatch/kpatch.ko
inst_any -d /usr/lib/modules/$kernel/extra/kpatch/kpatch.ko /usr/local/lib/modules/$kernel/extra/kpatch/kpatch.ko /usr/lib/modules/$kernel/extra/kpatch/kpatch.ko /usr/lib/kpatch/$kernel/kpatch.ko /usr/local/lib/kpatch/$kernel/kpatch.ko
# install patch modules
if [[ -e /var/lib/kpatch/$kernel ]]; then

View File

@ -4,14 +4,14 @@ all: clean
$(MAKE) -C core
install:
$(INSTALL) -d $(MODULESDIR)/$(shell uname -r)/extra/kpatch
$(INSTALL) -m 644 core/kpatch.ko $(MODULESDIR)/$(shell uname -r)/extra/kpatch
$(INSTALL) -m 644 core/Module.symvers $(MODULESDIR)/$(shell uname -r)/extra/kpatch
$(INSTALL) -d $(MODULESDIR)/$(shell uname -r)
$(INSTALL) -m 644 core/kpatch.ko $(MODULESDIR)/$(shell uname -r)
$(INSTALL) -m 644 core/Module.symvers $(MODULESDIR)/$(shell uname -r)
$(INSTALL) -d $(DATADIR)/patch
$(INSTALL) -m 644 patch/* $(DATADIR)/patch
uninstall:
$(RM) -R $(MODULESDIR)/*/extra/kpatch
$(RM) -R $(MODULESDIR)
$(RM) -R $(DATADIR)
clean:

View File

@ -82,6 +82,12 @@ find_core_module() {
COREMOD="$SCRIPTDIR"/../kmod/core/kpatch.ko
[[ -f "$COREMOD" ]] && return
COREMOD="/usr/local/lib/kpatch/$(uname -r)/kpatch.ko"
[[ -f "$COREMOD" ]] && return
COREMOD="/usr/lib/kpatch/$(uname -r)/kpatch.ko"
[[ -f "$COREMOD" ]] && return
COREMOD="/usr/local/lib/modules/$(uname -r)/extra/kpatch/kpatch.ko"
[[ -f "$COREMOD" ]] && return