aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Rini <tom_rini@mentor.com>2011-06-28 09:20:36 -0700
committerTom Rini <tom_rini@mentor.com>2011-06-28 09:28:30 -0700
commitd8f645c96f4239c0a69ebc4da67c7f2f67cf895a (patch)
tree6ce40f72c0af6af44010ef5eceb14e68d3b3c66f
parent82c21e61d122e3c92fb86831bc1170263310acad (diff)
downloadopenembedded-d8f645c96f4239c0a69ebc4da67c7f2f67cf895a.tar.gz
file: Fix relocation patch
We weren't calling the correct binreloc function (and we needed to add /misc to the path we got) and we need to pass in ENABLE_BINRELOC to have the changes take effect. Finally, add in a new patch header. Signed-off-by: Tom Rini <tom_rini@mentor.com>
-rw-r--r--recipes/file/file-5.05/reloc.patch16
-rw-r--r--recipes/file/file_5.05.bb4
2 files changed, 13 insertions, 7 deletions
diff --git a/recipes/file/file-5.05/reloc.patch b/recipes/file/file-5.05/reloc.patch
index 576d4e3acd..3633117438 100644
--- a/recipes/file/file-5.05/reloc.patch
+++ b/recipes/file/file-5.05/reloc.patch
@@ -1,9 +1,13 @@
+Make use of BinReloc (http://autopackage.org/docs/binreloc/) for both
+finding libmagic as well as the 'magic' file that's used to determie
+what a file really is.
+
---
- src/Makefile.am | 2
+ src/Makefile.am | 3
src/binreloc.c | 791 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
src/binreloc.h | 81 +++++
- src/magic.c | 27 +
- 4 files changed, 891 insertions(+), 10 deletions(-)
+ src/magic.c | 26 +
+ 4 files changed, 893 insertions(+), 8 deletions(-)
Index: file-5.05/src/binreloc.c
===================================================================
@@ -924,9 +928,9 @@ Index: file-5.05/src/magic.c
+ }
+
+ if (br_init_lib(&error) == 1) {
-+ char *etcdir = br_find_etc_dir(NULL);
-+ (void)snprintf(default_magic, sizeof(default_magic), "%s/magic", etcdir);
-+ free(etcdir);
++ char *datadir = br_find_data_dir(NULL);
++ (void)snprintf(default_magic, sizeof(default_magic), "%s/misc/magic", datadir);
++ free(datadir);
+ return default_magic;
+ }
+ return MAGIC;
diff --git a/recipes/file/file_5.05.bb b/recipes/file/file_5.05.bb
index 04fa3e6d3d..b23c32006e 100644
--- a/recipes/file/file_5.05.bb
+++ b/recipes/file/file_5.05.bb
@@ -1,9 +1,11 @@
require file.inc
DEPENDS_virtclass-native += "zlib-native"
-PR = "${INCPR}.0"
+PR = "${INCPR}.1"
SRC_URI += "file://reloc.patch"
+BUILD_CFLAGS += "-DENABLE_BINRELOC"
+
SRC_URI[md5sum] = "0b429063710457be2bd17a18389cb018"
SRC_URI[sha256sum] = "5cb47845d91848e2b8eb58935766f93d8a2ecf665b33be7317f1849d3c46e1b7"