diff --git a/.kpatch.metadata b/.kpatch.metadata new file mode 100644 index 0000000..93398c2 --- /dev/null +++ b/.kpatch.metadata @@ -0,0 +1 @@ +701b69fec97a5d5f5bc5831cf36523c8eb226d90 SOURCES/kpatch-0.0.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SPECS/kpatch.spec b/SPECS/kpatch.spec new file mode 100644 index 0000000..3a8fec6 --- /dev/null +++ b/SPECS/kpatch.spec @@ -0,0 +1,67 @@ +Name: kpatch +Version: 0.0 +Release: 1%{?dist} +Summary: Dynamic kernel patch manager + +Group: System Environment/Kernel +License: GPLv2 +#URL: +Source0: kpatch-%{version}.tar.gz + +#BuildRequires: +Requires: bash, systemd +Requires(post): systemd + +BuildArch: noarch + + +%description +Kpatch is a dynamic kernel patch manager. It allows the user to manage a +collection of binary kernel patches which can be used to dynamically patch the +kernel without rebooting. + +%prep +%setup -q + + +%build + + +%install +make install DESTDIR=%{buildroot} + + +%post +# TODO: open bug to put kpatch in the preset policy instead and then use +# %systemd macros +# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl enable kpatch.service >/dev/null 2>&1 || : +fi + + +%preun +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable kpatch.service > /dev/null 2>&1 || : + /bin/systemctl stop kpatch.service > /dev/null 2>&1 || : +fi + + +%postun +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart kpatch.service >/dev/null 2>&1 || : +fi + + +%files +%{_bindir}/* +%{_prefix}/lib/systemd/system/* + + +%changelog +* Thu Jan 30 2014 Josh Poimboeuf 0.0-1 +- Initial build