Skip to contentSkip to conversation

patchelf: Upgrade 0.9 -> 0.10

PATCH New Alex Kiernan 1 participant 1 message May 5, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 patchelf: Upgrade 0.9 -> 0.10

Drop patches merged (or redone differently) upstream

---

 .../patchelf/Increase-maxSize-to-64MB.patch   |  46 -----
 .../Skip-empty-section-fixes-66.patch         |  30 ----
 .../patchelf/patchelf/avoidholes.patch        | 163 ------------------
 .../patchelf/fix-adjusting-startPage.patch    |  15 +-
 .../patchelf/handle-read-only-files.patch     |  17 +-
 .../{patchelf_0.9.bb => patchelf_0.10.bb}     |   9 +-
 6 files changed, 21 insertions(+), 259 deletions(-)
 delete mode 100644 meta/recipes-devtools/patchelf/patchelf/Increase-maxSize-to-64MB.patch
 delete mode 100644 meta/recipes-devtools/patchelf/patchelf/Skip-empty-section-fixes-66.patch
 delete mode 100644 meta/recipes-devtools/patchelf/patchelf/avoidholes.patch
 rename meta/recipes-devtools/patchelf/{patchelf_0.9.bb => patchelf_0.10.bb} (58%)
meta/recipes-devtools/patchelf/patchelf/Increase-maxSize-to-64MB.patch deleted +0 -46
deleted file mode 100644
index 49050a18d278..000000000000
@@ -1,46 +0,0 @@
-From e3658740ec100e4c8cf83295460b032979e1a99a Mon Sep 17 00:00:00 2001
-From: Fabio Berton <[email protected]>
-Date: Fri, 9 Sep 2016 18:21:32 -0300
-Subject: [PATCH] Increase maxSize to 64MB
-Organization: O.S. Systems Software LTDA.
-
-Fix error:
-
-/
-|ERROR: qemu-native-2.5.0-r1 do_populate_sysroot_setscene: '('patchelf-uninative',
-|'--set-interpreter', '../build/tmp/sysroots-uninative/x86_64-linux/lib/
-|ld-linux-x86-64.so.2', '../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
-|sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64')'
-|failed with exit code 1 and the following output:
-|warning: working around a Linux kernel bug by creating a hole of 36032512
-|bytes in ‘../build/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/
-|sstate-install-populate_sysroot/x86_64-linux/usr/bin/qemu-mips64’
-|maximum file size exceeded
-\
-
-Similar issue is discussed here:
-https://github.com/NixOS/patchelf/issues/47
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Fabio Berton <[email protected]>
----
- src/patchelf.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/patchelf.cc b/src/patchelf.cc
-index a59c12d..0fd7355 100644
---- a/src/patchelf.cc
-+++ b/src/patchelf.cc
-@@ -279,7 +279,7 @@ static void readFile(string fileName)
-     struct stat st;
-     if (stat(fileName.c_str(), &st) != 0) error("stat");
-     fileSize = st.st_size;
--    maxSize = fileSize + 32 * 1024 * 1024;
-+    maxSize = fileSize + 64 * 1024 * 1024;
- 
-     contents = (unsigned char *) malloc(fileSize + maxSize);
-     if (!contents) abort();
--- 
-2.1.4
-
meta/recipes-devtools/patchelf/patchelf/Skip-empty-section-fixes-66.patch deleted +0 -30
deleted file mode 100644
index 9ee8a554a7ff..000000000000
@@ -1,30 +0,0 @@
-From 73526cb546ae6b00ea6169e40b01fb7b5f0dbb50 Mon Sep 17 00:00:00 2001
-From: Fabio Berton <[email protected]>
-Date: Thu, 28 Jul 2016 11:05:06 -0300
-Subject: [PATCH] Skip empty section (fixes #66)
-Organization: O.S. Systems Software LTDA.
-
-Upstream-Status: Pending
-
-Signed-off-by: Fabio Berton <[email protected]>
----
- src/patchelf.cc | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/patchelf.cc b/src/patchelf.cc
-index 136098f..2677a26 100644
---- a/src/patchelf.cc
-+++ b/src/patchelf.cc
-@@ -684,6 +684,9 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsExecutable()
-     for (unsigned int i = 1; i <= lastReplaced; ++i) {
-         Elf_Shdr & shdr(shdrs[i]);
-         string sectionName = getSectionName(shdr);
-+        if (sectionName == "") {
-+            continue;
-+        }
-         debug("looking at section `%s'\n", sectionName.c_str());
-         /* !!! Why do we stop after a .dynstr section? I can't
-            remember! */
--- 
-2.1.4
-
meta/recipes-devtools/patchelf/patchelf/avoidholes.patch deleted +0 -163

163 lines not on this page · raw message

meta/recipes-devtools/patchelf/patchelf/fix-adjusting-startPage.patch +11 -4
index f64cbed5cb19..a0988423feea 100644
@@ -1,6 +1,9 @@
+From 1630d3f846c7721b1e7cd3b005bb2b34816e1d0f Mon Sep 17 00:00:00 2001
+From: Ed Bartosh <[email protected]>
+Date: Fri, 21 Jul 2017 12:33:53 +0300
+Subject: [PATCH] patchelf: fix segfault for binaries linked by gold
+
 commit 1cc234fea5600190d872329aca60e2365cefc39e
-Author: Ed Bartosh <[email protected]>
-Date:   Fri Jul 21 12:33:53 2017 +0300
 
 fix adjusting startPage
 
@@ -19,11 +22,15 @@ Github PR: https://github.com/NixOS/patchelf/pull/127
 
 Upstream-Status: Submitted
 
+---
+ src/patchelf.cc | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
 diff --git a/src/patchelf.cc b/src/patchelf.cc
-index cbd36c0..e9d7ea5 100644
+index a63e3a11c61f..2483d25d78f1 100644
 --- a/src/patchelf.cc
 +++ b/src/patchelf.cc
-@@ -720,10 +720,8 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsLibrary()
+@@ -756,10 +756,8 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsLibrary()
         since DYN executables tend to start at virtual address 0, so
         rewriteSectionsExecutable() won't work because it doesn't have
         any virtual address space to grow downwards into. */
meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch +7 -10
index 9fafec4b592a..5069bd4b0d7d 100644
@@ -1,26 +1,26 @@
-From 2a603acb65993698c21f1c6eb7664f93ad830d52 Mon Sep 17 00:00:00 2001
+From 7f1fd10cfebd5ea2f3e1938abe1bd1c4828164a7 Mon Sep 17 00:00:00 2001
 From: Fabio Berton <[email protected]>
 Date: Fri, 9 Sep 2016 16:00:42 -0300
 Subject: [PATCH] handle read-only files
-Organization: O.S. Systems Software LTDA.
 
 Patch from:
 https://github.com/darealshinji/patchelf/commit/40e66392bc4b96e9b4eda496827d26348a503509
 
-Upstream-Status: Pending
+Upstream-Status: Rejected [https://github.com/NixOS/patchelf/pull/89]
 
 Signed-off-by: Fabio Berton <[email protected]>
+
 ---
  src/patchelf.cc | 16 +++++++++++++++-
  1 file changed, 15 insertions(+), 1 deletion(-)
 
 diff --git a/src/patchelf.cc b/src/patchelf.cc
-index 136098f..aea360e 100644
+index 0b4965adff83..b5db2aef0e8a 100644
 --- a/src/patchelf.cc
 +++ b/src/patchelf.cc
-@@ -388,7 +388,17 @@ void ElfFile<ElfFileParamNames>::sortShdrs()
+@@ -497,7 +497,17 @@ void ElfFile<ElfFileParamNames>::sortShdrs()
  
- static void writeFile(string fileName)
+ static void writeFile(std::string fileName, FileContents contents)
  {
 -    int fd = open(fileName.c_str(), O_TRUNC | O_WRONLY);
 +    struct stat st;
@@ -37,7 +37,7 @@ index 136098f..aea360e 100644
      if (fd == -1)
          error("open");
  
-@@ -397,6 +407,10 @@ static void writeFile(string fileName)
+@@ -511,6 +521,10 @@ static void writeFile(std::string fileName, FileContents contents)
  
      if (close(fd) != 0)
          error("close");
@@ -48,6 +48,3 @@ index 136098f..aea360e 100644
  }
  
  
--- 
-2.1.4
-
meta/recipes-devtools/patchelf/patchelf_0.10.bb renamed from meta/recipes-devtools/patchelf/patchelf_0.9.bb +3 -6
similarity index 58%
rename from meta/recipes-devtools/patchelf/patchelf_0.9.bb
rename to meta/recipes-devtools/patchelf/patchelf_0.10.bb
index d70303963c42..580108e8b8ad 100644
@@ -1,16 +1,13 @@
 SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \
-           file://Skip-empty-section-fixes-66.patch \
            file://handle-read-only-files.patch \
-           file://Increase-maxSize-to-64MB.patch \
-           file://avoidholes.patch \
            file://fix-adjusting-startPage.patch \
-"
+           "
 
 LICENSE = "GPLv3"
 SUMMARY = "Tool to allow editing of RPATH and interpreter fields in ELF binaries"
 
-SRC_URI[md5sum] = "d02687629c7e1698a486a93a0d607947"
-SRC_URI[sha256sum] = "a0f65c1ba148890e9f2f7823f4bedf7ecad5417772f64f994004f59a39014f83"
+SRC_URI[md5sum] = "6c3f3a06a95705870d129494a6880106"
+SRC_URI[sha256sum] = "f670cd462ac7161588c28f45349bc20fb9bd842805e3f71387a320e7a9ddfcf3"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
Signature · 1 line
2.17.1