Add sw64 architecture

Signed-off-by: wzx <wuzx1226@qq.com>
This commit is contained in:
wzx 2022-10-19 16:50:54 +08:00
parent 226bbefcf0
commit f3d1bec68e
2 changed files with 131 additions and 1 deletions

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];
+ };

View File

@ -2,7 +2,7 @@
Summary: Gives a fake root environment Summary: Gives a fake root environment
Name: fakeroot Name: fakeroot
Version: 1.25.2 Version: 1.25.2
Release: 3 Release: 4
License: GPLv3+ and LGPLv2.1 and MIT and GPL+ License: GPLv3+ and LGPLv2.1 and MIT and GPL+
URL: https://tracker.debian.org/pkg/fakeroot URL: https://tracker.debian.org/pkg/fakeroot
Source0: http://salsa.debian.org/clint/fakeroot/-/archive/upstream/1.25.2/%{name}-upstream-%{version}.tar.gz Source0: http://salsa.debian.org/clint/fakeroot/-/archive/upstream/1.25.2/%{name}-upstream-%{version}.tar.gz
@ -15,6 +15,9 @@ Patch6000: backport-define-_STAT_VER-if-not-already-defined.patch
Patch6001: backport-add-wrappers-for-new-glibc-2.33+-symbols.patch Patch6001: backport-add-wrappers-for-new-glibc-2.33+-symbols.patch
Patch6002: backport-fix-compile-error-with-DEBUG-enabled.patch Patch6002: backport-fix-compile-error-with-DEBUG-enabled.patch
Patch6003: backport-fix-__xmknod-at-pointer-argument.patch Patch6003: backport-fix-__xmknod-at-pointer-argument.patch
%ifarch sw_64
Patch6004: fakeroot-upstream-1.25.2-sw.patch
%endif
%if %{with autoconf} %if %{with autoconf}
BuildRequires: autoconf automake libtool po4a BuildRequires: autoconf automake libtool po4a
%endif %endif
@ -130,6 +133,9 @@ fi
%ghost %{_libdir}/libfakeroot/libfakeroot-0.so %ghost %{_libdir}/libfakeroot/libfakeroot-0.so
%changelog %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 * 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 - Skip tar test: the test is unstable and keeps on randomly failing