diff --git a/Makefile b/Makefile index 72e43f9..8f0ef59 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ include Makefile.inc -SUBDIRS = kpatch-build kpatch kmod +SUBDIRS = kpatch-build kpatch kmod man BUILD_DIRS = $(SUBDIRS:%=build-%) INSTALL_DIRS = $(SUBDIRS:%=install-%) UNINSTALL_DIRS = $(SUBDIRS:%=uninstall-%) diff --git a/Makefile.inc b/Makefile.inc index a353f13..3a721d2 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -9,6 +9,7 @@ SBINDIR = $(DESTDIR)$(PREFIX)/sbin MODULESDIR = $(DESTDIR)$(PREFIX)/lib/modules LIBEXECDIR = $(DESTDIR)$(PREFIX)/libexec/kpatch DATADIR = $(DESTDIR)$(PREFIX)/share/kpatch +MANDIR = $(DESTDIR)$(PREFIX)/share/man/man1 .PHONY: all install clean .DEFAULT: all diff --git a/contrib/kpatch.spec b/contrib/kpatch.spec index 94fd8e6..59966f7 100644 --- a/contrib/kpatch.spec +++ b/contrib/kpatch.spec @@ -4,7 +4,7 @@ Version: 0.0.1 License: GPLv2 Group: System Environment/Kernel URL: http://github.com/dynup/kpatch -Release: 1%{?dist} +Release: 2%{?dist} Source0: %{name}-%{version}.tar.gz Requires: kmod bash @@ -79,6 +79,7 @@ rm -rf %{buildroot} %defattr(-,root,root,-) %doc COPYING README.md %{_sbindir}/kpatch +%{_mandir}/man1/kpatch.1* %files %{KVER} %defattr(-,root,root,-) @@ -89,7 +90,11 @@ rm -rf %{buildroot} %{_bindir}/* %{_libexecdir}/* %{_datadir}/%{name} +%{_mandir}/man1/kpatch-build.1* %changelog +* Tue Mar 25 2014 Udo Seidel - 0.0.1-2 +- added man pages + * Sat Mar 22 2014 Udo Seidel - 0.0.1-1 - initial release diff --git a/man/Makefile b/man/Makefile new file mode 100644 index 0000000..47d7d8b --- /dev/null +++ b/man/Makefile @@ -0,0 +1,16 @@ +include ../Makefile.inc + +all: + +install: all + $(INSTALL) -d $(MANDIR) + gzip -9 kpatch.1 + $(INSTALL) -m 644 kpatch.1.gz $(MANDIR) + gzip -9 kpatch-build.1 + $(INSTALL) -m 644 kpatch-build.1.gz $(MANDIR) + +uninstall: + $(RM) $(MANDIR)/kpatch.1* + $(RM) $(MANDIR)/kpatch-build.1* + +clean: diff --git a/man/kpatch-build.1 b/man/kpatch-build.1 new file mode 100644 index 0000000..1324fdd --- /dev/null +++ b/man/kpatch-build.1 @@ -0,0 +1,37 @@ +.\" Manpage for kpatch-build. +.\" Contact udoseidel@gmx.de to correct errors or typos. +.TH man 1 "23 Mar 2014" "1.0" "kpatch-build man page" +.SH NAME +kpatch-build \- build script +.SH SYNOPSIS +kpatch-build [options] +.SH DESCRIPTION +This script takes a patch based on the version of the kernel +currently running and creates a kernel module that will replace +modified functions in the kernel such that the patched code takes +effect. + +This script currently only works on Fedora and will need to be adapted +to work on other distros. + +.SH OPTIONS + +-h|--help + Show this help message + +-s|--sourcedir + Specify kernel source directory + +-c|--config + Specify kernel config file + +.SH SEE ALSO +kpatch(1) +.SH BUGS +No known bugs. +.SH AUTHOR +Udo Seidel (udoseidel@gmx.de) +.SH COPYWRIGHT +Copyright (C) 2014: Seth Jennings , Copyright (C) +2013,2014: Josh Poimboeuf + diff --git a/man/kpatch.1 b/man/kpatch.1 new file mode 100644 index 0000000..a4f62f0 --- /dev/null +++ b/man/kpatch.1 @@ -0,0 +1,50 @@ +.\" Manpage for kpatch. +.\" Contact udoseidel@gmx.de to correct errors or typos. +.TH man 1 "23 Mar 2014" "1.0" "kpatch man page" +.SH NAME +kpatch \- hot patch module management +.SH SYNOPSIS +kpatch [] +.SH DESCRIPTION +kpatch is a user script that manages installing, applying, and +displaying information about kernel patch modules installed on +the system. +.SH OPTIONS + +install + install hotpatch module to the kpatch DB + +uninstall + uninstall hotpatch module from the kpatch DB + +apply --all + apply all enabled hotpatch modules to the running kernel + +apply + apply installed hotpatch module to the running kernel + +remove + remove hotpatch module from the running kernel + +enable + automatically apply hotpatch module during boot + +disable + don't automatically apply hotpatch module during boot + +info + show information about an installed hotpatch module + +list + list installed hotpatch modules + +.SH SEE ALSO +kpatch-build(1) +.SH BUGS +No known bugs. +.SH AUTHOR +Udo Seidel (udoseidel@gmx.de) +.SH COPYWRIGHT +Copyright (C) 2014: Seth Jennings and +Josh Poimboeuf +