Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
db478bafb1
!25 [sync] PR-22: 添加sw架构
From: @openeuler-sync-bot 
Reviewed-by: @small_leek, @lyn1001 
Signed-off-by: @small_leek, @lyn1001
2022-11-08 06:31:17 +00:00
wzx
e0ca9dc501 Add sw64 architecture
Signed-off-by: wzx <wuzx1226@qq.com>
(cherry picked from commit f3d1bec68e63cc4770be7b08ef99c4acfed9444d)
2022-10-31 14:10:58 +08:00
openeuler-ci-bot
287e4b84ed
!19 [sync] PR-17: fakeroot drop tartest
From: @openeuler-sync-bot 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
2022-06-21 06:04:30 +00:00
lyn1001
75fbffc3d9 Skip tar test: the test is unstable and keeps on randomly failing
(cherry picked from commit b24ac049e01dac10bd51216da5d4bb90e4045682)
2022-06-21 11:47:36 +08:00
openeuler-ci-bot
fa0081fdb7 !6 Fix error: '_STAT_VER' undeclared
From: @tong_1001
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2021-03-15 16:06:06 +08:00
sxt1001
388d222657 Fix error: '_STAT_VER' undeclared 2021-03-13 15:21:40 +08:00
openeuler-ci-bot
cef339a066 !3 update to 1.25.2
From: @jpzhang187
Reviewed-by: @ultra_planet,@small_leek
Signed-off-by: @small_leek
2020-11-20 17:11:41 +08:00
jpzhang187
5d50e3fe44 update to 1.25.2 2020-11-20 16:38:47 +08:00
openeuler-ci-bot
0ff749ad9b !2 remove four test cases to solve the compilation failure
Merge pull request !2 from jpzhang187/master
2020-08-12 17:58:50 +08:00
jpzhang
4aa5e61dce remove four test cases to solve the compilation failure 2020-08-12 17:49:22 +08:00
13 changed files with 436 additions and 279 deletions

View File

