]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
patchelf: update 0.14.5 -> 0.15.0
authorAlexander Kanavin <alex.kanavin@gmail.com>
Thu, 11 Aug 2022 19:58:04 +0000 (21:58 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 14 Aug 2022 07:11:14 +0000 (08:11 +0100)
Rebase handle-read-only-files.patch

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch
meta/recipes-devtools/patchelf/patchelf_0.15.0.bb [moved from meta/recipes-devtools/patchelf/patchelf_0.14.5.bb with 91% similarity]

index b755a263a4ae5bf4434e86788b982e1f08b09a78..76ad8d9d4dc1e78e9ea9b5dbe20c0bd974ec677a 100644 (file)
@@ -1,4 +1,4 @@
-From 682fb48c137b687477008b68863c2a0b73ed47d1 Mon Sep 17 00:00:00 2001
+From 38b3d65f4a79d39ad9cdf841f2b3b29fd0c961ca Mon Sep 17 00:00:00 2001
 From: Fabio Berton <fabio.berton@ossystems.com.br>
 Date: Fri, 9 Sep 2016 16:00:42 -0300
 Subject: [PATCH] handle read-only files
@@ -9,37 +9,32 @@ https://github.com/darealshinji/patchelf/commit/40e66392bc4b96e9b4eda496827d2634
 Upstream-Status: Denied [https://github.com/NixOS/patchelf/pull/89]
 
 Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
-
 ---
- src/patchelf.cc | 16 +++++++++++++++-
- 1 file changed, 15 insertions(+), 1 deletion(-)
+ src/patchelf.cc | 18 +++++++++++++-----
+ 1 file changed, 13 insertions(+), 5 deletions(-)
 
-Index: git/src/patchelf.cc
-===================================================================
---- git.orig/src/patchelf.cc
-+++ git/src/patchelf.cc
-@@ -534,9 +534,19 @@ void ElfFile<ElfFileParamNames>::sortShd
+diff --git a/src/patchelf.cc b/src/patchelf.cc
+index 49accae..fb6c7ed 100644
+--- a/src/patchelf.cc
++++ b/src/patchelf.cc
+@@ -378,8 +378,16 @@ void ElfFile<ElfFileParamNames>::sortShdrs()
  
  static void writeFile(const std::string & fileName, const FileContents & contents)
  {
 +    struct stat st;
-+    int fd;
 +
      debug("writing %s\n", fileName.c_str());
  
--    int fd = open(fileName.c_str(), O_CREAT | O_TRUNC | O_WRONLY, 0777);
 +    if (stat(fileName.c_str(), &st) != 0)
 +        error("stat");
 +
 +    if (chmod(fileName.c_str(), 0600) != 0)
 +        error("chmod");
 +
-+    fd = open(fileName.c_str(), O_CREAT | O_TRUNC | O_WRONLY, 0777);
-+
+     int fd = open(fileName.c_str(), O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, 0777);
      if (fd == -1)
          error("open");
-@@ -551,8 +561,6 @@ static void writeFile(const std::string
+@@ -395,8 +403,6 @@ static void writeFile(const std::string & fileName, const FileContents & content
          bytesWritten += portion;
      }
  
@@ -48,7 +43,7 @@ Index: git/src/patchelf.cc
      /*
       * Just ignore EINTR; a retry loop is the wrong thing to do.
       *
-@@ -561,9 +569,11 @@ static void writeFile(const std::string
+@@ -405,9 +411,11 @@ static void writeFile(const std::string & fileName, const FileContents & content
       * http://utcc.utoronto.ca/~cks/space/blog/unix/CloseEINTR
       * https://sites.google.com/site/michaelsafyan/software-engineering/checkforeintrwheninvokingclosethinkagain
       */
@@ -63,3 +58,6 @@ Index: git/src/patchelf.cc
  }
  
  
+-- 
+2.30.2
+
similarity index 91%
rename from meta/recipes-devtools/patchelf/patchelf_0.14.5.bb
rename to meta/recipes-devtools/patchelf/patchelf_0.15.0.bb
index 0fa2c00f1d3bfa5606a9f31459e4a37109ece25a..389a0a9f4059c58b2a3fd49b5517528325f637f6 100644 (file)
@@ -7,7 +7,7 @@ LICENSE = "GPL-3.0-only"
 SRC_URI = "git://github.com/NixOS/patchelf;protocol=https;branch=master \
            file://handle-read-only-files.patch \
            "
-SRCREV = "a35054504293f9ff64539850d1ed0bfd2f5399f2"
+SRCREV = "49008002562355b0e35075cbc1c42c645ff04e28"
 
 S = "${WORKDIR}/git"