live-bootstrap/steps/bzip2-1.0.8/patches/mes-libc.patch
fosslinux a67db8fcbd Make patches relative to where tarballs are extracted
Ever since an old patch version, it has (for reasonable security
reasons) not supported patched with ../ in the filename.
Many of our patches have been relying on this behaviour being OK,
because we start off with an ancient patch version that didn't perform
such checks. As soon as we need this behaviour after we build a newer
patch though, we will have problems.

So, let's change the policy.
Patches are relative to where tarballs are extracted, rather than the
"working directory" - e.g. have patches for `coreutils-9.4/src/cp.c`
instead of `src/cp.c`.
Keeping this consistent has a few implications;
- patches are applied from the build/ directory in bash era now, with
  `-p0`
- when patches are manually applied in the bash era, use `-p` as
  required, usually `-p1`
- in kaem era where patches are always manually applied, `-p1` is used
2024-12-23 15:20:42 +11:00

33 lines
1 KiB
Diff

SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: bzip2-1.0.6
mes libc has no time support, so we remove that.
It also does not have fch{own,mod}, which we don't care about in the bootstrap
anyway, so we can null-op those calls.
diff -r -N -U3 bzip2.c bzip2.c
--- bzip2-1.0.8/bzip2.c 2019-07-13 18:50:05.000000000 +0100
+++ bzip2-1.0.8/bzip2.c 2021-01-14 14:11:40.160213521 +0000
@@ -1051,12 +1051,9 @@
{
# if BZ_UNIX
IntNative retVal;
- struct utimbuf uTimBuf;
- uTimBuf.actime = fileMetaInfo.st_atime;
- uTimBuf.modtime = fileMetaInfo.st_mtime;
- retVal = utime ( dstName, &uTimBuf );
+ retVal = 0;
ERROR_IF_NOT_ZERO ( retVal );
# endif
}
diff -r -N -U3 utime.h utime.h
--- bzip2-1.0.8/utime.h 1970-01-01 01:00:00.000000000 +0100
+++ bzip2-1.0.8/utime.h 2021-01-14 18:11:11.253825037 +0000
@@ -0,0 +1,2 @@
+#define fchown(filedes, owner, group) 0
+#define fchmod(filedes, mode) 0