summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/attr
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/attr')
-rw-r--r--meta/recipes-support/attr/acl.inc26
-rw-r--r--meta/recipes-support/attr/acl_2.2.49.bb3
-rw-r--r--meta/recipes-support/attr/attr-2.4.44/double-free.patch18
-rw-r--r--meta/recipes-support/attr/attr-2.4.44/memory-leak-in-copy.patch50
-rw-r--r--meta/recipes-support/attr/attr-2.4.44/memory-leak2.patch18
-rw-r--r--meta/recipes-support/attr/attr-2.4.44/pull-in-string.h.patch21
-rw-r--r--meta/recipes-support/attr/attr-2.4.44/thinko-in-restore.patch19
-rw-r--r--meta/recipes-support/attr/attr.inc20
-rw-r--r--meta/recipes-support/attr/attr_2.4.44.bb9
-rw-r--r--meta/recipes-support/attr/ea-acl.inc35
-rw-r--r--meta/recipes-support/attr/files/relative-libdir.patch23
11 files changed, 242 insertions, 0 deletions
diff --git a/meta/recipes-support/attr/acl.inc b/meta/recipes-support/attr/acl.inc
new file mode 100644
index 0000000000..68745dd728
--- /dev/null
+++ b/meta/recipes-support/attr/acl.inc
@@ -0,0 +1,26 @@
1DESCRIPTION = "utilities for access control list"
2HOMEPAGE = "http://savannah.nongnu.org/projects/acl/"
3SECTION = "libs"
4
5LICENSE = "LGPLv2.1+ & GPLv2+"
6LICENSE_${PN} = "GPLv2+"
7LICENSE_lib${PN} = "LGPLv2.1+"
8LIC_FILES_CHKSUM = "file://doc/COPYING;md5=c781d70ed2b4d48995b790403217a249 \
9 file://doc/COPYING.LGPL;md5=9e9a206917f8af112da634ce3ab41764"
10
11DEPENDS = "attr"
12SRC_URI = "http://mirror.cinquix.com/pub/savannah/acl/${BP}.src.tar.gz"
13
14require ea-acl.inc
15
16# avoid RPATH hardcode to staging dir
17do_configure_append() {
18 sed -i ${S}/config.status -e s,^\\\(hardcode_into_libs=\\\).*$,\\1\'no\',
19 ${S}/config.status
20}
21
22# libdir should point to .la
23do_install_append() {
24 sed -i ${D}${libdir}/libacl.la -e \
25 s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
26}
diff --git a/meta/recipes-support/attr/acl_2.2.49.bb b/meta/recipes-support/attr/acl_2.2.49.bb
new file mode 100644
index 0000000000..e5d5509de1
--- /dev/null
+++ b/meta/recipes-support/attr/acl_2.2.49.bb
@@ -0,0 +1,3 @@
1require acl.inc
2
3PR = "r0"
diff --git a/meta/recipes-support/attr/attr-2.4.44/double-free.patch b/meta/recipes-support/attr/attr-2.4.44/double-free.patch
new file mode 100644
index 0000000000..6fc684f6c2
--- /dev/null
+++ b/meta/recipes-support/attr/attr-2.4.44/double-free.patch
@@ -0,0 +1,18 @@
1commit 5b28eb3b0e0430ce6af28edc9100ca23299d1218
2Author: Kamil Dudka <kdudka@redhat.com>
3Date: Thu Jun 3 15:29:54 2010 +0200
4
5 attr_parse_attr_conf: eliminate a double free
6
7diff --git a/libattr/attr_copy_action.c b/libattr/attr_copy_action.c
8index 030bbf5..2697328 100644
9--- a/libattr/attr_copy_action.c
10+++ b/libattr/attr_copy_action.c
11@@ -81,6 +81,7 @@ repeat:
12 fclose(file);
13 file = NULL;
14 free(text);
15+ text = NULL;
16 size_guess *= 2;
17 goto repeat;
18 }
diff --git a/meta/recipes-support/attr/attr-2.4.44/memory-leak-in-copy.patch b/meta/recipes-support/attr/attr-2.4.44/memory-leak-in-copy.patch
new file mode 100644
index 0000000000..966632d87e
--- /dev/null
+++ b/meta/recipes-support/attr/attr-2.4.44/memory-leak-in-copy.patch
@@ -0,0 +1,50 @@
1commit 972b42a67393f762936e74d3ce929914181f5f28
2Author: Brandon Philips <brandon@ifup.org>
3Date: Thu Dec 17 17:15:57 2009 -0800
4
5 libattr: fix memory leak in attr_copy_action()
6
7 stanse found that attr_copy_action returns before freeing the memory
8 allocated for text.
9
10 Move fopen() above the malloc so this is not a problem.
11
12 Fixes this bug:
13 https://bugzilla.novell.com/show_bug.cgi?id=564735
14
15 Signed-off-by: Brandon Philips <bphilips@suse.de>
16
17diff --git a/libattr/attr_copy_action.c b/libattr/attr_copy_action.c
18index 0d7aca5..dc94224 100644
19--- a/libattr/attr_copy_action.c
20+++ b/libattr/attr_copy_action.c
21@@ -53,7 +53,7 @@ free_attr_actions(void)
22 static int
23 attr_parse_attr_conf(struct error_context *ctx)
24 {
25- char *text, *t;
26+ char *text = NULL, *t;
27 size_t size_guess = 4096, len;
28 FILE *file;
29 char *pattern = NULL;
30@@ -64,15 +64,16 @@ attr_parse_attr_conf(struct error_context *ctx)
31 return 0;
32
33 repeat:
34- text = malloc(size_guess + 1);
35- if (!text)
36- goto fail;
37-
38 if ((file = fopen(ATTR_CONF, "r")) == NULL) {
39 if (errno == ENOENT)
40 return 0;
41 goto fail;
42 }
43+
44+ text = malloc(size_guess + 1);
45+ if (!text)
46+ goto fail;
47+
48 len = fread(text, 1, size_guess, file);
49 if (ferror(file))
50 goto fail;
diff --git a/meta/recipes-support/attr/attr-2.4.44/memory-leak2.patch b/meta/recipes-support/attr/attr-2.4.44/memory-leak2.patch
new file mode 100644
index 0000000000..03395423da
--- /dev/null
+++ b/meta/recipes-support/attr/attr-2.4.44/memory-leak2.patch
@@ -0,0 +1,18 @@
1commit 42f50a130d144ffbc01738f15da9d4f1b57505bd
2Author: Kamil Dudka <kdudka@redhat.com>
3Date: Thu Jun 3 15:23:04 2010 +0200
4
5 attr_parse_attr_conf: eliminate a memory leak
6
7diff --git a/libattr/attr_copy_action.c b/libattr/attr_copy_action.c
8index dc94224..030bbf5 100644
9--- a/libattr/attr_copy_action.c
10+++ b/libattr/attr_copy_action.c
11@@ -129,6 +129,7 @@ repeat:
12
13 t += strcspn(t, "\n");
14 }
15+ free(text);
16 return 0;
17
18 parse_error:
diff --git a/meta/recipes-support/attr/attr-2.4.44/pull-in-string.h.patch b/meta/recipes-support/attr/attr-2.4.44/pull-in-string.h.patch
new file mode 100644
index 0000000000..ccbc236284
--- /dev/null
+++ b/meta/recipes-support/attr/attr-2.4.44/pull-in-string.h.patch
@@ -0,0 +1,21 @@
1commit 235cdd2af498d288f1af1142e7a23fbd16dff907
2Author: Mike Frysinger <vapier@gentoo.org>
3Date: Fri Jan 8 21:53:19 2010 -0500
4
5 quote: pull in string.h for strchr prototype
6
7 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
8 Signed-off-by: Brandon Philips <brandon@ifup.org>
9
10diff --git a/libmisc/quote.c b/libmisc/quote.c
11index f98c887..bf8f9eb 100644
12--- a/libmisc/quote.c
13+++ b/libmisc/quote.c
14@@ -20,6 +20,7 @@
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <ctype.h>
18+#include <string.h>
19 #include "misc.h"
20
21 const char *quote(const char *str, const char *quote_chars)
diff --git a/meta/recipes-support/attr/attr-2.4.44/thinko-in-restore.patch b/meta/recipes-support/attr/attr-2.4.44/thinko-in-restore.patch
new file mode 100644
index 0000000000..a84de94ed0
--- /dev/null
+++ b/meta/recipes-support/attr/attr-2.4.44/thinko-in-restore.patch
@@ -0,0 +1,19 @@
1commit e8d568c696692eed5c92d5a35498e1c26e13d6b3
2Author: Kamil Dudka <kdudka@redhat.com>
3Date: Thu Jun 3 15:30:19 2010 +0200
4
5 setfattr.c: fix thinko in restore()
6
7diff --git a/setfattr/setfattr.c b/setfattr/setfattr.c
8index 491c25a..0a14cfa 100644
9--- a/setfattr/setfattr.c
10+++ b/setfattr/setfattr.c
11@@ -120,7 +120,7 @@ int restore(const char *filename)
12 break;
13 line++;
14 if (strncmp(l, "# file: ", 8) != 0) {
15- if (filename) {
16+ if (file != stdin) {
17 fprintf(stderr, _("%s: %s: No filename found "
18 "in line %d, aborting\n"),
19 progname, filename, backup_line);
diff --git a/meta/recipes-support/attr/attr.inc b/meta/recipes-support/attr/attr.inc
new file mode 100644
index 0000000000..da7924631e
--- /dev/null
+++ b/meta/recipes-support/attr/attr.inc
@@ -0,0 +1,20 @@
1DESCRIPTION = "utilities for manipulating filesystem extended attributes"
2HOMEPAGE = "http://savannah.nongnu.org/projects/attr/"
3SECTION = "libs"
4
5LICENSE = "LGPLv2.1+ & GPLv2+"
6LICENSE_${PN} = "GPLv2+"
7LICENSE_lib${PN} = "LGPLv2.1+"
8LIC_FILES_CHKSUM = "file://doc/COPYING;md5=2d0aa14b3fce4694e4f615e30186335f \
9 file://attr/attr.c;endline=17;md5=be0403261f0847e5f43ed5b08d19593c \
10 file://libattr/libattr.c;endline=17;md5=7970f77049f8fa1199fff62a7ab724fb"
11
12SRC_URI = "http://nongnu.askapache.com/attr/${BP}.src.tar.gz"
13
14require ea-acl.inc
15
16# libdir should point to .la
17do_install_append() {
18 sed -i ${D}${libdir}/libattr.la -e \
19 s,^libdir=\'${base_libdir}\'$,libdir=\'${libdir}\',
20}
diff --git a/meta/recipes-support/attr/attr_2.4.44.bb b/meta/recipes-support/attr/attr_2.4.44.bb
new file mode 100644
index 0000000000..0b21b33dcf
--- /dev/null
+++ b/meta/recipes-support/attr/attr_2.4.44.bb
@@ -0,0 +1,9 @@
1require attr.inc
2
3PR = "r1"
4
5SRC_URI += "file://memory-leak-in-copy.patch \
6 file://memory-leak2.patch \
7 file://double-free.patch \
8 file://pull-in-string.h.patch \
9 file://thinko-in-restore.patch"
diff --git a/meta/recipes-support/attr/ea-acl.inc b/meta/recipes-support/attr/ea-acl.inc
new file mode 100644
index 0000000000..77fa2b4fd6
--- /dev/null
+++ b/meta/recipes-support/attr/ea-acl.inc
@@ -0,0 +1,35 @@
1# this build system is mostly shared by attr and acl
2
3DEPENDS =+ "gettext"
4
5SRC_URI += "file://relative-libdir.patch;striplevel=0"
6
7inherit autotools
8
9# the package comes with a custom config.h.in, it cannot be
10# overwritten by autoheader
11export AUTOHEADER = "true"
12EXTRA_OECONF = "INSTALL_USER=root INSTALL_GROUP=root"
13
14EXTRA_OEMAKE = "PKG_LIB_DIR=${base_libdir} PKG_DEVLIB_DIR=${libdir}"
15
16do_install () {
17 oe_runmake install install-lib install-dev DIST_ROOT="${D}"
18}
19
20PACKAGES =+ "lib${PN} lib${PN}-dev lib${PN}-doc"
21
22FILES_lib${PN} = "${base_libdir}/lib*.so.*"
23
24FILES_lib${PN}-dev = "${includedir} \
25 ${libdir}/lib*.so \
26 ${libdir}/lib*.a \
27 ${libdir}/lib*.la \
28 ${base_libdir}/lib*.so \
29 ${base_libdir}/lib*.a \
30 ${base_libdir}/lib*.la"
31
32FILES_lib${PN}-doc = "${mandir}/man2 \
33 ${mandir}/man3"
34
35BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/attr/files/relative-libdir.patch b/meta/recipes-support/attr/files/relative-libdir.patch
new file mode 100644
index 0000000000..f989dd0ccc
--- /dev/null
+++ b/meta/recipes-support/attr/files/relative-libdir.patch
@@ -0,0 +1,23 @@
1use relative path in symbolic links, or it fails in staging
2sed expression from udev
3
47/29/2010 - created by Qing He <qing.he@intel.com>
5
6diff -u include.orig/buildmacros include/buildmacros
7--- include.orig/buildmacros 2010-07-29 17:39:48.000000000 +0800
8+++ include/buildmacros 2010-07-29 18:20:34.000000000 +0800
9@@ -88,9 +88,11 @@
10 ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
11 ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \
12 if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \
13- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
14- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
15- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
16+ rel_lib_prefix=$$(echo $(PKG_LIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
17+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
18+ ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
19+ rel_devlib_prefix=$$(echo $(PKG_DEVLIB_DIR) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \
20+ ../$(INSTALL) -S $$rel_devlib_prefix$(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
21 fi
22 else
23 INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)