Commit 1e5e2252 authored by Fabian's avatar Fabian

added forgotten patch files

parent 9f6a0362
From e65bf287f0133426b26611fe3e80b51267987106 Mon Sep 17 00:00:00 2001
From: Dave Reisner <dreisner@archlinux.org>
Date: Thu, 21 Feb 2013 19:01:06 -0500
Subject: [PATCH] mtree: fix line filename length calculation. Fixes #301.
Signed-off-by: Andres Mejia <amejia004@gmail.com>
---
libarchive/archive_write_set_format_mtree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libarchive/archive_write_set_format_mtree.c b/libarchive/archive_write_set_format_mtree.c
index 9c0613c..f37f723 100644
--- a/libarchive/archive_write_set_format_mtree.c
+++ b/libarchive/archive_write_set_format_mtree.c
@@ -1855,9 +1855,9 @@ mtree_entry_setup_filenames(struct archive_write *a, struct mtree_entry *file,
return (ret);
}
- /* Make a basename from dirname and slash */
+ /* Make a basename from file->parentdir.s and slash */
*slash = '\0';
- file->parentdir.length = slash - dirname;
+ file->parentdir.length = slash - file->parentdir.s;
archive_strcpy(&(file->basename), slash + 1);
return (ret);
}
--
1.8.1.4
Submitted By: Armin K. <krejzi at email dot com>
Date: 2012-04-06
Initial Package Version: 2.4.30
Upstream Status: Unknown
Origin: Debian
Description: This patch enables symbol versioning in ldap libraries. Without this
patch some applications might generate a warning about missing symbol
versions.
--- openldap.orig/build/openldap.m4 2012-02-29 18:37:09.000000000 +0100
+++ openldap/build/openldap.m4 2012-04-01 17:29:50.973881411 +0200
@@ -1136,3 +1136,54 @@
#endif
], [ol_cv_ssl_crl_compat=yes], [ol_cv_ssl_crl_compat=no])])
])
+
+dnl ====================================================================
+dnl check for symbol versioning support
+AC_DEFUN([OL_SYMBOL_VERSIONING],
+[AC_CACHE_CHECK([for .symver assembler directive],
+ [ol_cv_asm_symver_directive],[
+cat > conftest.s <<EOF
+${libc_cv_dot_text}
+_sym:
+.symver _sym,sym@VERS
+EOF
+if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
+ ol_cv_asm_symver_directive=yes
+else
+ ol_cv_asm_symver_directive=no
+fi
+rm -f conftest*])
+AC_CACHE_CHECK([for ld --version-script],
+ [ol_cv_ld_version_script_option],[
+if test $ol_cv_asm_symver_directive = yes; then
+ cat > conftest.s <<EOF
+${libc_cv_dot_text}
+_sym:
+.symver _sym,sym@VERS
+EOF
+ cat > conftest.map <<EOF
+VERS_1 {
+ global: sym;
+};
+
+VERS_2 {
+ global: sym;
+} VERS_1;
+EOF
+ if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
+ if AC_TRY_COMMAND([${CC-cc} $CFLAGS $LDFLAGS -shared
+ -o conftest.so conftest.o
+ -Wl,--version-script,conftest.map
+ 1>&AS_MESSAGE_LOG_FD]);
+ then
+ ol_cv_ld_version_script_option=yes
+ else
+ ol_cv_ld_version_script_option=no
+ fi
+ else
+ ol_cv_ld_version_script_option=no
+ fi
+else
+ ol_cv_ld_version_script_option=no
+fi
+rm -f conftest*])])
--- openldap.orig/build/top.mk 2012-02-29 18:37:09.000000000 +0100
+++ openldap/build/top.mk 2012-04-01 17:29:50.972881390 +0200
@@ -104,6 +104,9 @@
# LINK_LIBS referenced in library and module link commands.
LINK_LIBS = $(MOD_LIBS) $(@PLAT@_LINK_LIBS)
+# option to pass to $(CC) to support library symbol versioning, if any
+VERSION_OPTION = @VERSION_OPTION@
+
LTSTATIC = @LTSTATIC@
LTLINK = $(LIBTOOL) --mode=link \
@@ -113,7 +116,7 @@
$(CC) $(LT_CFLAGS) $(LT_CPPFLAGS) $(LIB_DEFS) -c
LTLINK_LIB = $(LIBTOOL) $(LTONLY_LIB) --mode=link \
- $(CC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS_LIB)
+ $(CC) $(LT_CFLAGS) $(LDFLAGS) $(LTFLAGS_LIB) $(VERSION_FLAGS)
LTCOMPILE_MOD = $(LIBTOOL) $(LTONLY_MOD) --mode=compile \
$(CC) $(LT_CFLAGS) $(LT_CPPFLAGS) $(MOD_DEFS) -c
--- openldap.orig/configure.in 2012-02-29 18:37:09.000000000 +0100
+++ openldap/configure.in 2012-04-01 17:29:50.981881580 +0200
@@ -1907,6 +1907,13 @@
fi
AC_SUBST(LTSTATIC)dnl
+VERSION_OPTION=""
+OL_SYMBOL_VERSIONING
+if test $ol_cv_ld_version_script_option = yes ; then
+ VERSION_OPTION="-Wl,--version-script="
+fi
+AC_SUBST(VERSION_OPTION)
+
dnl ----------------------------------------------------------------
if test $ol_enable_wrappers != no ; then
AC_CHECK_HEADERS(tcpd.h,[
--- openldap.orig/libraries/liblber/liblber.map 1970-01-01 01:00:00.000000000 +0100
+++ openldap/libraries/liblber/liblber.map 2012-04-01 17:29:50.983881622 +0200
@@ -0,0 +1,8 @@
+OPENLDAP_2.4_2 {
+ global:
+ ber_*;
+ der_alloc;
+ lutil_*;
+ local:
+ *;
+};
--- openldap.orig/libraries/liblber/Makefile.in 2012-04-01 17:27:12.042526978 +0200
+++ openldap/libraries/liblber/Makefile.in 2012-04-01 17:29:50.982881601 +0200
@@ -38,6 +38,9 @@
XXLIBS =
NT_LINK_LIBS = $(AC_LIBS)
UNIX_LINK_LIBS = $(AC_LIBS)
+ifneq (,$(VERSION_OPTION))
+ VERSION_FLAGS = "$(VERSION_OPTION)$(srcdir)/liblber.map"
+endif
dtest: $(XLIBS) dtest.o
$(LTLINK) -o $@ dtest.o $(LIBS)
--- openldap.orig/libraries/libldap/libldap.map 1970-01-01 01:00:00.000000000 +0100
+++ openldap/libraries/libldap/libldap.map 2012-04-01 17:29:50.981881580 +0200
@@ -0,0 +1,7 @@
+OPENLDAP_2.4_2 {
+ global:
+ ldap_*;
+ ldif_*;
+ local:
+ *;
+};
--- openldap.orig/libraries/libldap/Makefile.in 2012-04-01 17:27:12.043527000 +0200
+++ openldap/libraries/libldap/Makefile.in 2012-04-01 17:29:50.982881601 +0200
@@ -52,6 +52,9 @@
XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
NT_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
+ifneq (,$(VERSION_OPTION))
+ VERSION_FLAGS = $(VERSION_OPTION)$(srcdir)/libldap.map
+endif
apitest: $(XLIBS) apitest.o
$(LTLINK) -o $@ apitest.o $(LIBS)
--- openldap.orig/libraries/libldap_r/Makefile.in 2012-04-01 17:27:12.043527000 +0200
+++ openldap/libraries/libldap_r/Makefile.in 2012-04-01 17:29:50.971881369 +0200
@@ -61,6 +61,9 @@
XXXLIBS = $(LTHREAD_LIBS)
NT_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS) $(LTHREAD_LIBS)
+ifneq (,$(VERSION_OPTION))
+ VERSION_FLAGS = "$(VERSION_OPTION)$(XXDIR)/libldap.map"
+endif
.links : Makefile
@for i in $(XXSRCS); do \
--- modules/pam_unix/pam_unix_passwd.c
+++ modules/pam_unix/pam_unix_passwd.c
@@ -54,6 +54,7 @@
#include <ctype.h>
#include <sys/time.h>
#include <sys/stat.h>
+#include <sys/resource.h>
#include <signal.h>
#include <errno.h>
Index: pam_unix2-2.9.1/src/read-files.c
===================================================================
--- pam_unix2-2.9.1.orig/src/read-files.c
+++ pam_unix2-2.9.1/src/read-files.c
@@ -30,8 +30,14 @@
#include <errno.h>
#include <fcntl.h>
#include <nss.h>
-#include <bits/libc-lock.h>
+#include <pthread.h>
#define __libc_lock_t pthread_mutex_t
+#define __libc_lock_define_initialized(CLASS,NAME) \
+ CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER;
+#define __libc_lock_lock(NAME) \
+ pthread_mutex_lock, (&(NAME))
+#define __libc_lock_unlock(NAME) \
+ pthread_mutex_unlock, (&(NAME))
#include "read-files.h"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment