Merge symlinks into tarball packages.

This commit is contained in:
Andrius Štikonas 2022-05-18 23:58:01 +01:00
parent 081912058f
commit 8f61b8400e
6 changed files with 45 additions and 169 deletions

View file

@ -1 +1 @@
3b4845de1d50b839a7aa4ef4a188a5f97ce0d0c36f16c1cc787d164ae0dd04d3 /usr/bin/tar
cc3767ea29010901ac091de883aa60209e82da0f13a6e30057832f320610339c /usr/bin/tar

View file

@ -1,5 +1,6 @@
/*
* SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
* SPDX-FileCopyrightText: 2022 Andrius Štikonas <andrius@stikonas.eu>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
@ -8,15 +9,6 @@
#include <linux/syscall.h>
#include <linux/x86/syscall.h>
int _stat(const char *path, struct stat *buf) {
int rc = stat(path, buf);
if (rc == 0) {
buf->st_atime = 0;
buf->st_mtime = 0;
}
return rc;
}
int _lstat(const char *path, struct stat *buf) {
int rc = lstat(path, buf);
if (rc == 0) {
@ -26,5 +18,12 @@ int _lstat(const char *path, struct stat *buf) {
return rc;
}
#define stat(a,b) _stat(a,b)
#define lstat(a,b) _lstat(a,b)
/* stat is deliberately hacked to be lstat.
In src/system.h tar already defines lstat to be stat
since S_ISLNK is not defined in mes C library
Hence, we can't use something like #define lstat(a,b) _lstat(a,b)
to have separate stat and lstat functions.
Thus here we break tar with --dereference option but we don't use
this option in live-bootstrap.
*/
#define stat(a,b) _lstat(a,b)