@ -0,0 +1,69 @@
From feda578ca3608b7fc9a28a3a91293611c0ef47b7 Mon Sep 17 00:00:00 2001
From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Date: Thu, 11 Feb 2021 21:00:04 -0800
Subject: [PATCH] libfakeroot.c: add wrappers for new glibc 2.33+ symbols
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
libfakeroot.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/libfakeroot.c b/libfakeroot.c
index 14cdbc4..d75c51f 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -1352,6 +1352,54 @@ int renameat(int olddir_fd, const char *oldpath,
#endif /* HAVE_FSTATAT */
+#if defined(__GLIBC__) && __GLIBC_PREREQ(2,33)
+/* Glibc 2.33 exports symbols for these functions in the shared lib */
+ int lstat(const char *file_name, struct stat *statbuf) {
+ return WRAP_LSTAT LSTAT_ARG(_STAT_VER, file_name, statbuf);
+ }
+ int stat(const char *file_name, struct stat *st) {
+ return WRAP_STAT STAT_ARG(_STAT_VER, file_name, st);
+ }
+ int fstat(int fd, struct stat *st) {
+ return WRAP_FSTAT FSTAT_ARG(_STAT_VER, fd, st);
+ }
+
+ #ifdef HAVE_FSTATAT
+ int fstatat(int dir_fd, const char *path, struct stat *st, int flags) {
+ return WRAP_FSTATAT FSTATAT_ARG(_STAT_VER, dir_fd, path, st, flags);
+ }
+ #endif
+
+ #ifdef STAT64_SUPPORT
+ int lstat64(const char *file_name, struct stat64 *st) {
+ return WRAP_LSTAT64 LSTAT64_ARG(_STAT_VER, file_name, st);
+ }
+ int stat64(const char *file_name, struct stat64 *st) {
+ return WRAP_STAT64 STAT64_ARG(_STAT_VER, file_name, st);
+ }
+ int fstat64(int fd, struct stat64 *st) {
+ return WRAP_FSTAT64 FSTAT64_ARG(_STAT_VER, fd, st);
+ }
+
+ #ifdef HAVE_FSTATAT
+ int fstatat64(int dir_fd, const char *path, struct stat64 *st, int flags) {
+ return WRAP_FSTATAT64 FSTATAT64_ARG(_STAT_VER, dir_fd, path, st, flags);
+ }
+ #endif
+ #endif
+
+ int mknod(const char *pathname, mode_t mode, dev_t dev) {
+ return WRAP_MKNOD MKNOD_ARG(_STAT_VER, pathname, mode, &dev);
+ }
+
+ #if defined(HAVE_FSTATAT) && defined(HAVE_MKNODAT)
+ int mknodat(int dir_fd, const char *pathname, mode_t mode, dev_t dev) {
+ return WRAP_MKNODAT MKNODAT_ARG(_STAT_VER, dir_fd, pathname, mode, &dev);
+ }
+ #endif
+#endif /* GLIBC_PREREQ */
+
+
#ifdef FAKEROOT_FAKENET
pid_t fork(void)
{

View File

@ -0,0 +1,34 @@
From 03bc0ee07fb6e293d081ffd8af1654788b434f6a Mon Sep 17 00:00:00 2001
From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Date: Thu, 11 Feb 2021 20:59:25 -0800
Subject: [PATCH] libfakeroot.c: define _STAT_VER if not already defined
Based on patch from Jan Pazdziora:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SMQ3RYXEYTVZH6PLQMKNB3NM4XLPMNZO/
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
libfakeroot.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/libfakeroot.c b/libfakeroot.c
index 3e80e38..14cdbc4 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -90,6 +90,16 @@
#define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b)
#endif
+#ifndef _STAT_VER
+ #if defined (__aarch64__)
+ #define _STAT_VER 0
+ #elif defined (__x86_64__)
+ #define _STAT_VER 1
+ #else
+ #define _STAT_VER 3
+ #endif
+#endif
+
/*
These INT_* (which stands for internal) macros should always be used when
the fakeroot library owns the storage of the stat variable.

View File

@ -0,0 +1,57 @@
From c3eebec293e35b997bb46c22fb5a4e114afb5e7f Mon Sep 17 00:00:00 2001
From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Date: Sat, 13 Feb 2021 19:32:08 -0800
Subject: [PATCH] configure.ac: fix __xmknod{,at} pointer argument
Switch default to assume * and not the absence of *.
On glibc 2.33+, there is no definition for these functions in header
files, so the compile test doesn't work. But, we can default to using
the pointer (as is the case with newer glibc), and use the header file
on older platforms to fail the test and use no pointer.
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
configure.ac | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 73415d2..d85566f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -183,13 +183,13 @@ AC_MSG_CHECKING([for type of arg of __xmknod])
]], [[
int __xmknod ( int ver,
const char *pathname ,
- mode_t mode , dev_t dev);
+ mode_t mode , dev_t *dev);
]])],[
- AC_DEFINE(XMKNOD_FRTH_ARG,)
- AC_MSG_RESULT([no extra *])
- ],[
AC_DEFINE(XMKNOD_FRTH_ARG,[*])
AC_MSG_RESULT([needs *])
+ ],[
+ AC_DEFINE(XMKNOD_FRTH_ARG,)
+ AC_MSG_RESULT([no extra *])
])
@@ -210,13 +210,13 @@ AC_MSG_CHECKING([for type of arg of __xmknodat])
int __xmknodat ( int ver,
int dirfd,
const char *pathname ,
- mode_t mode , dev_t dev);
+ mode_t mode , dev_t *dev);
]])],[
- AC_DEFINE(XMKNODAT_FIFTH_ARG,)
- AC_MSG_RESULT([no extra *])
- ],[
AC_DEFINE(XMKNODAT_FIFTH_ARG,[*])
AC_MSG_RESULT([needs *])
+ ],[
+ AC_DEFINE(XMKNODAT_FIFTH_ARG,)
+ AC_MSG_RESULT([no extra *])
])

View File

@ -0,0 +1,23 @@
From d074aaa34d6928989308a3870738d6b1c28f2bae Mon Sep 17 00:00:00 2001
From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Date: Thu, 11 Feb 2021 21:00:20 -0800
Subject: [PATCH] libfakeroot.c: fix compile error with DEBUG enabled
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
---
libfakeroot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libfakeroot.c b/libfakeroot.c
index d75c51f..31480f8 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -2525,7 +2525,7 @@ int statx (int dirfd, const char *path, int flags, unsigned int mask, struct sta
#ifdef LIBFAKEROOT_DEBUGGING
if (fakeroot_debug) {
- fprintf(stderr, "statx fd %d\n", fd);
+ fprintf(stderr, "statx fd %d\n", dirfd);
}
#endif /* LIBFAKEROOT_DEBUGGING */
r=INT_NEXT_FSTATAT(dirfd, path, &st, flags);

View File

@ -1,108 +0,0 @@
Fix the type of xattr functions to match the glibc headers.
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -1570,7 +1570,7 @@
#endif /* HAVE_CAPSET */
#if defined(HAVE_SETXATTR) || defined(HAVE_LSETXATTR) || defined(HAVE_FSETXATTR)
-static size_t common_setxattr(INT_STRUCT_STAT *st, const char *name, void * value, size_t size, int flags)
+static int common_setxattr(INT_STRUCT_STAT *st, const char *name, const void * value, size_t size, int flags)
{
xattr_args xattr;
xattr.name = name;
@@ -1625,7 +1625,7 @@
#endif /* defined(HAVE_LISTXATTR) || defined(HAVE_LLISTXATTR) || defined(HAVE_FLISTXATTR) */
#if defined(HAVE_REMOVEXATTR) || defined(HAVE_LREMOVEXATTR) || defined(HAVE_FREMOVEXATTR)
-static size_t common_removexattr(INT_STRUCT_STAT *st, const char *name)
+static int common_removexattr(INT_STRUCT_STAT *st, const char *name)
{
xattr_args xattr;
xattr.name = name;
@@ -1643,7 +1643,7 @@
#endif /* defined(HAVE_REMOVEXATTR) || defined(HAVE_LREMOVEXATTR) || defined(HAVE_FREMOVEXATTR) */
#ifdef HAVE_SETXATTR
-ssize_t setxattr(const char *path, const char *name, void *value, size_t size, int flags)
+int setxattr(const char *path, const char *name, const void *value, size_t size, int flags)
{
INT_STRUCT_STAT st;
int r;
@@ -1664,7 +1664,7 @@
#endif /* HAVE_SETXATTR */
#ifdef HAVE_LSETXATTR
-ssize_t lsetxattr(const char *path, const char *name, void *value, size_t size, int flags)
+int lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags)
{
INT_STRUCT_STAT st;
int r;
@@ -1685,7 +1685,7 @@
#endif /* HAVE_LSETXATTR */
#ifdef HAVE_FSETXATTR
-ssize_t fsetxattr(int fd, const char *name, void *value, size_t size, int flags)
+int fsetxattr(int fd, const char *name, const void *value, size_t size, int flags)
{
INT_STRUCT_STAT st;
int r;
@@ -1832,7 +1832,7 @@
#endif /* HAVE_FLISTXATTR */
#ifdef HAVE_REMOVEXATTR
-ssize_t removexattr(const char *path, const char *name)
+int removexattr(const char *path, const char *name)
{
INT_STRUCT_STAT st;
int r;
@@ -1853,7 +1853,7 @@
#endif /* HAVE_REMOVEXATTR */
#ifdef HAVE_LREMOVEXATTR
-ssize_t lremovexattr(const char *path, const char *name)
+int lremovexattr(const char *path, const char *name)
{
INT_STRUCT_STAT st;
int r;
@@ -1874,7 +1874,7 @@
#endif /* HAVE_LREMOVEXATTR */
#ifdef HAVE_FREMOVEXATTR
-ssize_t fremovexattr(int fd, const char *name)
+int fremovexattr(int fd, const char *name)
{
INT_STRUCT_STAT st;
int r;
--- a/wrapfunc.inp
+++ b/wrapfunc.inp
@@ -168,22 +168,22 @@
fgetxattr;ssize_t;(int fd, const char *name, void *value, size_t size);(fd, name, value, size)
#endif /* HAVE_FGETXATTR */
#ifdef HAVE_SETXATTR
-setxattr;ssize_t;(const char *path, const char *name, void *value, size_t size, int flags);(path, name, value, size, flags)
+setxattr;int;(const char *path, const char *name, const void *value, size_t size, int flags);(path, name, value, size, flags)
#endif /* HAVE_SETXATTR */
#ifdef HAVE_LSETXATTR
-lsetxattr;ssize_t;(const char *path, const char *name, void *value, size_t size, int flags);(path, name, value, size, flags)
+lsetxattr;int;(const char *path, const char *name, const void *value, size_t size, int flags);(path, name, value, size, flags)
#endif /* HAVE_LSETXATTR */
#ifdef HAVE_FSETXATTR
-fsetxattr;ssize_t;(int fd, const char *name, void *value, size_t size, int flags);(fd, name, value, size, flags)
+fsetxattr;int;(int fd, const char *name, const void *value, size_t size, int flags);(fd, name, value, size, flags)
#endif /* HAVE_FSETXATTR */
#ifdef HAVE_REMOVEXATTR
-removexattr;ssize_t;(const char *path, const char *name);(path, name)
+removexattr;int;(const char *path, const char *name);(path, name)
#endif /* HAVE_REMOVEXATTR */
#ifdef HAVE_LREMOVEXATTR
-lremovexattr;ssize_t;(const char *path, const char *name);(path, name)
+lremovexattr;int;(const char *path, const char *name);(path, name)
#endif /* HAVE_LREMOVEXATTR */
#ifdef HAVE_FREMOVEXATTR
-fremovexattr;ssize_t;(int fd, const char *name);(fd, name)
+fremovexattr;int;(int fd, const char *name);(fd, name)
#endif /* HAVE_FREMOVEXATTR */
#ifdef HAVE_FSTATAT

View File

@ -1,32 +0,0 @@
Description: Hide error from dlsym()
dlsym(), starting in glibc 2.24 actually reports errors. In our case,
we try to get ACL functions which are not in the glibc. This causes
failures in test suites, so hide those messages for non-debugging
purposes for now. It also makes the build logs annoying to read.
Author: Julian Andres Klode <juliank@ubuntu.com>
Origin: vendor
Bug-Debian: https://bugs.debian.org/830912
Forwarded: no
Last-Update: 2016-08-12
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -256,10 +256,16 @@ void load_library_symbols(void){
/* clear dlerror() just in case dlsym() legitimately returns NULL */
msg = dlerror();
*(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name);
+
if ( (msg = dlerror()) != NULL){
- fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
-/* abort ();*/
+#ifdef LIBFAKEROOT_DEBUGGING
+ if (fakeroot_debug) {
+ fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
+/* abort ();*/
+ }
+#endif
}
+
}
}

View File

@ -0,0 +1,27 @@
From ed8560719c6246182a77aca14c31ac736ff4d08a Mon Sep 17 00:00:00 2001
From: si-gui <sunguoshuai@huawei.com>
Date: Mon, 31 May 2021 14:44:03 +0800
Subject: [PATCH] fakeroot drop tartest
This patch comes from opensuse
(https://build.opensuse.org/package/view_file/openSUSE:Factory/fakeroot/fakeroot-drop-tartest.patch)
Skip tar test: the test is unstable and keeps on randomly failing.
---
test/Makefile.am | 1 -
1 file changed, 1 deletion(-)
diff --git a/test/Makefile.am b/test/Makefile.am
index 5ea4d72..93ce76e 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -9,7 +9,6 @@ TESTS = \
t.no_ld_preload \
t.no_ld_preload_link \
t.option \
- t.tar \
t.touchinstall \
t.truereturn \
t.xattr
--
2.30.0

View File

@ -1,10 +1,10 @@
diff -up fakeroot-1.20.2/scripts/fakeroot.in.multilib fakeroot-1.20.2/scripts/fakeroot.in
--- fakeroot-1.20.2/scripts/fakeroot.in.multilib 2014-10-05 17:16:00.000000000 +0200
+++ fakeroot-1.20.2/scripts/fakeroot.in 2015-09-28 09:56:43.891990046 +0200
diff -up fakeroot-1.25.2/scripts/fakeroot.in.multilib fakeroot-1.25.2/scripts/fakeroot.in
--- fakeroot-1.25.2/scripts/fakeroot.in.multilib 2020-10-05 21:34:34.584490563 +0200
+++ fakeroot-1.25.2/scripts/fakeroot.in 2020-10-05 21:35:33.264201406 +0200
@@ -35,7 +35,7 @@ FAKEROOT_BINDIR=@bindir@
USEABSLIBPATH=@LDPRELOADABS@
LIB=lib@fakeroot_transformed@@DLSUFFIX@
FAKEROOT_LIB=lib@fakeroot_transformed@@DLSUFFIX@
-PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot
+PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib/libfakeroot
FAKED=${FAKEROOT_BINDIR}/@faked_transformed@

View File

@ -1,12 +0,0 @@
diff -up fakeroot-1.23/test/tartest.tests fakeroot-1.23/test/tartest
--- fakeroot-1.23/test/tartest.tests 2018-07-16 11:23:37.524589359 +0200
+++ fakeroot-1.23/test/tartest 2018-07-16 11:33:46.051167023 +0200
@@ -79,7 +79,7 @@ uudecode ${SRCDIR}/tartest.tar.gz.uue
tar -cf - tar | gzip -9 > faketar.tar.gz
-${SRCDIR}/compare-tar tartest.tar.gz faketar.tar.gz
+${SRCDIR}/compare-tar tartest.tar.gz faketar.tar.gz || :
#test 2: try to unpack, pack the tar archive, and
# see if the result is the same archive

124
fakeroot-upstream-1.25.2-sw.patch Executable file
View File

@ -0,0 +1,124 @@
diff -Naur fakeroot-upstream-1.25.2.org/configure.ac fakeroot-upstream-1.25.2.sw/configure.ac
--- fakeroot-upstream-1.25.2.org/configure.ac 2022-04-28 17:01:46.991888440 +0800
+++ fakeroot-upstream-1.25.2.sw/configure.ac 2022-04-28 17:04:38.291888440 +0800
@@ -430,7 +430,7 @@
LDPRELOADABS=0
LDEXTRAVAR=""
case $target_cpu:$target_os in
- (alpha*:linux*|ia64*:linux*)
+ (sw_64*:linux|alpha*:linux*|ia64*:linux*)
libcpath="/lib/libc.so.6.1"
;;
(*:linux*)
@@ -577,6 +577,21 @@
],
[AC_MSG_RESULT([no]);])
;;
+esac
+
+case "$target_cpu:$target_os" in
+ (sw_64*:linux*)
+ AH_TEMPLATE([STUPID_ALPHA_HACK], [stat-struct conversion hackery])
+ AC_MSG_CHECKING([if we need to do stat-struct conversion hackery])
+ AC_EGREP_CPP([3:3],[
+#include <sys/stat.h>
+_STAT_VER:_STAT_VER_GLIBC2_3_4
+],
+ [AC_MSG_RESULT([yes]); AC_DEFINE(STUPID_ALPHA_HACK)
+CPPFLAGS="$CPPFLAGS -I\$(srcdir)/statconv/glibc/linux/sw_64"
+],
+ [AC_MSG_RESULT([no]);])
+ ;;
esac
dnl AH_TEMPLATE([MACOSX], [is __APPLE__ defined by the compiler])
diff -Naur fakeroot-upstream-1.25.2.org/statconv/glibc/linux/sw_64/stats.h fakeroot-upstream-1.25.2.sw/statconv/glibc/linux/sw_64/stats.h
--- fakeroot-upstream-1.25.2.org/statconv/glibc/linux/sw_64/stats.h 1970-01-01 08:00:00.000000000 +0800
+++ fakeroot-upstream-1.25.2.sw/statconv/glibc/linux/sw_64/stats.h 2022-04-28 17:04:03.311888440 +0800
@@ -0,0 +1,86 @@
+/* Definition of `struct stat' used in the kernel. */
+struct fakeroot_kernel_stat
+ {
+ unsigned int st_dev;
+ unsigned int st_ino;
+ unsigned int st_mode;
+ unsigned int st_nlink;
+ unsigned int st_uid;
+ unsigned int st_gid;
+ unsigned int st_rdev;
+ long int st_size;
+ unsigned long int st_atime;
+ unsigned long int st_mtime;
+ unsigned long int st_ctime;
+ unsigned int st_blksize;
+ int st_blocks;
+ unsigned int st_flags;
+ unsigned int st_gen;
+ };
+
+/* Definition of `struct stat64' used in the kernel. */
+struct fakeroot_kernel_stat64
+ {
+ unsigned long st_dev;
+ unsigned long st_ino;
+ unsigned long st_rdev;
+ long st_size;
+ unsigned long st_blocks;
+
+ unsigned int st_mode;
+ unsigned int st_uid;
+ unsigned int st_gid;
+ unsigned int st_blksize;
+ unsigned int st_nlink;
+ unsigned int __pad0;
+
+ unsigned long st_atime;
+ unsigned long st_atimensec;
+ unsigned long st_mtime;
+ unsigned long st_mtimensec;
+ unsigned long st_ctime;
+ unsigned long st_ctimensec;
+ long __unused[3];
+ };
+
+/* Definition of `struct stat' used by glibc 2.0. */
+struct fakeroot_glibc2_stat
+ {
+ __dev_t st_dev;
+ __ino_t st_ino;
+ __mode_t st_mode;
+ __nlink_t st_nlink;
+ __uid_t st_uid;
+ __gid_t st_gid;
+ __dev_t st_rdev;
+ __off_t st_size;
+ __time_t st_atime;
+ __time_t st_mtime;
+ __time_t st_ctime;
+ unsigned int st_blksize;
+ int st_blocks;
+ unsigned int st_flags;
+ unsigned int st_gen;
+ };
+
+/* Definition of `struct stat' used by glibc 2.1. */
+struct fakeroot_glibc21_stat
+ {
+ __dev_t st_dev;
+ __ino64_t st_ino;
+ __mode_t st_mode;
+ __nlink_t st_nlink;
+ __uid_t st_uid;
+ __gid_t st_gid;
+ __dev_t st_rdev;
+ __off_t st_size;
+ __time_t st_atime;
+ __time_t st_mtime;
+ __time_t st_ctime;
+ __blkcnt64_t st_blocks;
+ __blksize_t st_blksize;
+ unsigned int st_flags;
+ unsigned int st_gen;
+ int __pad3;
+ long __unused[4];
+ };

Binary file not shown.

View File

@ -1,140 +1,114 @@
%bcond_with autoconf
Name: fakeroot
Version: 1.23
Release: 2
%bcond_without autoconf
Summary: Gives a fake root environment
License: GPLv3+ and LGPLv2+ and (GPL+ or Artistic)
Name: fakeroot
Version: 1.25.2
Release: 4
License: GPLv3+ and LGPLv2.1 and MIT and GPL+
URL: https://tracker.debian.org/pkg/fakeroot
Source0: http://http.debian.net/debian/pool/main/f/fakeroot/%{name}_%{version}.orig.tar.xz
Patch0000: debian_eglibc-fts-without-LFS.patch
Patch0001: debian_glibc-xattr-types.patch
Patch0002: debian_fix-shell-in-fakeroot.patch
Patch0003: debian_hide-dlsym-error.patch
Patch0004: fakeroot-inttypes.patch
Patch0005: fakeroot-multilib.patch
Patch0006: fakeroot-tests.patch
Source0: http://salsa.debian.org/clint/fakeroot/-/archive/upstream/1.25.2/%{name}-upstream-%{version}.tar.gz
Patch0: debian_eglibc-fts-without-LFS.patch
Patch2: debian_fix-shell-in-fakeroot.patch
Patch4: fakeroot-inttypes.patch
Patch5: fakeroot-multilib.patch
Patch6: fakeroot-drop-tartest.patch
Patch6000: backport-define-_STAT_VER-if-not-already-defined.patch
Patch6001: backport-add-wrappers-for-new-glibc-2.33+-symbols.patch
Patch6002: backport-fix-compile-error-with-DEBUG-enabled.patch
Patch6003: backport-fix-__xmknod-at-pointer-argument.patch
%ifarch sw_64
Patch6004: fakeroot-upstream-1.25.2-sw.patch
%endif
%if %{with autoconf}
BuildRequires: autoconf automake libtool po4a
%endif
BuildRequires: util-linux libacl-devel libcap-devel sharutils
Requires: util-linux
Requires(post): chkconfig
Requires(post): coreutils
Requires(preun):chkconfig
Provides: fakeroot-libs = %{version}-%{release}
Obsoletes: fakeroot-libs < %{version}-%{release}
BuildRequires: /usr/bin/getopt libacl-devel libcap-devel sharutils
Requires: /usr/bin/getopt fakeroot-libs = %{version}-%{release}
Requires(post): /usr/sbin/alternatives
Requires(post): /usr/bin/readlink
Requires(preun): /usr/sbin/alternatives
%description
fakeroot replaces the invocation of library function to run a command
in a fake environment in which it executes just like has root privileges.
This is implemented by simulating the file manipulation functions such as
chmod and stat.
fakeroot runs a command in an environment wherein it appears to have
root privileges for file manipulation. fakeroot works by replacing the
file manipulation library functions (chmod(2), stat(2) etc.) by ones
that simulate the effect the real library functions would have had,
had the user really been root.
%package help
Summary: Documentation for fakeroot
%description help
Documentation for fakeroot
%package libs
Summary: Gives a fake root environment (libraries)
%description libs
This package contains the libraries required by %{name}.
%prep
%autosetup -p1
%autosetup -p1 -n %{name}-upstream-%{version}
%build
%if %{with autoconf}
autoreconf -i
cd doc
./bootstrap
pushd doc
po4a -k 0 --rm-backups --variable "srcdir=../doc/" po4a/po4a.cfg
cd -
popd
%endif
for file in ./doc/{*.1,*/*.1}; do
iconv -f latin1 -t utf8 < $file > $file.new && \
mv -f $file.new $file
done
for type in sysv tcp; do
mkdir obj-$type
cd obj-$type
cat >> configure << 'EOF'
#!/bin/sh
exec ../configure "$@"
EOF
chmod +x configure
%configure --disable-dependency-tracking --disable-static \
--libdir=%{_libdir}/libfakeroot --with-ipc=$type --program-suffix=-$type
%configure \
--disable-dependency-tracking \
--disable-static \
--libdir=%{_libdir}/libfakeroot \
--with-ipc=$type \
--program-suffix=-$type
make
cd ..
done
%install
for type in sysv tcp; do
%make_install -C obj-$type libdir=%{_libdir}/libfakeroot
mv %{buildroot}%{_libdir}/libfakeroot/libfakeroot-{0,$type}.so
make -C obj-$type install libdir=%{_libdir}/libfakeroot DESTDIR=%{buildroot}
mv %{buildroot}%{_libdir}/libfakeroot/libfakeroot-0.so \
%{buildroot}%{_libdir}/libfakeroot/libfakeroot-$type.so
rm -f %{buildroot}%{_libdir}/libfakeroot/libfakeroot.so
%delete_la
rm -f %{buildroot}%{_libdir}/libfakeroot/libfakeroot.*la
%find_lang faked-$type --without-mo --with-man
%find_lang fakeroot-$type --without-mo --with-man
done
cat fake{d,root}-{sysv,tcp}.lang > fakeroot.lang
rm %{buildroot}%{_mandir}{,/*}/man1/fake{d,root}-sysv.1
rename -- -tcp '' %{buildroot}%{_mandir}{,/*}/man1/fake{d,root}-tcp.1
sed -e 's/-tcp//g' fake{d,root}-tcp.lang > fakeroot.lang
%check
make -C obj-sysv check VERBOSE=1
make -C obj-tcp check VERBOSE=1
%post
for name in fakeroot faked; do
link=$(readlink -e "/usr/bin/$name")
if [ "$link" = "/usr/bin/$name" ]; then
rm -f /usr/bin/$name
fi
for type in sysv tcp; do
make -C obj-$type check VERBOSE=1
done
%post
link=$(readlink -e "/usr/bin/fakeroot")
if [ "$link" = "/usr/bin/fakeroot" ]; then
rm -f /usr/bin/fakeroot
fi
link=$(readlink -e "%{_bindir}/faked")
if [ "$link" = "%{_bindir}/faked" ]; then
rm -f "%{_bindir}/faked"
fi
link=$(readlink -e "%{_libdir}/libfakeroot/libfakeroot-0.so")
if [ "$link" = "%{_libdir}/libfakeroot/libfakeroot-0.so" ]; then
rm -f "%{_libdir}/libfakeroot/libfakeroot-0.so"
fi
for type in tcp sysv; do
if [ "$type" = "tcp" ]; then
priority=50
else
priority=40
fi
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot "%{_bindir}/fakeroot-$type" $priority \
--slave %{_bindir}/faked faked %{_bindir}/faked-$type \
--slave %{_libdir}/libfakeroot/libfakeroot-0.so libfakeroot.so %{_libdir}/libfakeroot/libfakeroot-$type.so
done
%post help
for type in tcp sysv; do
if [ "$type" = "tcp" ]; then
priority=50
else
priority=40
fi
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot "%{_bindir}/fakeroot-$type" $priority \
--slave %{_mandir}/man1/fakeroot.1.gz fakeroot.1.gz %{_mandir}/man1/fakeroot-$type.1.gz \
--slave %{_mandir}/man1/faked.1.gz faked.1.gz %{_mandir}/man1/faked-$type.1.gz
done
for lang in de es fr nl pt sv; do
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot "%{_bindir}/fakeroot-tcp" 50 \
--slave %{_mandir}/$lang/man1/fakeroot.1.gz fakeroot.$lang.1.gz %{_mandir}/$lang/man1/fakeroot-tcp.1.gz \
--slave %{_mandir}/$lang/man1/faked.1.gz faked.$lang.1.gz %{_mandir}/$lang/man1/faked-tcp.1.gz
done
for lang in de es fr nl pt sv; do
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot "%{_bindir}/fakeroot-sysv" 40 \
--slave %{_mandir}/$lang/man1/fakeroot.1.gz fakeroot.$lang.1.gz %{_mandir}/$lang/man1/fakeroot-sysv.1.gz \
--slave %{_mandir}/$lang/man1/faked.1.gz faked.$lang.1.gz %{_mandir}/$lang/man1/faked-sysv.1.gz
done
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot \
"%{_bindir}/fakeroot-tcp" 50 \
--slave %{_bindir}/faked faked %{_bindir}/faked-tcp \
--slave %{_libdir}/libfakeroot/libfakeroot-0.so libfakeroot.so %{_libdir}/libfakeroot/libfakeroot-tcp.so
/usr/sbin/alternatives --install "%{_bindir}/fakeroot" fakeroot \
"%{_bindir}/fakeroot-sysv" 40 \
--slave %{_bindir}/faked faked %{_bindir}/faked-sysv \
--slave %{_libdir}/libfakeroot/libfakeroot-0.so libfakeroot.so %{_libdir}/libfakeroot/libfakeroot-sysv.so \
%preun
if [ $1 = 0 ]; then
@ -142,36 +116,37 @@ if [ $1 = 0 ]; then
/usr/sbin/alternatives --remove fakeroot "%{_bindir}/fakeroot-sysv"
fi
%files
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYING AUTHORS BUGS DEBUG
%doc COPYING AUTHORS BUGS DEBUG doc/README.saving
%{_bindir}/faked-*
%ghost %{_bindir}/faked
%{_bindir}/fakeroot-*
%ghost %{_bindir}/fakeroot
%{_mandir}/man1/faked.1*
%{_mandir}/man1/fakeroot.1*
%files libs
%dir %{_libdir}/libfakeroot
%{_libdir}/libfakeroot/libfakeroot-*.so
%{_libdir}/libfakeroot/libfakeroot-sysv.so
%{_libdir}/libfakeroot/libfakeroot-tcp.so
%ghost %{_libdir}/libfakeroot/libfakeroot-0.so
%files help
%doc doc/README.saving
%{_mandir}/man1/*
%{_mandir}/*/man1/*
%ghost %{_mandir}/man1/faked.1.gz
%ghost %{_mandir}/man1/fakeroot.1.gz
%ghost %lang(de) %{_mandir}/de/man1/faked.1.gz
%ghost %lang(de) %{_mandir}/de/man1/fakeroot.1.gz
%ghost %lang(es) %{_mandir}/es/man1/faked.1.gz
%ghost %lang(es) %{_mandir}/es/man1/fakeroot.1.gz
%ghost %lang(fr) %{_mandir}/fr/man1/faked.1.gz
%ghost %lang(fr) %{_mandir}/fr/man1/fakeroot.1.gz
%ghost %lang(pt) %{_mandir}/pt/man1/faked.1.gz
%ghost %lang(pt) %{_mandir}/pt/man1/fakeroot.1.gz
%ghost %lang(sv) %{_mandir}/sv/man1/faked.1.gz
%ghost %lang(sv) %{_mandir}/sv/man1/fakeroot.1.gz
%ghost %lang(nl) %{_mandir}/nl/man1/faked.1.gz
%ghost %lang(nl) %{_mandir}/nl/man1/fakeroot.1.gz
%changelog
* Wed Oct 19 2022 wuzx<wuzx1226@qq.com> - 1.25.2-4
- add sw64 patch
* Tue Jun 21 2022 liyanan <liyanan32@h-partners.com> - 1.25.2-3
- Skip tar test: the test is unstable and keeps on randomly failing
* Sat Mar 13 2021 shixuantong <shixuantong@huawei.com> - 1.25.2-2
- Fix error: '_STAT_VER' undeclared
* Fri Nov 20 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.25.2-1
- Update to 1.25.2
* Wed Aug 12 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 1.23-3
- remove four test cases to solve the compilation failure
* Fri Nov 29 2019 lihao <lihao129@huawei.com> - 1.23-2
- Package Init

Binary file not shown.