[arch-commits] Commit in fakechroot/trunk (3 files)
Allan McRae
allan at archlinux.org
Fri Feb 26 04:26:33 UTC 2010
Date: Thursday, February 25, 2010 @ 23:26:32
Author: allan
Revision: 70344
upgpkg: fakechroot 2.9-2
adjust ld.so.conf handling (FS#18238, FS#18454)
Added:
fakechroot/trunk/scandir-ftbfs-fakechroot.patch
Modified:
fakechroot/trunk/PKGBUILD
fakechroot/trunk/fakechroot.install
--------------------------------+
PKGBUILD | 20 ++++++--
fakechroot.install | 19 ++-----
scandir-ftbfs-fakechroot.patch | 96 +++++++++++++++++++++++++++++++++++++++
3 files changed, 120 insertions(+), 15 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2010-02-26 03:51:01 UTC (rev 70343)
+++ PKGBUILD 2010-02-26 04:26:32 UTC (rev 70344)
@@ -4,20 +4,34 @@
pkgname=fakechroot
pkgver=2.9
-pkgrel=1
+pkgrel=2
pkgdesc="Gives a fake chroot environment"
arch=('i686' 'x86_64')
url="http://fakechroot.alioth.debian.org"
license=('LGPL')
options=('!libtool')
install=fakechroot.install
-source=(http://ftp.debian.org/debian/pool/main/f/${pkgname}/${pkgname}_${pkgver}.orig.tar.gz)
-md5sums=('7b0048e50a6309acf0dda4e547735022')
+source=(http://ftp.debian.org/debian/pool/main/f/${pkgname}/${pkgname}_${pkgver}.orig.tar.gz
+ scandir-ftbfs-fakechroot.patch)
+md5sums=('7b0048e50a6309acf0dda4e547735022'
+ '4ae8011f3e050ce87e5d5112d1d8acf7')
build()
{
cd ${srcdir}/${pkgname}-${pkgver}
+ patch -Np1 -i $srcdir/scandir-ftbfs-fakechroot.patch
+ sed -i "s#1.10#1.11#" autogen.sh
+ ./autogen.sh
+
./configure --prefix=/usr --libdir=/usr/lib/libfakeroot
make || return 1
+}
+
+package()
+{
+ cd ${srcdir}/${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
+
+ install -dm755 ${pkgdir}/etc/ld.so.conf.d/
+ echo '/usr/lib/libfakeroot/fakechroot/' > ${pkgdir}/etc/ld.so.conf.d/fakechroot.conf
}
Modified: fakechroot.install
===================================================================
--- fakechroot.install 2010-02-26 03:51:01 UTC (rev 70343)
+++ fakechroot.install 2010-02-26 04:26:32 UTC (rev 70344)
@@ -1,19 +1,14 @@
post_install() {
- if [ ! "`grep /usr/lib/libfakechroot etc/ld.so.conf`" ]; then
- echo -n "updating /etc/ld.so.conf... "
- echo "/usr/lib/libfakechroot" >>etc/ld.so.conf
- sbin/ldconfig -r .
- echo "done."
- fi
+ sbin/ldconfig -r .
}
post_upgrade() {
- post_install $1
+ if [ "$(vercmp $2 2.9-2)" -lt 0 ]; then
+ sed -i -e '/\/usr\/lib\/libfakechroot/d' etc/ld.so.conf
+ fi
+ sbin/ldconfig -r .
}
-pre_remove() {
- echo -ne "\nupdating /etc/ld.so.conf... "
- sed -i -e '/\/usr\/lib\/libfakechroot/d' etc/ld.so.conf
- sbin/ldconfig -r .
- echo "done."
+post_remove() {
+ sbin/ldconfig -r .
}
Added: scandir-ftbfs-fakechroot.patch
===================================================================
--- scandir-ftbfs-fakechroot.patch (rev 0)
+++ scandir-ftbfs-fakechroot.patch 2010-02-26 04:26:32 UTC (rev 70344)
@@ -0,0 +1,96 @@
+diff -ur -x Makefile.in -x Makefile.am -x config.sub -x config.guess -x config.h.in -x configure -x aclocal.m4 -x debian/ -x ltmain.sh -x fakechroot.1 -x changelog -x control -x rules fakechroot-2.9.orig2/configure.ac fakechroot-2.9/configure.ac
+--- fakechroot-2.9.orig2/configure.ac 2009-03-19 17:06:47.000000000 +0200
++++ fakechroot-2.9/configure.ac 2010-01-07 22:54:45.000000000 +0200
+@@ -177,6 +177,7 @@
+
+ AC_FUNC_READLINK_ARGTYPES
+ AC_FUNC_SCANDIR_ARGTYPES
++AC_FUNC_SCANDIR64_ARGTYPES
+
+ AC_CONFIG_FILES([ \
+ Makefile \
+diff -ur -x Makefile.in -x Makefile.am -x config.sub -x config.guess -x config.h.in -x configure -x aclocal.m4 -x debian/ -x ltmain.sh -x fakechroot.1 -x changelog -x control -x rules fakechroot-2.9.orig2/m4/scandir_argtypes.m4 fakechroot-2.9/m4/scandir_argtypes.m4
+--- fakechroot-2.9.orig2/m4/scandir_argtypes.m4 2009-03-19 16:43:19.000000000 +0200
++++ fakechroot-2.9/m4/scandir_argtypes.m4 2010-01-07 23:05:13.000000000 +0200
+@@ -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,51 @@
+ [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 *)'; 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*
++])
+diff -ur -x Makefile.in -x Makefile.am -x config.sub -x config.guess -x config.h.in -x configure -x aclocal.m4 -x debian/ -x ltmain.sh -x fakechroot.1 -x changelog -x control -x rules fakechroot-2.9.orig2/src/libfakechroot.c fakechroot-2.9/src/libfakechroot.c
+--- fakechroot-2.9.orig2/src/libfakechroot.c 2009-03-31 13:20:41.000000000 +0300
++++ fakechroot-2.9/src/libfakechroot.c 2010-01-07 22:55:37.000000000 +0200
+@@ -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 (const char *dir, struct dirent ***namelist, 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 (const char *dir, struct dirent64 ***namelist, int(*filter)(const struct dirent64 *), SCANDIR64_TYPE_ARG4)
+ {
+ char *fakechroot_path, *fakechroot_ptr, fakechroot_buf[FAKECHROOT_MAXPATH];
+ expand_chroot_path(dir, fakechroot_path, fakechroot_ptr, fakechroot_buf);
More information about the arch-commits
mailing list