Commit Graph

274 Commits

Author SHA1 Message Date
Josh Poimboeuf
50068a640e Merge pull request #46 from spartacus06/fixes
fixup printf formats with -DDEBUG
2014-03-07 13:21:03 -06:00
Seth Jennings
159214a4fc fixup printf formats with -DDEBUG
Fix -Wformat warnings for printf formats with -DDEBUG

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-03-07 12:07:56 -06:00
Josh Poimboeuf
7618f12f45 Merge pull request #45 from spartacus06/fixes
Fixes
2014-03-05 11:43:23 -06:00
Seth Jennings
2419410a52 fix KPATCH_BUILD path
use the build symlink in /lib/modules for a more portable
path to the build env for the kernel.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-03-05 11:31:15 -06:00
Seth Jennings
e33695be27 remove dead code
refactoring.  A couple of comment touchups too.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-03-05 11:26:02 -06:00
Seth Jennings
16fb78696c Merge pull request #44 from jpoimboe/gcc-warnings
enable gcc warnings and fix all warnings
2014-03-05 10:04:36 -06:00
Josh Poimboeuf
693426b5ef enable gcc warnings and fix all warnings 2014-03-05 09:46:10 -06:00
Josh Poimboeuf
81cc4a3542 Merge pull request #37 from spartacus06/fixes
refactor and fix multiple issues
2014-03-05 09:42:22 -06:00
Seth Jennings
949af29309 Merge pull request #43 from jpoimboe/gpl-headers
add GPLv2 headers to source files
2014-03-04 22:45:46 -06:00
Josh Poimboeuf
330a08dd0d add GPLv2 headers to source files 2014-03-04 21:34:19 -06:00
Seth Jennings
f6efd53541 refactor and fix multiple issues
- Fixup debug messages
- Remove dead code
- No more DEPENDENCY state
- Reachability test is now the "Inclusion tree" for determining
  which syms/sections will be included in the output
- 'reachable' field is now and 'include' and is the sole
  consideration in including sections/symbols (no more complex
  conditional checks)
- Order LOCAL before GLOBAL in the symbol table.  Apparently, after
  a FILE sym, all LOCAL symbols should precede GLOBAL syms or readelf
  shows <corrupt>
- Handle __ksymtab_strings section and __ksymtab_* syms

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-03-04 15:56:41 -06:00
Seth Jennings
5145520695 Merge pull request #41 from puiterwijk/add-license
Add a COPYING file to make it trivial to find the license in a standard place
2014-03-04 09:38:31 -06:00
Patrick Uiterwijk
8ce75225f7 Add a COPYING file to make it trivial to find the license in a standard place 2014-03-04 10:51:58 +01:00
Josh Poimboeuf
179381ac85 Merge pull request #39 from spartacus06/localversionfix
put localversions file in SRCDIR, not OBJDIR
2014-03-02 20:10:45 -06:00
Seth Jennings
d62798fde8 put localversions file in SRCDIR, not OBJDIR
The kernel Makefile look for localversion in the source tree,
not the object tree.  The absense from the source tree results
in a patch module that will not load because the kernel versions
don't match.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-03-02 19:47:23 -06:00
Seth Jennings
6a36470123 Merge pull request #34 from jpoimboe/cache-fix
build objects in separate directory to fix caching
2014-02-25 09:41:15 -06:00
Seth Jennings
f07a0d9749 Merge pull request #35 from jpoimboe/readme
readme: add some more Q&A's and a limitation
2014-02-20 21:26:11 -06:00
Josh Poimboeuf
c22610646e readme: add some more Q&A's and a limitation 2014-02-20 21:10:46 -06:00
Josh Poimboeuf
5352d8b01a build objects in separate directory to fix caching
Setting KCFLAGS="-ffunction-sections -fdata-sections" causes make to
invalidate all the kernel objects, resulting in all the objects getting
rebuilt on the next pass, thus no build caching.

To fix that, build the objects in a separate directory (obj) for normal
builds, and another separate directory (obj2) for the builds with added
cflags.
2014-02-20 14:52:21 -06:00
Seth Jennings
4f64ad6c2a Merge pull request #33 from jpoimboe/readme-typo
readme typo and grammar fix
2014-02-19 21:59:42 -06:00
Josh Poimboeuf
7ffc0fdeaa readme typo and grammar fix 2014-02-19 21:32:32 -06:00
Seth Jennings
7a63c20011 Merge pull request #32 from jpoimboe/readme-faq
add readme faq
2014-02-19 16:01:32 -06:00
Josh Poimboeuf
af9887c909 add readme faq 2014-02-19 15:56:14 -06:00
Seth Jennings
b56a0179bc Merge pull request #31 from jpoimboe/readme
README: describe the different components of kpatch
2014-02-19 10:03:07 -06:00
Josh Poimboeuf
84a0b00d5a README: s/to be loaded/to load/ 2014-02-19 09:50:56 -06:00
Josh Poimboeuf
2ecd73abdb README: describe the different components of kpatch 2014-02-18 21:40:14 -06:00
Seth Jennings
586813814c Merge pull request #30 from jpoimboe/readme-caveats
add warnings, limitations, mailing list to README
2014-02-18 18:06:53 -06:00
Josh Poimboeuf
68fe3e6593 add warnings, limitations, mailing list to README 2014-02-18 17:37:12 -06:00
Josh Poimboeuf
3bed96ad2c Merge pull request #29 from spartacus06/fixes
iterate the iterator
2014-02-18 17:08:09 -06:00
Seth Jennings
084cbeaa80 iterate the iterator
It works better this way.  Trust me.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-02-18 16:17:21 -06:00
Seth Jennings
2b39b34f5f Merge pull request #28 from jpoimboe/clean-cache
only allow one cache at a time
2014-02-18 16:09:06 -06:00
Seth Jennings
054b638655 Merge pull request #27 from jpoimboe/readme-ccache
ccache README recommendation
2014-02-18 16:07:29 -06:00
Josh Poimboeuf
f7da3ea207 only allow one cache at a time
This will prevent the ~/.kpatch cache directory from filling up with old
caches.
2014-02-18 16:05:18 -06:00
Josh Poimboeuf
35ececbeea ccache README recommendation 2014-02-18 15:56:47 -06:00
Josh Poimboeuf
7930fa804b Merge pull request #26 from spartacus06/remove-compressed-cache
remove compressed cache
2014-02-18 15:53:22 -06:00
Seth Jennings
7d747e86fd remove compressed cache
The compression of the cache during initial build time and
the removal and (re)decompression of the cache for subsequent
builds takes a large amount of time and causes significant I/O.

This commit removes the compressed cache and, instead, keeps
the cache uncompressed and maintained in a known state.  If
the "applied-patch" file does not exist, then the cache is
in the unpatched state.  If the file does exist, the cache is
in a patched state and can be returned to an unpatched state
with "patch -R -p1 < applied-patch".

The if cache is detected and is in the patched state, the patch
is removed and vmlinux is rebuilt to obtain the base vmlinux.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-02-18 15:25:11 -06:00
Josh Poimboeuf
f0ce3443b5 Merge pull request #25 from spartacus06/fixes
remove quotes around for loop elements
2014-02-18 14:19:50 -06:00
Seth Jennings
a6154ca400 remove quotes around for loop elements
Right now kpatch-build fails when more than one object
file has changed because the quotes around the for loop
arrays cause the for loop to execute only once for all
elements in a single string.

Remove the quotes around the for loop arrays so that the
for loop is execute for each element.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-02-18 13:37:46 -06:00
Seth Jennings
07d78c2275 Merge pull request #24 from jpoimboe/readme
rearrange README and add some more content
2014-02-18 11:52:20 -06:00
Josh Poimboeuf
843a42298b rearrange README and add some more content
- move license to bottom
- clarify dependencies and installation procedure
- move gotchas section to installation section
- move status section to intro
- add more information about how it works
2014-02-18 11:49:35 -06:00
Seth Jennings
2fb629e958 Merge pull request #23 from jpoimboe/cleanup-cleanup
cleanup the cleanup handling
2014-02-18 11:23:42 -06:00
Seth Jennings
cf93831a6a Merge pull request #22 from jpoimboe/kpatch-build-from-git
fix calling of kpatch-build from git dir
2014-02-18 11:14:37 -06:00
Josh Poimboeuf
052f2d8b25 fix calling of kpatch-build from git dir
When calling kpatch-build from the git directory, the patch kmod build
fails because it can't find kpatch.h because the symlink is broken.
Copy the kpatch.h file (instead of the symlink) to TEMPDIR.
2014-02-18 11:11:51 -06:00
Josh Poimboeuf
aed73433a7 cleanup the cleanup handling
- always remove TEMPDIR, otherwise /tmp can fill up if you get multiple
  build errors
- always remove KSRCDIR
- only remove the log file on success
2014-02-18 10:56:16 -06:00
Seth Jennings
06ed1bdcc0 Merge pull request #21 from jpoimboe/strip-fix
fix STRIPCMD use
2014-02-18 10:41:24 -06:00
Josh Poimboeuf
d8cdaa7a57 fix STRIPCMD use
bash gets confused when a command and its args are quoted:

  /usr/local/libexec/kpatch/kpatch-build: line 131: strip -d --keep-file-symbols: command not found
2014-02-18 10:37:49 -06:00
Seth Jennings
a4e0b80a6d Merge pull request #20 from jpoimboe/copy-core-fix
don't copy core kmod source files to tempdir
2014-02-18 10:14:02 -06:00
Josh Poimboeuf
12065851f3 don't copy core kmod source files to tempdir
No need to copy them anymore now that the core kmod is getting
built elsewhere.
2014-02-18 10:12:42 -06:00
Seth Jennings
496cb13085 Merge pull request #19 from jpoimboe/install-fix
install uname fix
2014-02-18 09:34:15 -06:00
Seth Jennings
b373d6e331 Merge pull request #18 from jpoimboe/logfile-error
kpatch-build: fix logfile error message
2014-02-18 09:29:27 -06:00