[packages/file] - this version breaks rpmbuild, good testcase is gnome-initial-setup package - rel 1.1

Elan Ruusamäe glen at pld-linux.org
Mon Apr 18 18:35:11 CEST 2016


On 18.04.2016 19:16, Elan Ruusamäe wrote:
> but from previous post, seems the "lockup" problem being that 
> libtooldeps expect input from stdin, but rpm side it was already closed? 

added "set -x" to libtooldeps script:

---
Processing files: libmagic-devel-5.26-1.2.x86_64
+ '[' 3 -ge 2 ']'
+ pkgname=libmagic-devel
+ shift
+ RPM_BUILD_ROOT=/home/users/glen/tmp/file-5.26-root-glen
+ read possible
---

so, rpm invokes the helper but prints nothing there

i replaced libtool scripts interpreter /bin/sh -> /bin/bash, seems bash 
handles io error better and reports error:


Processing files: libmagic-devel-5.26-1.2.x86_64
+ '[' 3 -ge 2 ']'
+ pkgname=libmagic-devel
+ case $1 in
+ shift
+ RPM_BUILD_ROOT=/home/users/glen/tmp/file-5.26-root-glen
+ read possible
/home/users/glen/libtooldeps.sh: line 16: read: read error: 0: Bad file 
descriptor
+ exit 0
+ '[' 3 -ge 2 ']'
+ pkgname=libmagic-devel
+ case $1 in
+ case $pkgname in
+ read possible
/home/users/glen/libtooldeps.sh: line 31: read: read error: 0: Bad file 
descriptor
+ exit 0
Processing files: libmagic-static-5.26-1.2.x86_64


file(1) itself seems to process okay:

[~/rpm/packages/file(5.26) (master)⚡] ➔ file 
/home/users/glen/tmp/file-5.26-root-glen/usr/lib64/libmagic.la; echo $?
/home/users/glen/tmp/file-5.26-root-glen/usr/lib64/libmagic.la: libtool 
library file, ASCII text
0
[~/rpm/packages/file(5.26) (master)⚡] ➔


the io error happens for python deps as well:

Processing files: python-magic-5.26-1.2.x86_64
skipping /usr/share/doc/python-magic-5.26 requires detection
Traceback (most recent call last):
   File "/usr/lib/rpm/pythoneggs.py", line 84, in <module>
     files = stdin.readlines()
IOError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
   File "/usr/lib/rpm/pythoneggs.py", line 84, in <module>
     files = stdin.readlines()
IOError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
   File "/usr/lib/rpm/pythoneggs.py", line 84, in <module>
     files = stdin.readlines()
IOError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
   File "/usr/lib/rpm/pythoneggs.py", line 84, in <module>
     files = stdin.readlines()
IOError: [Errno 9] Bad file descriptor
Processing files: python3-magic-5.26-1.2.x86_64
skipping /usr/share/doc/python3-magic-5.26 requires detection
Traceback (most recent call last):
   File "/usr/lib/rpm/pythoneggs.py", line 84, in <module>
     files = stdin.readlines()
IOError: [Errno 9] Bad file descriptor
Traceback (most recent call last):
   File "/usr/lib/rpm/pythoneggs.py", line 84, in <module>
     files = stdin.readlines()
IOError: [Errno 9] Bad file descriptor
^CTraceback (most recent call last):
   File "/usr/lib/rpm/pythoneggs.py", line 15, in <module>
     from pkg_resources import Distribution, FileMetadata, PathMetadata



-- 
glen



More information about the pld-devel-en mailing list