Accepting request 879703 from home:cgiboudeaux:branches:devel:tools
- Add upstream changes to fix build with glibc 2.33: * 0001-glibc-2.33-compatibility-fixes.patch OBS-URL: https://build.opensuse.org/request/show/879703 OBS-URL: https://build.opensuse.org/package/show/devel:tools/fakeroot?expand=0&rev=27
This commit is contained in:
parent
f003e4a113
commit
d72c7412fd
250
0001-glibc-2.33-compatibility-fixes.patch
Normal file
250
0001-glibc-2.33-compatibility-fixes.patch
Normal file
@ -0,0 +1,250 @@
|
|||||||
|
From f91abea8f685776a29d40382a35301f6980c953b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
Date: Wed, 17 Mar 2021 15:53:12 +0100
|
||||||
|
Subject: [PATCH] glibc 2.33 compatibility fixes
|
||||||
|
|
||||||
|
Source: https://salsa.debian.org/clint/fakeroot/-/merge_requests/10
|
||||||
|
---
|
||||||
|
configure.ac | 17 +++++------
|
||||||
|
libfakeroot.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++--
|
||||||
|
wrapawk_macosx | 10 +++++--
|
||||||
|
wrapfunc.inp | 4 +--
|
||||||
|
4 files changed, 94 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 73415d2..35f9ecf 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -146,6 +146,7 @@ for first in size_t int; do
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#include <unistd.h>
|
||||||
|
+#include <stdio.h>
|
||||||
|
#ifdef HAVE_GRP_H
|
||||||
|
#include <grp.h>
|
||||||
|
#endif
|
||||||
|
@@ -183,13 +184,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 +211,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 *])
|
||||||
|
|
||||||
|
])
|
||||||
|
|
||||||
|
diff --git a/libfakeroot.c b/libfakeroot.c
|
||||||
|
index 7f13286..c7014aa 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.
|
||||||
|
@@ -112,8 +122,16 @@
|
||||||
|
#define INT_SEND_STAT(a,b) SEND_STAT(a,b,_STAT_VER)
|
||||||
|
#define INT_SEND_GET_XATTR(a,b) SEND_GET_XATTR(a,b,_STAT_VER)
|
||||||
|
#define INT_SEND_GET_STAT(a,b) SEND_GET_STAT(a,b)
|
||||||
|
+
|
||||||
|
+/* 10.10 uses id_t in getpriority/setpriority calls, so pretend
|
||||||
|
+ id_t is used everywhere, just happens to be int on some OSes */
|
||||||
|
+#ifndef _ID_T
|
||||||
|
+#define _ID_T
|
||||||
|
+typedef int id_t;
|
||||||
|
+#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include <sys/types.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <sys/ipc.h>
|
||||||
|
#include <sys/msg.h>
|
||||||
|
@@ -125,7 +143,6 @@
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <errno.h>
|
||||||
|
-#include <sys/types.h>
|
||||||
|
#ifdef HAVE_SYS_ACL_H
|
||||||
|
#include <sys/acl.h>
|
||||||
|
#endif /* HAVE_SYS_ACL_H */
|
||||||
|
@@ -188,6 +205,15 @@ extern int unsetenv (const char *name);
|
||||||
|
#undef __lxstat64
|
||||||
|
#undef _FILE_OFFSET_BITS
|
||||||
|
|
||||||
|
+
|
||||||
|
+#ifndef AT_EMPTY_PATH
|
||||||
|
+#define AT_EMPTY_PATH 0
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#ifndef AT_NO_AUTOMOUNT
|
||||||
|
+#define AT_NO_AUTOMOUNT 0
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
// next_wrap_st:
|
||||||
|
// this structure is used in next_wrap, which is defined in
|
||||||
|
@@ -1342,6 +1368,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)
|
||||||
|
{
|
||||||
|
@@ -1911,7 +1985,7 @@ ssize_t fremovexattr(int fd, const char *name)
|
||||||
|
}
|
||||||
|
#endif /* HAVE_FREMOVEXATTR */
|
||||||
|
|
||||||
|
-int setpriority(int which, int who, int prio){
|
||||||
|
+int setpriority(int which, id_t who, int prio){
|
||||||
|
if (fakeroot_disabled)
|
||||||
|
return next_setpriority(which, who, prio);
|
||||||
|
next_setpriority(which, who, prio);
|
||||||
|
diff --git a/wrapawk_macosx b/wrapawk_macosx
|
||||||
|
index 088a7f4..f783219 100644
|
||||||
|
--- a/wrapawk_macosx
|
||||||
|
+++ b/wrapawk_macosx
|
||||||
|
@@ -46,26 +46,30 @@ BEGIN{
|
||||||
|
argtype=$3;
|
||||||
|
argname=$4;
|
||||||
|
MACRO=$5;
|
||||||
|
+ argtype_def=$6
|
||||||
|
+ if(!argtype_def) {
|
||||||
|
+ argtype_def = argtype
|
||||||
|
+ }
|
||||||
|
if(MACRO){
|
||||||
|
print "extern " ret " MY_DEF(" name ")" argtype " __attribute__((visibility(\"hidden\")));" > headerfile;
|
||||||
|
print "INTERPOSE(MY_DEF(" name "_RAW)," name "_RAW);" > structfile;
|
||||||
|
print "#undef " name > deffile
|
||||||
|
print "#define " name " MY_DEF(" name "_RAW)" > deffile
|
||||||
|
|
||||||
|
- print "extern " ret, name, argtype ";" > tmpffile;
|
||||||
|
+ print "extern " ret, name, argtype_def ";" > tmpffile;
|
||||||
|
print "static __inline__ " ret " NEXT_" MACRO "_NOARG " argtype " __attribute__((always_inline));" > tmpffile;
|
||||||
|
print "static __inline__ " ret " NEXT_" MACRO "_NOARG " argtype " {" > tmpffile;
|
||||||
|
print " return " name, argname ";" > tmpffile;
|
||||||
|
print "}" > tmpffile;
|
||||||
|
print "" > tmpffile;
|
||||||
|
} else {
|
||||||
|
- print "extern " ret " my_" name, argtype " __attribute__((visibility(\"hidden\")));" > headerfile;
|
||||||
|
+ print "extern " ret " my_" name, argtype_def " __attribute__((visibility(\"hidden\")));" > headerfile;
|
||||||
|
print "#undef " name > structfile;
|
||||||
|
print "INTERPOSE(my_" name "," name ");" > structfile;
|
||||||
|
print "#define " name " my_" name > structfile
|
||||||
|
print "#define " name " my_" name > deffile
|
||||||
|
|
||||||
|
- print "extern " ret, name, argtype ";" > tmpffile;
|
||||||
|
+ print "extern " ret, name, argtype_def ";" > tmpffile;
|
||||||
|
if(argname){
|
||||||
|
print "static __inline__ " ret " next_" name, argtype " __attribute__((always_inline));" > tmpffile;
|
||||||
|
print "static __inline__ " ret " next_" name, argtype " {" > tmpffile;
|
||||||
|
diff --git a/wrapfunc.inp b/wrapfunc.inp
|
||||||
|
index f7ad186..556af34 100644
|
||||||
|
--- a/wrapfunc.inp
|
||||||
|
+++ b/wrapfunc.inp
|
||||||
|
@@ -146,7 +146,7 @@ setfsgid;gid_t;(gid_t fsgid);(fsgid)
|
||||||
|
initgroups;int;(const char *user, INITGROUPS_SECOND_ARG group);(user, group)
|
||||||
|
getgroups;int;(int size, gid_t list[]);(size, list)
|
||||||
|
setgroups;int;(SETGROUPS_SIZE_TYPE size, const gid_t *list);(size, list)
|
||||||
|
-setpriority;int;(int which, int who, int prio);(which, who, prio)
|
||||||
|
+setpriority;int;(int which, id_t who, int prio);(which, who, prio)
|
||||||
|
#ifdef HAVE_CAPSET
|
||||||
|
capset;int;(cap_user_header_t hdrp, const cap_user_data_t datap);(hdrp, datap)
|
||||||
|
#endif /* HAVE_CAPSET */
|
||||||
|
@@ -198,7 +198,7 @@ fchownat;int;(int dir_fd, const char *path, uid_t owner, gid_t group, int flags)
|
||||||
|
mkdirat;int;(int dir_fd, const char *pathname, mode_t mode);(dir_fd, pathname, mode)
|
||||||
|
#endif /* HAVE_MKDIRAT */
|
||||||
|
#ifdef HAVE_OPENAT
|
||||||
|
-openat;int;(int dir_fd, const char *pathname, int flags);(dir_fd, pathname, flags)
|
||||||
|
+openat;int;(int dir_fd, const char *pathname, int flags, mode_t mode);(dir_fd, pathname, flags, mode);;(int dir_fd, const char *pathname, int flags, ...)
|
||||||
|
#endif /* HAVE_OPENAT */
|
||||||
|
#ifdef HAVE_RENAMEAT
|
||||||
|
renameat;int;(int olddir_fd, const char *oldpath, int newdir_fd, const char *newpath);(olddir_fd, oldpath, newdir_fd, newpath)
|
||||||
|
--
|
||||||
|
2.30.2
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 17 14:56:05 UTC 2021 - Christophe Giboudeaux <christophe@krop.fr>
|
||||||
|
|
||||||
|
- Add upstream changes to fix build with glibc 2.33:
|
||||||
|
* 0001-glibc-2.33-compatibility-fixes.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Oct 30 10:47:10 UTC 2020 - Paolo Stivanin <info@paolostivanin.com>
|
Fri Oct 30 10:47:10 UTC 2020 - Paolo Stivanin <info@paolostivanin.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package fakeroot
|
# spec file for package fakeroot
|
||||||
#
|
#
|
||||||
# Copyright (c) 2020 SUSE LLC
|
# Copyright (c) 2021 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -26,10 +26,12 @@ URL: http://fakeroot.alioth.debian.org/
|
|||||||
Source0: http://ftp.debian.org/debian/pool/main/f/fakeroot/%{name}_%{version}.orig.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: http://ftp.debian.org/debian/pool/main/f/fakeroot/%{name}_%{version}.orig.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
Source99: baselibs.conf
|
Source99: baselibs.conf
|
||||||
Patch0: %{name}-1.20-lib32.patch
|
Patch0: %{name}-1.20-lib32.patch
|
||||||
Patch2: %{name}-1.20-eglibc-fts-without-LFS.patch
|
Patch1: %{name}-1.20-eglibc-fts-without-LFS.patch
|
||||||
# PATCH-FIX-UPSTREAM fakeroot-1.21-fix-shell-in-fakeroot.patch (deb#828810)
|
# PATCH-FIX-UPSTREAM fakeroot-1.21-fix-shell-in-fakeroot.patch (deb#828810)
|
||||||
Patch4: %{name}-1.21-fix-shell-in-fakeroot
|
Patch2: %{name}-1.21-fix-shell-in-fakeroot
|
||||||
Patch5: fakeroot-drop-tartest.patch
|
Patch3: fakeroot-drop-tartest.patch
|
||||||
|
# PATCH-FIX-UPSTREAM
|
||||||
|
Patch4: 0001-glibc-2.33-compatibility-fixes.patch
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
# user(daemon)/group(sys) is required for t.tar testsuite
|
# user(daemon)/group(sys) is required for t.tar testsuite
|
||||||
@ -106,9 +108,9 @@ mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|||||||
touch %{buildroot}%{_sysconfdir}/alternatives/{faked,fakeroot}{,.1%{ext_man}}
|
touch %{buildroot}%{_sysconfdir}/alternatives/{faked,fakeroot}{,.1%{ext_man}}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if %{suse_version} < 1315
|
%if 0%{?suse_version} < 1315
|
||||||
for type in sysv tcp; do
|
for type in sysv tcp; do
|
||||||
make %{?_smp_mflags} -C obj-$type check
|
%make_build -C obj-$type check
|
||||||
done
|
done
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user