Re: [Rpm-maint] [rpm-software-management/rpm] Add armv5tl support (#179)

2017-03-20 Thread ニール・ゴンパ
@ignatenkobrain `armv5tl` is the base armv5 architecture without any 
extensions. There's not much "real" hardware using "just" this, but it provides 
maximal compatibility across the 32-bit ARM ecosystem today, as it's a 
soft-float arch with just the common subset of instructions supported by all 
ARM architectures in use today.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/179#issuecomment-287763120___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [PATCH] build/files.c: Only check build-ids for executable files in the main package.

2017-03-20 Thread Mark Wielaard
From: Mark Wielaard 

generateBuildIDs should mimic what find-debuginfo.sh does. Only check
build-ids for executable files in non-debuginfo packages. This moves the
isDbg check up so the is executeble check can be done when the file is
part of the main package.

This fixes the build of qemu and uboot-tools in fedora. Both ship
non-executable ELF bios files in architecture specific packages.
https://bugzilla.redhat.com/show_bug.cgi?id=1433837

Signed-off-by: Mark Wielaard 
---
 build/files.c | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/build/files.c b/build/files.c
index 6021643..afa01cd 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1711,6 +1711,19 @@ static int generateBuildIDs(FileList fl)
 for (i = 0, flp = fl->files.recs; i < fl->files.used; i++, flp++) {
struct stat sbuf;
if (lstat(flp->diskPath, ) == 0 && S_ISREG (sbuf.st_mode)) {
+   /* We determine whether this is a main or
+  debug ELF based on path.  */
+   #define DEBUGPATH "/usr/lib/debug/"
+   int isDbg = strncmp (flp->cpioPath,
+DEBUGPATH, strlen (DEBUGPATH)) == 0;
+
+   /* For the main package files mimic what find-debuginfo.sh does.
+  Only check build-ids for executable files. Debug files are
+  always non-executable. */
+   if (!isDbg
+   && (sbuf.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) == 0)
+ continue;
+
int fd = open (flp->diskPath, O_RDONLY);
if (fd >= 0) {
/* Only real ELF files, that are ET_EXEC, ET_DYN or
@@ -1732,12 +1745,8 @@ static int generateBuildIDs(FileList fl)
   is 128 bits) and 64 bytes (largest sha3 is 512
   bits), common is 20 bytes (sha1 is 160 bits). */
if (len >= 16 && len <= 64) {
-   /* We determine whether this is a main or
-  debug ELF based on path.  */
-   #define DEBUGPATH "/usr/lib/debug/"
int addid = 0;
-   if (strncmp (flp->cpioPath,
-DEBUGPATH, strlen (DEBUGPATH)) == 0) {
+   if (isDbg) {
needDbg = 1;
addid = 1;
}
-- 
1.8.3.1

___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [PATCH] tests/rpmbuildid.at: Make file sed regexp more strict to extract BuildID.

2017-03-20 Thread Mark Wielaard
From: Mark Wielaard 

Like commit f0a5819 for rpmbuild.at. In the case of rpmbuildid.at the
sed expression looked to work, but only matched by accident. Make the sed
regexp more strict by only matching a hex-string. And properly "escape"
[ and ] which inside an AT_CHECK should be [[ and ]].

Signed-off-by: Mark Wielaard 
---
 tests/rpmbuildid.at | 44 ++--
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/tests/rpmbuildid.at b/tests/rpmbuildid.at
index 15c0620..1c06ca1 100644
--- a/tests/rpmbuildid.at
+++ b/tests/rpmbuildid.at
@@ -97,7 +97,7 @@ main_file=./usr/local/bin/hello
 test -f "${main_file}" || echo "No main file ${main_file}"
 
 # Extract the build-id from the main file
-id_main=$(file $main_file | sed 's/.*, BuildID[.*]=\(.*\),.*/\1/')
+id_main=$(file $main_file | sed 's/.*, BuildID\[[.*\]]=\([[0-9a-f]]*\),.*/\1/')
 
 id_main_file="./usr/lib/debug/.build-id/${id_main:0:2}/${id_main:2}"
 test -L "$id_main_file" || echo "No build-id file $id_main_file"
@@ -120,7 +120,7 @@ debug_file=./usr/lib/debug/usr/local/bin/hello.debug
 test -f ${debug_file} || echo "No debug file ${debug_file}"
 
 # Extract the build-id from the .debug file
-id_debug=$(file $debug_file | sed 's/.*, BuildID[.*]=\(.*\),.*/\1/')
+id_debug=$(file $debug_file | sed 's/.*, 
BuildID\[[.*\]]=\([[0-9a-f]]*\),.*/\1/')
 
 test ${id_main} = ${id_debug} || echo "unequal main and debug id"
 
@@ -190,7 +190,7 @@ main_file=./usr/local/bin/hello
 test -f "${main_file}" || echo "No main file ${main_file}"
 
 # Extract the build-id from the main file
-id_main=$(file $main_file | sed 's/.*, BuildID[.*]=\(.*\),.*/\1/')
+id_main=$(file $main_file | sed 's/.*, BuildID\[[.*\]]=\([[0-9a-f]]*\),.*/\1/')
 
 id_main_file="./usr/lib/debug/.build-id/${id_main:0:2}/${id_main:2}"
 test -L "$id_main_file" || echo "No build-id file $id_main_file"
@@ -213,7 +213,7 @@ debug_file=./usr/lib/debug/usr/local/bin/hello-*.debug
 test -f ${debug_file} || echo "No debug file ${debug_file}"
 
 # Extract the build-id from the .debug file
-id_debug=$(file $debug_file | sed 's/.*, BuildID[.*]=\(.*\),.*/\1/')
+id_debug=$(file $debug_file | sed 's/.*, 
BuildID\[[.*\]]=\([[0-9a-f]]*\),.*/\1/')
 
 test ${id_main} = ${id_debug} || echo "unequal main and debug id"
 
@@ -283,7 +283,7 @@ main_file=./usr/local/bin/hello
 test -f "${main_file}" || echo "No main file ${main_file}"
 
 # Extract the build-id from the main file
-id_main=$(file $main_file | sed 's/.*, BuildID[.*]=\(.*\),.*/\1/')
+id_main=$(file $main_file | sed 's/.*, BuildID\[[.*\]]=\([[0-9a-f]]*\),.*/\1/')
 
 id_main_file="./usr/lib/.build-id/${id_main:0:2}/${id_main:2}"
 test -L "$id_main_file" || echo "No build-id file $id_main_file"
@@ -306,7 +306,7 @@ debug_file=./usr/lib/debug/usr/local/bin/hello.debug
 test -f ${debug_file} || echo "No debug file ${debug_file}"
 
 # Extract the build-id from the .debug file
-id_debug=$(file $debug_file | sed 's/.*, BuildID[.*]=\(.*\),.*/\1/')
+id_debug=$(file $debug_file | sed 's/.*, 
BuildID\[[.*\]]=\([[0-9a-f]]*\),.*/\1/')
 
 test ${id_main} = ${id_debug} || echo "unequal main and debug id"
 
@@ -375,7 +375,7 @@ main_file=./usr/local/bin/hello
 test -f "${main_file}" || echo "No main file ${main_file}"
 
 # Extract the build-id from the main file
-id_main=$(file $main_file | sed 's/.*, BuildID[.*]=\(.*\),.*/\1/')
+id_main=$(file $main_file | sed 's/.*, BuildID\[[.*\]]=\([[0-9a-f]]*\),.*/\1/')
 
 id_main_file="./usr/lib/.build-id/${id_main:0:2}/${id_main:2}"
 test -L "$id_main_file" || echo "No build-id file $id_main_file"
@@ -398,7 +398,7 @@ debug_file=./usr/lib/debug/usr/local/bin/hello-*.debug
 test -f ${debug_file} || echo "No debug file ${debug_file}"
 
 # Extract the build-id from the .debug file
-id_debug=$(file $debug_file | sed 's/.*, BuildID[.*]=\(.*\),.*/\1/')
+id_debug=$(file $debug_file | sed 's/.*, 
BuildID\[[.*\]]=\([[0-9a-f]]*\),.*/\1/')
 
 test ${id_main} = ${id_debug} || echo "unequal main and debug id"
 
@@ -469,7 +469,7 @@ main_file=./usr/local/bin/hello
 test -f "${main_file}" || echo "No main file ${main_file}"
 
 # Extract the build-id from the main file
-id_main=$(file $main_file | sed 's/.*, BuildID[.*]=\(.*\),.*/\1/')
+id_main=$(file $main_file | sed 's/.*, BuildID\[[.*\]]=\([[0-9a-f]]*\),.*/\1/')
 
 id_main_file="./usr/lib/.build-id/${id_main:0:2}/${id_main:2}"
 test -L "$id_main_file" || echo "No build-id file $id_main_file"
@@ -492,7 +492,7 @@ debug_file=./usr/lib/debug/usr/local/bin/hello.debug
 test -f ${debug_file} || echo "No debug file ${debug_file}"
 
 # Extract the build-id from the .debug file
-id_debug=$(file $debug_file | sed 's/.*, BuildID[.*]=\(.*\),.*/\1/')
+id_debug=$(file $debug_file | sed 's/.*, 
BuildID\[[.*\]]=\([[0-9a-f]]*\),.*/\1/')
 
 test ${id_main} = ${id_debug} || echo "unequal main and debug id"
 
@@ -574,7 +574,7 @@ main_file=./usr/local/bin/hello
 test -f "${main_file}" || echo "No main file ${main_file}"
 
 # Extract the build-id from