[oe-commits] Tom Rini : file: Fix relocation patch
git version control
git at git.openembedded.org
Tue Jun 28 16:30:01 UTC 2011
Module: openembedded.git
Branch: master
Commit: d8f645c96f4239c0a69ebc4da67c7f2f67cf895a
URL: http://git.openembedded.org/?p=openembedded.git&a=commit;h=d8f645c96f4239c0a69ebc4da67c7f2f67cf895a
Author: Tom Rini <tom_rini at mentor.com>
Date: Tue Jun 28 09:20:36 2011 -0700
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 at mentor.com>
---
recipes/file/file-5.05/reloc.patch | 16 ++++++++++------
recipes/file/file_5.05.bb | 4 +++-
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 576d4e3..3633117 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 04fa3e6..b23c320 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"
More information about the Openembedded-commits
mailing list