rpms/fakechroot/devel fakechroot-scandir.patch, NONE, 1.1 fakechroot.spec, 1.10, 1.11
Richard W.M. Jones
rjones at fedoraproject.org
Tue Apr 14 20:45:59 UTC 2009
- Previous message (by thread): rpms/moin/devel .cvsignore, 1.14, 1.15 README-rpm, 1.2, 1.3 moin.spec, 1.24, 1.25 sources, 1.14, 1.15
- Next message (by thread): rpms/rmol/F-9 import.log, NONE, 1.1 rmol.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: rjones
Update of /cvs/pkgs/rpms/fakechroot/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18936
Modified Files:
fakechroot.spec
Added Files:
fakechroot-scandir.patch
Log Message:
- Add fakechroot-scandir.patch to fix builds on Rawhide.
fakechroot-scandir.patch:
--- NEW FILE fakechroot-scandir.patch ---
Index: m4/scandir_argtypes.m4
===================================================================
--- m4/scandir_argtypes.m4 (revision 334)
+++ m4/scandir_argtypes.m4 (working copy)
@@ -12,7 +12,7 @@
for ac_arg1 in 'const char *dir'; do
for ac_arg2 in 'struct dirent ***namelist'; do
for ac_arg3 in 'int(*filter)(const struct dirent *)' 'int(*filter)(struct dirent *)'; do
- for ac_arg4 in 'int(*compar)(const void *,const void *)'; do
+ for ac_arg4 in 'int(*compar)(const void *,const void *)' 'int(*compar)(const struct dirent **, const struct dirent **)'; do
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[AC_INCLUDES_DEFAULT
@@ -46,3 +46,52 @@
[Define to the type of arg 4 for `scandir'.])
rm -f conftest*
])
+
+dnl AC_FUNC_SCANDIR64_ARGTYPES
+dnl -------------------------
+dnl Determine the correct type to be passed to each of the `scandir64'
+dnl function's arguments, and define those types in `SCANDIR64_TYPE_ARG1',
+dnl `SCANDIR64_TYPE_ARG2', `SCANDIR64_TYPE_ARG3' and `SCANDIR64_TYPE_ARG4'.
+AN_FUNCTION([scandir64], [AC_FUNC_SCANDIR64_ARGTYPES])
+AC_DEFUN([AC_FUNC_SCANDIR64_ARGTYPES],
+[AC_CHECK_HEADERS(dirent.h)
+AC_CACHE_CHECK([types of arguments for scandir64],
+[ac_cv_func_scandir64_args],
+[for ac_return in 'int'; do
+ for ac_arg1 in 'const char *dir'; do
+ for ac_arg2 in 'struct dirent64 ***namelist'; do
+ for ac_arg3 in 'int(*filter)(const struct dirent64 *)' 'int(*filter)(struct dirent64 *)'; do
+ for ac_arg4 in 'int(*compar)(const void *,const void *)' 'int(*compar)(const struct dirent64 **, const struct dirent64 **)'; do
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+[AC_INCLUDES_DEFAULT
+#ifdef HAVE_UNISTD_H
+#include <dirent.h>
+#endif
+],
+ [extern $ac_return scandir64 ($ac_arg1, $ac_arg2, $ac_arg3, $ac_arg4);])],
+ [ac_cv_func_scandir64_args="$ac_return;$ac_arg1;$ac_arg2;$ac_arg3;$ac_arg4"; break 5])
+ done
+ done
+ done
+ done
+done
+# Provide a safe default value.
+: ${ac_cv_func_scandir64_args='(default) int;const char *dir;struct dirent64 ***namelist;int(*filter)(const struct dirent64 *);int(*compar)(const void *,const void *)'}
+])
+ac_save_IFS=$IFS; IFS=';'
+set dummy `echo "$ac_cv_func_scandir64_args" | sed 's/^(default) //' | sed 's/\*/\*/g'`
+IFS=$ac_save_IFS
+shift
+AC_DEFINE_UNQUOTED(SCANDIR64_TYPE_RETURN, $[1],
+ [Define to the type of return value for `scandir64'.])
+AC_DEFINE_UNQUOTED(SCANDIR64_TYPE_ARG1, $[2],
+ [Define to the type of arg 1 for `scandir64'.])
+AC_DEFINE_UNQUOTED(SCANDIR64_TYPE_ARG2, $[3],
+ [Define to the type of arg 2 for `scandir64'.])
+AC_DEFINE_UNQUOTED(SCANDIR64_TYPE_ARG3, $[4],
+ [Define to the type of arg 3 for `scandir64'.])
+AC_DEFINE_UNQUOTED(SCANDIR64_TYPE_ARG4, $[5],
+ [Define to the type of arg 4 for `scandir64'.])
+rm -f conftest*
+])
Index: src/libfakechroot.c
===================================================================
--- src/libfakechroot.c (revision 334)
+++ src/libfakechroot.c (working copy)
@@ -512,10 +512,10 @@
#endif
static int (*next_rmdir) (const char *pathname) = NULL;
#ifdef HAVE_SCANDIR
-static int (*next_scandir) (const char *dir, struct dirent ***namelist, SCANDIR_TYPE_ARG3, int(*compar)(const void *, const void *)) = NULL;
+static int (*next_scandir) (SCANDIR_TYPE_ARG1, SCANDIR_TYPE_ARG2, SCANDIR_TYPE_ARG3, SCANDIR_TYPE_ARG4) = NULL;
#endif
#ifdef HAVE_SCANDIR64
-static int (*next_scandir64) (const char *dir, struct dirent64 ***namelist, int(*filter)(const struct dirent64 *), int(*compar)(const void *, const void *)) = NULL;
+static int (*next_scandir64) (SCANDIR64_TYPE_ARG1, SCANDIR64_TYPE_ARG2, SCANDIR64_TYPE_ARG3, SCANDIR64_TYPE_ARG4) = NULL;
#endif
#ifdef HAVE_SETXATTR
static int (*next_setxattr) (const char *path, const char *name, const void *value, size_t size, int flags) = NULL;
@@ -2619,7 +2619,7 @@
#ifdef HAVE_SCANDIR
/* #include <dirent.h> */
-int scandir (const char *dir, struct dirent ***namelist, SCANDIR_TYPE_ARG3, int(*compar)(const void *, const void *))
+int scandir (SCANDIR_TYPE_ARG1, SCANDIR_TYPE_ARG2, SCANDIR_TYPE_ARG3, SCANDIR_TYPE_ARG4)
{
char *fakechroot_path, *fakechroot_ptr, fakechroot_buf[FAKECHROOT_MAXPATH];
expand_chroot_path(dir, fakechroot_path, fakechroot_ptr, fakechroot_buf);
@@ -2631,7 +2631,7 @@
#ifdef HAVE_SCANDIR64
/* #include <dirent.h> */
-int scandir64 (const char *dir, struct dirent64 ***namelist, int(*filter)(const struct dirent64 *), int(*compar)(const void *, const void *))
+int scandir64 (SCANDIR64_TYPE_ARG1, SCANDIR64_TYPE_ARG2, SCANDIR64_TYPE_ARG3, SCANDIR64_TYPE_ARG4)
{
char *fakechroot_path, *fakechroot_ptr, fakechroot_buf[FAKECHROOT_MAXPATH];
expand_chroot_path(dir, fakechroot_path, fakechroot_ptr, fakechroot_buf);
Index: configure.ac
===================================================================
--- configure.ac (revision 334)
+++ configure.ac (working copy)
@@ -177,6 +177,7 @@
AC_FUNC_READLINK_ARGTYPES
AC_FUNC_SCANDIR_ARGTYPES
+AC_FUNC_SCANDIR64_ARGTYPES
AC_CONFIG_FILES([ \
Makefile \
Index: fakechroot.spec
===================================================================
RCS file: /cvs/pkgs/rpms/fakechroot/devel/fakechroot.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- fakechroot.spec 14 Apr 2009 05:01:18 -0000 1.10
+++ fakechroot.spec 14 Apr 2009 20:45:28 -0000 1.11
@@ -1,7 +1,7 @@
Summary: Gives a fake chroot environment
Name: fakechroot
Version: 2.9
-Release: 19%{?dist}
+Release: 20%{?dist}
License: LGPLv2+
Group: Development/Tools
URL: http://fakechroot.alioth.debian.org/
@@ -9,6 +9,12 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Requires: fakechroot-libs = %{version}-%{release}
+# Required for patch0:
+BuildRequires: autoconf, automake, libtool
+
+# Fix build problems with recent glibc. Sent upstream 20090414.
+Patch0: fakechroot-scandir.patch
+
%description
fakechroot runs a command in an environment were is additionally
possible to use the chroot(8) call without root privileges. This is
@@ -26,6 +32,11 @@
%prep
%setup -q
+%patch0 -p0
+
+# Patch0 updates autoconf, so rerun this:
+./autogen.sh
+
%build
%configure \
--disable-dependency-tracking \
@@ -37,13 +48,6 @@
make install DESTDIR=%{buildroot}
%check
-#currently broken (reported upstream):
-#cp: cannot stat `/bin/busybox': No such file or directory
-#cp: cannot stat `/bin/csh': No such file or directory
-#...
-#FAIL: t.echoarg
-#==================================
-#1 of 1 tests failed
make check
%clean
@@ -61,6 +65,9 @@
%{_libdir}/fakechroot/libfakechroot.so
%changelog
+* Tue Apr 14 2009 Richard W.M. Jones <rjones at redhat.com> - 2.9-20
+- Add fakechroot-scandir.patch to fix builds on Rawhide.
+
* Tue Apr 14 2009 Axel Thimm <Axel.Thimm at ATrpms.net> - 2.9-19
- Update to 2.9.
- Removed fakechroot-2.8-initsocketlen.patch (upstream now).
- Previous message (by thread): rpms/moin/devel .cvsignore, 1.14, 1.15 README-rpm, 1.2, 1.3 moin.spec, 1.24, 1.25 sources, 1.14, 1.15
- Next message (by thread): rpms/rmol/F-9 import.log, NONE, 1.1 rmol.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list