summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-08-11 21:58:04 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-14 08:13:32 +0100
commit51aa1c66ddedf3a6b915a464fe3f70924fd5a480 (patch)
tree197446061df30e7712eacc784f86368c2b7ccc94 /meta/recipes-devtools
parent4675bd334958e9a839f8b23dee1824d67ecabc04 (diff)
downloadpoky-51aa1c66ddedf3a6b915a464fe3f70924fd5a480.tar.gz
patchelf: update 0.14.5 -> 0.15.0
Rebase handle-read-only-files.patch (From OE-Core rev: 0b2f8da3ff9cbbb6fc2ab75fbe09ad1fe745c53b) 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>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch30
-rw-r--r--meta/recipes-devtools/patchelf/patchelf_0.15.0.bb (renamed from meta/recipes-devtools/patchelf/patchelf_0.14.5.bb)2
2 files changed, 15 insertions, 17 deletions
diff --git a/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch b/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch
index b755a263a4..76ad8d9d4d 100644
--- a/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch
+++ b/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch
@@ -1,4 +1,4 @@
1From 682fb48c137b687477008b68863c2a0b73ed47d1 Mon Sep 17 00:00:00 2001 1From 38b3d65f4a79d39ad9cdf841f2b3b29fd0c961ca Mon Sep 17 00:00:00 2001
2From: Fabio Berton <fabio.berton@ossystems.com.br> 2From: Fabio Berton <fabio.berton@ossystems.com.br>
3Date: Fri, 9 Sep 2016 16:00:42 -0300 3Date: Fri, 9 Sep 2016 16:00:42 -0300
4Subject: [PATCH] handle read-only files 4Subject: [PATCH] handle read-only files
@@ -9,37 +9,32 @@ https://github.com/darealshinji/patchelf/commit/40e66392bc4b96e9b4eda496827d2634
9Upstream-Status: Denied [https://github.com/NixOS/patchelf/pull/89] 9Upstream-Status: Denied [https://github.com/NixOS/patchelf/pull/89]
10 10
11Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> 11Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
12
13--- 12---
14 src/patchelf.cc | 16 +++++++++++++++- 13 src/patchelf.cc | 18 +++++++++++++-----
15 1 file changed, 15 insertions(+), 1 deletion(-) 14 1 file changed, 13 insertions(+), 5 deletions(-)
16 15
17Index: git/src/patchelf.cc 16diff --git a/src/patchelf.cc b/src/patchelf.cc
18=================================================================== 17index 49accae..fb6c7ed 100644
19--- git.orig/src/patchelf.cc 18--- a/src/patchelf.cc
20+++ git/src/patchelf.cc 19+++ b/src/patchelf.cc
21@@ -534,9 +534,19 @@ void ElfFile<ElfFileParamNames>::sortShd 20@@ -378,8 +378,16 @@ void ElfFile<ElfFileParamNames>::sortShdrs()
22 21
23 static void writeFile(const std::string & fileName, const FileContents & contents) 22 static void writeFile(const std::string & fileName, const FileContents & contents)
24 { 23 {
25+ struct stat st; 24+ struct stat st;
26+ int fd;
27+ 25+
28 debug("writing %s\n", fileName.c_str()); 26 debug("writing %s\n", fileName.c_str());
29 27
30- int fd = open(fileName.c_str(), O_CREAT | O_TRUNC | O_WRONLY, 0777);
31+ if (stat(fileName.c_str(), &st) != 0) 28+ if (stat(fileName.c_str(), &st) != 0)
32+ error("stat"); 29+ error("stat");
33+ 30+
34+ if (chmod(fileName.c_str(), 0600) != 0) 31+ if (chmod(fileName.c_str(), 0600) != 0)
35+ error("chmod"); 32+ error("chmod");
36+ 33+
37+ fd = open(fileName.c_str(), O_CREAT | O_TRUNC | O_WRONLY, 0777); 34 int fd = open(fileName.c_str(), O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, 0777);
38+
39 if (fd == -1) 35 if (fd == -1)
40 error("open"); 36 error("open");
41 37@@ -395,8 +403,6 @@ static void writeFile(const std::string & fileName, const FileContents & content
42@@ -551,8 +561,6 @@ static void writeFile(const std::string
43 bytesWritten += portion; 38 bytesWritten += portion;
44 } 39 }
45 40
@@ -48,7 +43,7 @@ Index: git/src/patchelf.cc
48 /* 43 /*
49 * Just ignore EINTR; a retry loop is the wrong thing to do. 44 * Just ignore EINTR; a retry loop is the wrong thing to do.
50 * 45 *
51@@ -561,9 +569,11 @@ static void writeFile(const std::string 46@@ -405,9 +411,11 @@ static void writeFile(const std::string & fileName, const FileContents & content
52 * http://utcc.utoronto.ca/~cks/space/blog/unix/CloseEINTR 47 * http://utcc.utoronto.ca/~cks/space/blog/unix/CloseEINTR
53 * https://sites.google.com/site/michaelsafyan/software-engineering/checkforeintrwheninvokingclosethinkagain 48 * https://sites.google.com/site/michaelsafyan/software-engineering/checkforeintrwheninvokingclosethinkagain
54 */ 49 */
@@ -63,3 +58,6 @@ Index: git/src/patchelf.cc
63 } 58 }
64 59
65 60
61--
622.30.2
63
diff --git a/meta/recipes-devtools/patchelf/patchelf_0.14.5.bb b/meta/recipes-devtools/patchelf/patchelf_0.15.0.bb
index 0fa2c00f1d..389a0a9f40 100644
--- a/meta/recipes-devtools/patchelf/patchelf_0.14.5.bb
+++ b/meta/recipes-devtools/patchelf/patchelf_0.15.0.bb
@@ -7,7 +7,7 @@ LICENSE = "GPL-3.0-only"
7SRC_URI = "git://github.com/NixOS/patchelf;protocol=https;branch=master \ 7SRC_URI = "git://github.com/NixOS/patchelf;protocol=https;branch=master \
8 file://handle-read-only-files.patch \ 8 file://handle-read-only-files.patch \
9 " 9 "
10SRCREV = "a35054504293f9ff64539850d1ed0bfd2f5399f2" 10SRCREV = "49008002562355b0e35075cbc1c42c645ff04e28"
11 11
12S = "${WORKDIR}/git" 12S = "${WORKDIR}/git"
13 13