[opensuse-buildservice] About permission denined /usr/lib and /usr/include
I have tried to get an answer on the IRC, but no luck on a solution. I need to create packages for a client, which places header files in /usr/include or /usr/local/lib and .a files in /usr/lib or /usr/local/lib My problem is, when I uploaded to build.opensuse.org, and tries to build I get an permission denined, do to the fact i runs in CHROOT (which of course makes sense). I was then told to add %{buildroot} to the path /usr/lib. But still no luck. Here is where I encounter the problem first in the spec file: %setup if [ ! -d %{buildroot}"/usr/local/lib/secret/"%{name}"_"%{version} ] && [ ! -d %{buildroot}"/usr/local/include/secret/"%{name}"_"%{version} ]; then mkdir %{buildroot}/usr/local/lib/secret/%{name}_%{version} mkdir %{buildroot}/usr/local/include/secret/%{name}_%{version} echo %{name} " version: " %{version} "has been installed in the secret library" else echo This version of ninja is already installed fi and later in install when I try to move my files there ˘ can anyone give me at least an idea on how to fix this ? Med venlig hilsen / Best regards Lars Nielsen Student programmer Email: lars@secret.com -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Lars, Same information as on IRC: Quoting Lars Nielsen <lars@steinwurf.com>:
%setup if [ ! -d %{buildroot}"/usr/local/lib/secret/"%{name}"_"%{version} ] && [ ! -d %{buildroot}"/usr/local/include/secret/"%{name}"_"%{version} ]; then
Probably the weirdest case of quoting ever seen... :)
mkdir %{buildroot}/usr/local/lib/secret/%{name}_%{version} mkdir %{buildroot}/usr/local/include/secret/%{name}_%{version} echo %{name} " version: " %{version} "has been installed in the secret library"
else echo This version of ninja is already installed fi
This does, factually seen, not belong to the %setup section but would correctly seen be part of %install.
and later in install when I try to move my files there ˘ can anyone give me at least an idea on how to fix this ?
Can you now point at a .spec file? Dominique -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Mon, Jul 14, 2014 at 02:18:25PM +0200, Lars Nielsen wrote:
%setup if [ ! -d %{buildroot}"/usr/local/lib/secret/"%{name}"_"%{version} ] && [ ! -d %{buildroot}"/usr/local/include/secret/"%{name}"_"%{version} ]; then mkdir %{buildroot}/usr/local/lib/secret/%{name}_%{version} mkdir %{buildroot}/usr/local/include/secret/%{name}_%{version} echo %{name} " version: " %{version} "has been installed in the secret library"
else echo This version of ninja is already installed fi
and later in install when I try to move my files there ?? can anyone give me at least an idea on how to fix this ?
The BuildRoot is the directory used by rpmbuild to collect all built files when creating new rpms. This means you're supposed to copy the built files from the current directory into the buildroot in the %install section of the specfile (normally done by calling 'make install' with DESTDIR set to the buildroot). As an example, a File called 'foo' in the BuildRoot will end up as /foo in the created rpms. This also means that the BuildRoot is always empty in the %setup section, so your code can't work. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Jeff Hawn, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (3)
-
Dominique Leuenberger a.k.a. Dimstar
-
Lars Nielsen
-
Michael Schroeder