[opensuse-buildservice] Installing RPMs during %prep phase of a RPM building
Hello everybody, I need to install a RPM while I'm build an RPM ... or in other words, I want to write into the .spec: %prec rpm -Uvh aStrangePackage.rpm But I'll give an error because I don't have root privilegies and rpm installation fails. How can I do that ??? Thank you, Gianluca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2008-05-08 14:37:08 +0200, G. Massera wrote:
Hello everybody, I need to install a RPM while I'm build an RPM ... or in other words, I want to write into the .spec:
%prec rpm -Uvh aStrangePackage.rpm
But I'll give an error because I don't have root privilegies and rpm installation fails. How can I do that ???
You should use BuildRequires. If you add "BuildRequires: aStrangePackage" to your specfile the obs will install the package before the build starts. So if you need a package for building you have to add it to the BuildRequires. Marcus --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2008-05-08 14:37:08 +0200, G. Massera wrote:
Hello everybody, I need to install a RPM while I'm build an RPM ... or in other words, I want to write into the .spec:
%prec rpm -Uvh aStrangePackage.rpm
But I'll give an error because I don't have root privilegies and rpm installation fails. How can I do that ???
this is expected. we dont allow building as root user. 1. use buildrequires if needed. 2. what project/package is this? darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Marcus Rueckert ha scritto:
On 2008-05-08 14:37:08 +0200, G. Massera wrote:
Hello everybody, I need to install a RPM while I'm build an RPM ... or in other words, I want to write into the .spec:
%prec rpm -Uvh aStrangePackage.rpm
But I'll give an error because I don't have root privilegies and rpm installation fails. How can I do that ???
this is expected. we dont allow building as root user. 1. use buildrequires if needed. 2. what project/package is this?
darix
I know how to use BuildRequires... but the problem is that BuildRequires search on standard repositories for the distribution. But I need to install an RPM that it is in a third-party repository... so, I have only to solution: 1- adding this external repository (but I supposed that virtual machine where build is done has not access to internet) 2- adding the RPM to source files and installing it in the %prec phase I don't want download the source package and add another .spec for build the application into my home project and then use BuildRequires... because I need this RPM only for one for the distribution that I support. Thank for helping, Gianluca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 08.05.2008 at 16:09, "G. Massera"
wrote: I know how to use BuildRequires... but the problem is that BuildRequires search on standard repositories for the distribution. But I need to install an RPM that it is in a third-party repository... so, I have only to solution: 1- adding this external repository (but I supposed that virtual machine where build is done has not access to internet) 2- adding the RPM to source files and installing it in the %prec phase I don't want download the source package and add another .spec for build the application into my home project and then use BuildRequires... because I need this RPM only for one for the distribution that I support.
I think nevertheless it's the best approach, to go for a 2nd package for this dependency in this case. Somebody might as well download once the src.rpm (which is also published by the OBS) and try to compile it on another system. You will most likely put that person in a lot of trouble and non working builds. Dominique --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2008-05-08 15:09:56 +0200, G. Massera wrote:
Marcus Rueckert ha scritto:
On 2008-05-08 14:37:08 +0200, G. Massera wrote:
Hello everybody, I need to install a RPM while I'm build an RPM ... or in other words, I want to write into the .spec:
%prec rpm -Uvh aStrangePackage.rpm
But I'll give an error because I don't have root privilegies and rpm installation fails. How can I do that ???
this is expected. we dont allow building as root user. 1. use buildrequires if needed. 2. what project/package is this?
darix
I know how to use BuildRequires... but the problem is that BuildRequires search on standard repositories for the distribution. But I need to install an RPM that it is in a third-party repository... so, I have only to solution: 1- adding this external repository (but I supposed that virtual machine where build is done has not access to internet) 2- adding the RPM to source files and installing it in the %prec phase
I don't want download the source package and add another .spec for build the application into my home project and then use BuildRequires... because I need this RPM only for one for the distribution that I support.
what third party repository? what package from it? darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Marcus Rueckert ha scritto:
On 2008-05-08 15:09:56 +0200, G. Massera wrote:
Marcus Rueckert ha scritto:
On 2008-05-08 14:37:08 +0200, G. Massera wrote:
Hello everybody, I need to install a RPM while I'm build an RPM ... or in other words, I want to write into the .spec:
%prec rpm -Uvh aStrangePackage.rpm
But I'll give an error because I don't have root privilegies and rpm installation fails. How can I do that ???
this is expected. we dont allow building as root user. 1. use buildrequires if needed. 2. what project/package is this?
darix
I know how to use BuildRequires... but the problem is that BuildRequires search on standard repositories for the distribution. But I need to install an RPM that it is in a third-party repository... so, I have only to solution: 1- adding this external repository (but I supposed that virtual machine where build is done has not access to internet) 2- adding the RPM to source files and installing it in the %prec phase
I don't want download the source package and add another .spec for build the application into my home project and then use BuildRequires... because I need this RPM only for one for the distribution that I support.
what third party repository? what package from it?
darix
The package that I need is GSL (Gnu Scientific Library). It is in all standard repository ... except in RHEL and CentOS. In the repository of RHEL and CentOS there isn't GSL :-( :-( I don't remember the repository... I search with http://rpm.pbone.net/index.php3 However... because GSL is so common... I think that is stupid to make another .spec for compile the source in my home project. Hello, Gianluca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2008-05-08 16:15:50 +0200, G. Massera wrote:
The package that I need is GSL (Gnu Scientific Library). It is in all standard repository ... except in RHEL and CentOS. In the repository of RHEL and CentOS there isn't GSL :-( :-( I don't remember the repository... I search with http://rpm.pbone.net/index.php3 However... because GSL is so common... I think that is stupid to make another .spec for compile the source in my home project.
just a few thoughts. 1. where do you take the GSL package from? 2. the package you use to build against will be needed at runtime. so you have to provide a GSL package for rhel/centos users, otherwise they can not install your package. 3. another option would be to disable the parts of your program that need GSL on rhel/centos and only provide them on the other distros. if gsl is needed for core features you will have to provide a GSL package for them or disable the package on the distros. hope this helps darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Marcus Rueckert ha scritto:
On 2008-05-08 16:15:50 +0200, G. Massera wrote:
The package that I need is GSL (Gnu Scientific Library). It is in all standard repository ... except in RHEL and CentOS. In the repository of RHEL and CentOS there isn't GSL :-( :-( I don't remember the repository... I search with http://rpm.pbone.net/index.php3 However... because GSL is so common... I think that is stupid to make another .spec for compile the source in my home project.
just a few thoughts.
1. where do you take the GSL package from?
2. the package you use to build against will be needed at runtime. so you have to provide a GSL package for rhel/centos users, otherwise they can not install your package.
3. another option would be to disable the parts of your program that need GSL on rhel/centos and only provide them on the other distros. if gsl is needed for core features you will have to provide a GSL package for them or disable the package on the distros.
hope this helps
darix
For point 1: from one of the link reported after a search from rpm.pbone.net For point 2: GSL is not needed at runtime because it will be linked statically For point 3: Yes, GSL is needed for core features... and because GSL is needed only during building (because I will use the static version), there is no need to have such dependencies and then... I don't have to create a new package for GSL. And finally, I'll want to strees more my requirement... because in my case I need just One rpm... but suppose that you want to provide a binary package of some your application Pippo... that depends on 50 others libraries... and all of these 50 other libraries are all available to an external repository maintained by someone else people (not you)... ... in this case the only solution for using Build service is to create 50 .spec files for Re-Create the 50 RPM provided by someone else ???? It seems at little silly ?!?! no ?!?! Thank anyway, Gianluca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2008-05-08 16:47:59 +0200, G. Massera wrote:
For point 1: from one of the link reported after a search from rpm.pbone.net
ouch.
For point 2: GSL is not needed at runtime because it will be linked statically
ouch again. this should be avoided where possible.
For point 3: Yes, GSL is needed for core features... and because GSL is needed only during building (because I will use the static version), there is no need to have such dependencies and then... I don't have to create a new package for GSL.
ideally you want to link it dynamically so you will end up with only 1 copy.
And finally, I'll want to strees more my requirement... because in my case I need just One rpm... but suppose that you want to provide a binary package of some your application Pippo... that depends on 50 others libraries... and all of these 50 other libraries are all available to an external repository maintained by someone else people (not you)... ... in this case the only solution for using Build service is to create 50 .spec files for Re-Create the 50 RPM provided by someone else ???? It seems at little silly ?!?! no ?!?!
no. thats what you have to do. as adrian just explained in another thread. you are not allowed to use binary rpms from 3rd party in the opensuse buildservice. (you can do that in your own instance though) to get a clean build where you know all packages fit together and will work together you will need the properly build rpms in your environment. You dont have to recreate the spec files on your own. you always can upload theirs. In case you duplicate someones packages it is always nice to ask them before if they dont have objections. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Marcus Rueckert ha scritto:
On 2008-05-08 16:47:59 +0200, G. Massera wrote:
For point 1: from one of the link reported after a search from rpm.pbone.net
ouch.
For point 2: GSL is not needed at runtime because it will be linked statically
ouch again. this should be avoided where possible.
For point 3: Yes, GSL is needed for core features... and because GSL is needed only during building (because I will use the static version), there is no need to have such dependencies and then... I don't have to create a new package for GSL.
ideally you want to link it dynamically so you will end up with only 1 copy.
And finally, I'll want to strees more my requirement... because in my case I need just One rpm... but suppose that you want to provide a binary package of some your application Pippo... that depends on 50 others libraries... and all of these 50 other libraries are all available to an external repository maintained by someone else people (not you)... ... in this case the only solution for using Build service is to create 50 .spec files for Re-Create the 50 RPM provided by someone else ???? It seems at little silly ?!?! no ?!?!
no. thats what you have to do. as adrian just explained in another thread. you are not allowed to use binary rpms from 3rd party in the opensuse buildservice. (you can do that in your own instance though)
to get a clean build where you know all packages fit together and will work together you will need the properly build rpms in your environment.
You dont have to recreate the spec files on your own. you always can upload theirs. In case you duplicate someones packages it is always nice to ask them before if they dont have objections.
darix
Ok... I understand. However, I don't have access to the .spec file. I'll try to create a link to the gls package of OpenSuse Factory... and I hope that it will compile fine also on RHEL and CentOS. Thanks, Gianluca --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
G. Massera napsal(a):
Marcus Rueckert ha scritto:
On 2008-05-08 16:47:59 +0200, G. Massera wrote:
For point 3: Yes, GSL is needed for core features... and because GSL is needed only during building (because I will use the static version), there is no need to have such dependencies and then... I don't have to create a new package for GSL.
You dont have to recreate the spec files on your own. you always can upload theirs. In case you duplicate someones packages it is always nice to ask them before if they dont have objections.
Ok... I understand. However, I don't have access to the .spec file.
That's really strange. GSL is GPL (v2 or v3, depends on the GSL version), so you should be able to get the source rpm from the same place you got the binary rpm from. Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
G. Massera escribió:
GSL is not needed at runtime because it will be linked statically
No ! dont do that..! well you may not be able to do so in the future because we are in the process of removing most static libraries from the distribution :-P
It seems at little silly ?!?! no ?!?!
I still dont get what you are really trying to accomplish, but sounds terrible bad. -- "Progress is possible only if we train ourselves to think about programs without thinking of them as pieces of executable code.” - Edsger W. Dijkstra Cristian Rodríguez R. Platform/OpenSUSE - Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/
participants (6)
-
Cristian Rodríguez
-
Dominique Leuenberger
-
G. Massera
-
Marcus Hüwe
-
Marcus Rueckert
-
Michal Marek