kpatch/kpatch-build
Julian Stecklina 828b557b50 Fix cleanup when kpatch is installed in read-only location
On NixOS files are installed with mode 444 (read-only). This causes
directories in $TEMPDIR to be read-only as well, because they are
created by:

cp -LR "$DATADIR/patch" "$TEMPDIR" || die

which preserves the mode of the directory. We could do
--no-preserve=mode, but this will make people with non-coreutils cp
unhappy. Instead just chmod the files after copying.

If this patch is not applied, cleanup complains like this:

rm: cannot remove '/home/julian/.kpatch/tmp/patch/kpatch.h': Permission denied
rm: cannot remove '/home/julian/.kpatch/tmp/patch/Makefile': Permission denied
rm: cannot remove '/home/julian/.kpatch/tmp/patch/kpatch-macros.h': Permission denied
...

Signed-off-by: Julian Stecklina <julian.stecklina@cyberus-technology.de>
2024-07-29 14:07:31 +02:00
..
gcc-plugins gcc-plugin: update gcc-common.h for gcc-13 2023-03-16 22:05:43 -07:00
insn insn: get it to compile in create-diff-object 2014-05-30 15:19:57 -05:00
create-diff-object.c kpatch-build: skip mangling for powerpc cpu feature relocations 2023-07-26 14:46:21 -04:00
create-klp-module.c create-diff-object: rename "dynrela" -> "klp_reloc" 2022-12-01 14:00:09 -08:00
create-kpatch-module.c kpatch-elf: pass new ELF output file mode to kpatch_write_output_elf() 2020-09-25 09:30:13 -04:00
kpatch-build Fix cleanup when kpatch is installed in read-only location 2024-07-29 14:07:31 +02:00
kpatch-cc kpatch-build: ignore init/version-timestamp.o 2023-01-16 09:33:55 -05:00
kpatch-elf.c Merge pull request #1322 from joe-lawrence/v6.2-support 2023-04-14 16:17:28 -05:00
kpatch-elf.h Merge pull request #1322 from joe-lawrence/v6.2-support 2023-04-14 16:17:28 -05:00
kpatch-intermediate.h lookup: rename 'pos' to 'sympos' 2020-04-06 15:18:58 -05:00
kpatch.h kpatch-build: add exit status enum 2018-06-15 07:11:48 -04:00
list.h Fix undefined behavior problem when using list_foreach_entry 2023-08-10 00:22:53 +00:00
log.h create-diff-object: use errx() instead of err() 2022-11-30 12:58:31 -08:00
lookup.c lookup: skip duplicate local symbol table check for files without locals 2023-06-05 09:49:30 -07:00
lookup.h Switch to per-file lookup table pointers. 2021-08-17 09:37:44 +02:00
Makefile kpatch/s390: Enable kpatch build support 2022-05-20 15:50:29 +02:00