Blame contrib/kpatch.spec

Packit Service da4517
# needed for the kernel specific module
Packit Service da4517
%define KVER %(uname -r)
Packit Service da4517
Packit Service da4517
# Don't build kpatch kernel module by default
Packit Service da4517
%bcond_with kpatch_mod
Packit Service da4517
Packit Service ac8aad
Name: kpatch
Packit Service ac8aad
Summary: Dynamic kernel patching
Packit Service da4517
Version: 0.9.2
Packit Service ac8aad
License: GPLv2
Packit Service ac8aad
Group: System Environment/Kernel
Packit Service ac8aad
URL: http://github.com/dynup/kpatch
Packit Service ac8aad
Release: 1%{?dist}
Packit Service ac8aad
Source0: %{name}-%{version}.tar.gz
Packit Service ac8aad
Packit Service ac8aad
Requires: kmod bash
Packit Service ac8aad
BuildRequires: gcc kernel-devel elfutils elfutils-devel
Packit Service da4517
%if %{with kpatch_mod}
Packit Service da4517
BuildRequires: kernel-devel-uname-r = %{KVER}
Packit Service da4517
BuildRequires: kernel-uname-r = %{KVER}
Packit Service da4517
%endif
Packit Service ac8aad
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Packit Service ac8aad
Packit Service ac8aad
%description
Packit Service ac8aad
kpatch is a Linux dynamic kernel patching tool which allows you to patch a
Packit Service ac8aad
running kernel without rebooting or restarting any processes.  It enables
Packit Service ac8aad
sysadmins to apply critical security patches to the kernel immediately, without
Packit Service ac8aad
having to wait for long-running tasks to complete, users to log off, or
Packit Service ac8aad
for scheduled reboot windows.  It gives more control over up-time without
Packit Service ac8aad
sacrificing security or stability.
Packit Service ac8aad
Packit Service ac8aad
Packit Service ac8aad
%package runtime
Packit Service ac8aad
Summary: Dynamic kernel patching
Packit Service ac8aad
Buildarch: noarch
Packit Service ac8aad
Provides: %{name} = %{version}
Packit Service ac8aad
%description runtime
Packit Service ac8aad
kpatch is a Linux dynamic kernel patching tool which allows you to patch a
Packit Service ac8aad
running kernel without rebooting or restarting any processes.  It enables
Packit Service ac8aad
sysadmins to apply critical security patches to the kernel immediately, without
Packit Service ac8aad
having to wait for long-running tasks to complete, users to log off, or
Packit Service ac8aad
for scheduled reboot windows.  It gives more control over up-time without
Packit Service ac8aad
sacrificing security or stability.
Packit Service ac8aad
Packit Service ac8aad
Packit Service ac8aad
%package build
Packit Service ac8aad
Requires: %{name}
Packit Service ac8aad
Summary: Dynamic kernel patching
Packit Service ac8aad
%description build
Packit Service ac8aad
kpatch is a Linux dynamic kernel patching tool which allows you to patch a
Packit Service ac8aad
running kernel without rebooting or restarting any processes.  It enables
Packit Service ac8aad
sysadmins to apply critical security patches to the kernel immediately, without
Packit Service ac8aad
having to wait for long-running tasks to complete, users to log off, or
Packit Service ac8aad
for scheduled reboot windows.  It gives more control over up-time without
Packit Service ac8aad
sacrificing security or stability.
Packit Service ac8aad
Packit Service da4517
%if %{with kpatch_mod}
Packit Service ac8aad
%package %{KVER}
Packit Service ac8aad
Requires: %{name}
Packit Service ac8aad
Summary: Dynamic kernel patching
Packit Service ac8aad
%description %{KVER}
Packit Service ac8aad
kpatch is a Linux dynamic kernel patching tool which allows you to patch a
Packit Service ac8aad
running kernel without rebooting or restarting any processes.  It enables
Packit Service ac8aad
sysadmins to apply critical security patches to the kernel immediately, without
Packit Service ac8aad
having to wait for long-running tasks to complete, users to log off, or
Packit Service ac8aad
for scheduled reboot windows.  It gives more control over up-time without
Packit Service ac8aad
sacrificing security or stability.
Packit Service ac8aad
Packit Service da4517
%endif
Packit Service ac8aad
Packit Service ac8aad
%prep
Packit Service ac8aad
%setup -q
Packit Service ac8aad
Packit Service ac8aad
%build
Packit Service da4517
make %{_smp_mflags} %{?with_kpatch_mod: BUILDMOD=yes KPATCH_BUILD=/lib/modules/%{KVER}/build}
Packit Service ac8aad
Packit Service ac8aad
%install
Packit Service ac8aad
rm -rf %{buildroot}
Packit Service ac8aad
Packit Service da4517
make install PREFIX=/%{_usr} DESTDIR=%{buildroot} %{?with_kpatch_mod: BUILDMOD=yes KPATCH_BUILD=/lib/modules/%{KVER}/build}
Packit Service ac8aad
Packit Service ac8aad
%clean
Packit Service ac8aad
rm -rf %{buildroot}
Packit Service ac8aad
Packit Service ac8aad
%files runtime
Packit Service ac8aad
%defattr(-,root,root,-)
Packit Service ac8aad
%doc COPYING README.md
Packit Service ac8aad
%{_sbindir}/kpatch
Packit Service ac8aad
%{_mandir}/man1/kpatch.1*
Packit Service ac8aad
%{_usr}/lib/systemd/system/*
Packit Service ac8aad
%{_sysconfdir}/init/kpatch.conf
Packit Service ac8aad
Packit Service da4517
%if %{with kpatch_mod}
Packit Service ac8aad
%files %{KVER}
Packit Service ac8aad
%defattr(-,root,root,-)
Packit Service ac8aad
%{_usr}/lib/kpatch/%{KVER}
Packit Service da4517
%endif
Packit Service ac8aad
Packit Service ac8aad
%files build
Packit Service ac8aad
%defattr(-,root,root,-)
Packit Service ac8aad
%{_bindir}/*
Packit Service ac8aad
%{_libexecdir}/*
Packit Service ac8aad
%{_datadir}/%{name}
Packit Service ac8aad
%{_mandir}/man1/kpatch-build.1*
Packit Service ac8aad
Packit Service ac8aad
%changelog
Packit Service da4517
* Tue Sep 8 2020 Joe Lawrence <joe.lawrence@redhat.com> - 0.9.2
Packit Service da4517
- Integration test support for rhel-{7.8,7.9,8.1,8.2}, centos-8
Packit Service da4517
- Better support for gcc child functions
Packit Service da4517
- Batch jump label errors to report all instances
Packit Service da4517
- Dynrela code cleanup
Packit Service da4517
- Remove .klp.arch and add support for jump labels in v5.8+ kernels
Packit Service da4517
- Mark ignored sections earlier to support functions missing ftrace hook
Packit Service da4517
- Minor README.md improvements
Packit Service da4517
- Add ppc64le mcount support to patched functions
Packit Service da4517
- Show additional stalled process information in kpatch script
Packit Service da4517
- Increased shellcheck coverage and fixes
Packit Service da4517
- ppc64le plugin fixes for gcc v10
Packit Service da4517
- Ignore __UNIQUE_ID_ symbol from tristate config objects
Packit Service da4517
- Don't clear dmesg during integration tests
Packit Service da4517
- Detect and report MODVERSIONS symbol version CRC changes
Packit Service da4517
Packit Service da4517
* Wed Mar 11 2020 Yannick Cote <ycote@redhat.com> - 0.9.1
Packit Service da4517
- Handle ppc64le toc with only constants
Packit Service da4517
- Don't strip callback section symbols
Packit Service da4517
- Integration tests update
Packit Service da4517
- Fix -Wconversion warnings
Packit Service da4517
- Process debug sections last
Packit Service da4517
Packit Service da4517
* Wed Mar 11 2020 Yannick Cote <ycote@redhat.com> - 0.9.0
Packit Service da4517
- Many fixes in integration tests and adding rhel-8.0
Packit Service da4517
- Updates to documentation
Packit Service da4517
- Many updates and additions to the patch author guide
Packit Service da4517
- Fix to relocations used for ZERO_PAGE(0)
Packit Service da4517
- Simplify static local variables correlation
Packit Service da4517
- Make symvers reading code more flexible
Packit Service da4517
- Free sections in elf teardown
Packit Service da4517
- Fix kpatch-test module unloading
Packit Service da4517
- Disable the build of kpatch.ko module by default
Packit Service da4517
- Simplify mangled function correlation
Packit Service da4517
- Use whole word filename matching in find_parent_obj()
Packit Service da4517
- Simplify relocation processing
Packit Service da4517
Packit Service da4517
* Wed Aug 21 2019 Artem Savkov <asavkov@redhat.com> - 0.8.0
Packit Service da4517
- kpatch.ko atomic replace fixes
Packit Service da4517
- Fixes for potential problems found by covscan
Packit Service da4517
- Remove manual signaling logic from kpatch utility
Packit Service da4517
- Don't strip callback symbols
Packit Service da4517
- Allow dynamic debug static keys
Packit Service da4517
Packit Service da4517
* Wed Jul 24 2019 Josh Poimboeuf <jpoimboe@redhat.com> - 0.7.1
Packit Service da4517
- Fix several powerpc-specific bugs, including two which can result in kernel
Packit Service da4517
  panics
Packit Service da4517
- Use rpmbuild --nodeps for installing srpm on Fedora/RHEL
Packit Service da4517
- Fix inconsistent unit test failures for FAIL tests
Packit Service da4517
Packit Service da4517
* Thu Jul 18 2019 Artem Savkov <asavkov@redhat.com> - 0.7.0
Packit Service da4517
- Multiple memory leak fixes in kpatch-build
Packit Service da4517
- livepatch-patch-hook compatability fixes for kernels 5.1+
Packit Service da4517
- Making kpatch-build compatible with custom gcc names
Packit Service da4517
- Added rhel-rebased integration tests
Packit Service da4517
- kpatch.service will no longer unload modules on stop
Packit Service da4517
- kpatch load will no longer fail if a module is already loaded and enabled
Packit Service da4517
- kpatch-build will now check for *_fixup section changes on ppc64le and will
Packit Service da4517
  fail on such changes
Packit Service da4517
- Add support for R_X86_64_PLT32
Packit Service da4517
- don't allow jump labels
Packit Service da4517
- ppc64le-specific kpatch-build fixes
Packit Service da4517
Packit Service da4517
* Fri Apr 12 2019 Joe Lawrence <joe.lawrence@redhat.com> - 0.6.3
Packit Service da4517
- Lots of integration test work
Packit Service da4517
- Better support for building out-of-tree modules
Packit Service da4517
- Updated manpage options, drop deprecated distro specific mentions
Packit Service da4517
- README.md updates for shadow variables, out-of-tree modules
Packit Service da4517
- Fix core module compilation with CONFIG_HAVE_ARCH_PREL32_RELOCATIONS
Packit Service da4517
- kpatch-build detects and abort on unsupported options
Packit Service da4517
  GCC_PLUGIN_LATENT_ENTROPY, GCC_PLUGIN_RANDSTRUCT
Packit Service da4517
- Fix patch linking with 4.20+
Packit Service da4517
- Other minor shellcheck and kpatch-build fixups
Packit Service da4517
Packit Service da4517
* Tue Oct 2 2018 Joe Lawrence <joe.lawrence@redhat.com> - 0.6.2
Packit Service da4517
- ppc64le: relax .text section addralign value check
Packit Service da4517
- gcc8: unit-tests
Packit Service da4517
- gcc8: support parent/child symbol relations
Packit Service da4517
- gcc8: handle functions changing subsection
Packit Service da4517
- gcc8: consider ".text.hot" sections bundleable
Packit Service da4517
- kpatch-build: bugfix for less aggressive clean build-cache
Packit Service da4517
- ubuntu: remove "-signed" substring from the kernel source package name
Packit Service da4517
- ubuntu: explicitly note elfutils dependency
Packit Service da4517
- upstream 4.18: unit-tests
Packit Service da4517
- upstream 4.18: KCFLAGS -mcount-record support support
Packit Service da4517
- RHEL-8: don't care who provides yumdownloader
Packit Service da4517
- RHEL-8: account for quirky SRPM / release name conventions
Packit Service da4517
Packit Service ac8aad
* Tue May 29 2018 Joe Lawrence <joe.lawrence@redhat.com> - 0.6.1
Packit Service ac8aad
- Increase the transition timeout, helpful for large CPU count systems
Packit Service ac8aad
- Miscellaneous unit testing, ppc64, etc. fixes
Packit Service ac8aad
Packit Service ac8aad
* Mon Apr 22 2018 Josh Poimboeuf <jpoimboe@redhat.com> - 0.6.0
Packit Service ac8aad
- Support and converted to livepatch-style hooks.
Packit Service ac8aad
- Lots of misc bugfixes and cleanups
Packit Service ac8aad
- Manpage, README.md fixups
Packit Service ac8aad
- More PPC64 work
Packit Service ac8aad
- "Undefined reference" build failure rework
Packit Service ac8aad
- Livepatch disable retries
Packit Service ac8aad
- New unit testing framework
Packit Service ac8aad
Packit Service ac8aad
* Thu Dec 21 2017 Josh Poimboeuf <jpoimboe@redhat.com> - 0.5.0
Packit Service ac8aad
- Basic ppc64le support
Packit Service ac8aad
- kpatch: load automatically signals stalled processes after a timeout
Packit Service ac8aad
- kpatch: list shows stalled processes
Packit Service ac8aad
- kpatch: signal signals stalled processes
Packit Service ac8aad
- kpatch-build: multiple source patches can be combined into a single binary patch module
Packit Service ac8aad
- kpatch-build: -n|--name option for giving a custom name to the patch module
Packit Service ac8aad
- kpatch-build: additional -d options for more verbose debug modes
Packit Service ac8aad
- The module prefix is now either livepatch- or kpatch- depending on the underlying patching technology
Packit Service ac8aad
Packit Service ac8aad
* Mon Mar 13 2017 Josh Poimboeuf <jpoimboe@redhat.com> - 0.4.0
Packit Service ac8aad
- The tools underlying kpatch-build have been made more modular, in preparation for making create-diff-object more generally useful to other use cases (kernel livepatch, Xen live patching, user space patching).
Packit Service ac8aad
- Support for all new upstream kernels up to 4.10.
Packit Service ac8aad
- KASLR support.
Packit Service ac8aad
- Many other bug fixes and improvements.
Packit Service ac8aad
Packit Service ac8aad
* Thu Oct 11 2016 Jessica Yu - 0.3.4
Packit Service ac8aad
- bump version to 0.3.4
Packit Service ac8aad
Packit Service ac8aad
* Fri Aug 19 2016 Josh Poimboeuf <jpoimboe@redhat.com> - 0.3.3
Packit Service ac8aad
- bump version to 0.3.3
Packit Service ac8aad
Packit Service ac8aad
* Thu Feb 18 2016 Josh Poimboeuf <jpoimboe@redhat.com> - 0.3.2
Packit Service ac8aad
- bump version to 0.3.2
Packit Service ac8aad
Packit Service ac8aad
* Thu Nov 19 2015 Josh Poimboeuf <jpoimboe@redhat.com> - 0.3.1
Packit Service ac8aad
- Get kernel version from vmlinux if the kernel source tree is used
Packit Service ac8aad
Packit Service ac8aad
* Wed Nov 18 2015 Josh Poimboeuf <jpoimboe@redhat.com> - 0.3.0
Packit Service ac8aad
- kpatch-build: fix gcc_version_check: both "GNU" and "GCC" are possible
Packit Service ac8aad
Packit Service ac8aad
* Wed Dec 3 2014 Josh Poimboeuf <jpoimboe@redhat.com> - 0.2.2-1
Packit Service ac8aad
- rebased to current version
Packit Service ac8aad
Packit Service ac8aad
* Tue Sep 2 2014 Josh Poimboeuf <jpoimboe@redhat.com> - 0.2.1-1
Packit Service ac8aad
- rebased to current version
Packit Service ac8aad
Packit Service ac8aad
* Mon Jul 28 2014 Josh Poimboeuf <jpoimboe@redhat.com> - 0.1.9-1
Packit Service ac8aad
- moved core module to /usr/lib/kpatch
Packit Service ac8aad
- rebased to current version
Packit Service ac8aad
Packit Service ac8aad
* Mon Jul 07 2014 Udo Seidel <udoseidel@gmx.de> - 0.1.7-1
Packit Service ac8aad
- rebased to current version
Packit Service ac8aad
Packit Service ac8aad
* Sat May 24 2014 Udo Seidel <udoseidel@gmx.de> - 0.1.1-1
Packit Service ac8aad
- rebased to current version
Packit Service ac8aad
Packit Service ac8aad
* Thu Apr 10 2014 Udo Seidel <udoseidel@gmx.de> - 0.0.1-3
Packit Service ac8aad
- added dracut module
Packit Service ac8aad
Packit Service ac8aad
* Tue Mar 25 2014 Udo Seidel <udoseidel@gmx.de> - 0.0.1-2
Packit Service ac8aad
- added man pages
Packit Service ac8aad
Packit Service ac8aad
* Sat Mar 22 2014 Udo Seidel <udoseidel@gmx.de> - 0.0.1-1
Packit Service ac8aad
- initial release