permissions error related to Stripping when Creating RPM on CentOS from source code -


when building rpm existing source code, i'm getting following error:

/usr/bin/strip: unable copy file '/home/vagrant/temp/buildroot/python3-3.4.3-1.el6.x86_64/usr/lib/libpython3.4m.a'; reason: permission denied

when @ permissions file, has no write permission.

-r-xr-xr-x 1 vagrant vagrant 12823866 may 14 17:33 libpython3.4m.a

i've tried setting permission in %files section:

%attr(0644,root,root) /usr/lib/libpython3.4m.a

but has no effect.

when stripping process occur, , how can fix file can stripped, before stripping operation occurs?

the configure script creates makefile. in makefile following:

# shared libraries must installed executable mode on systems; # rather figuring out which, give them executable mode. # also, making them read-only seems idea... install_shared= ${install} -m 555 

i'm no automake expert, there may option adjust this. however, instead in %install section of spec file

%install sed -i 's/install_shared= ${install} -m 555/install_shared= ${install} -m 755'/ $rpm_build_dir/python-%{version}/makefile make install destdir=$rpm_build_root 

additionally, since building python needed turn off rpm brp-python-bytecompile part of post install. found on fedora mailing list , credit goes david malcom @ redhat. here original thread - can put @ top of spec file:

%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -