Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Packaging (http://www.linux-archive.org/fedora-packaging/)
-   -   %prep (http://www.linux-archive.org/fedora-packaging/655281-prep.html)

Kamal Ahmed 04-12-2012 01:48 PM

%prep
 
Is it ok to have the following in the %prep section

%prep
sudo yum -y groupinstall "Development Tools"
echo "Installing Development Tools"
sudo yum -y install python-devel.i386
sudo yum -y install postgresql84-server.i386 postgresql84-devel.i386 postgresql84-python.i386




--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

Jon Ciesla 04-12-2012 01:49 PM

%prep
 
2012/4/12 Kamal Ahmed <kamal2222ahmed@yahoo.com>:
> Is it ok to have the following in the %prep section
>
> %prep
> sudo yum -y groupinstall "Development Tools"
> echo "Installing Development Tools"
> sudo yum -y install python-devel.i386
> sudo yum -y install postgresql84-server.i386 postgresql84-devel.i386
> postgresql84-python.i386
>

No, you should never call sudo, yum, or rpm in a spec. If you need
packages installed at build time, use BuildRequires.

-J

>
>
>
> --
> packaging mailing list
> packaging@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/packaging



--
in your fear, seek only peace
in your fear, seek only love

-d. bowie
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

Jochen Schmitt 04-12-2012 02:02 PM

%prep
 
On Thu, Apr 12, 2012 at 06:48:27AM -0700, Kamal Ahmed wrote:
> Is it ok to have the following in the %prep section
>
> %prep
> sudo yum -y groupinstall "Development Tools"
> echo "Installing Development Tools"
> sudo yum -y install python-devel.i386
> sudo yum -y install postgresql84-server.i386 postgresql84-devel.i386 postgresql84-python.i386

Don't use sudo because it's not non-interactive (asking for a password) and grant
you with root access which rise the dange of demanging the system. This may be very
bad for a user which try to rebuild your package from a SRPM and may get a
system demage.

One reason why the SuSE Build server is bad is the fact, that builds are executed
in a root environment. So some kinds of errors may be not find, which may be dangerous
for users which try to rebuild the created SRPMs on thier own systems.

Instead of using yum and rpm to install packages requires for build time, please
use BuidRequires:. Mock and koji can analyze the package can install the requires
package in the build environemnt.

Best Regards:

Jochen Schmitt
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging

Christopher Meng 04-13-2012 07:27 AM

%prep
 
That's right.BuildRequires is the most important thing you should set up.

On Thursday, April 12, 2012, Jochen Schmitt wrote:

On Thu, Apr 12, 2012 at 06:48:27AM -0700, Kamal Ahmed wrote:

> Is it ok to have the following in the %prep section

>

> %prep

> sudo yum -y groupinstall "Development Tools"

> echo "Installing Development Tools"

> sudo yum -y install python-devel.i386

> sudo yum -y install postgresql84-server.i386 postgresql84-devel.i386 postgresql84-python.i386



Don't use sudo because it's not non-interactive (asking for a password) and grant

you with root access which rise the dange of demanging the system. This may be very

bad for a user which try to rebuild your package from a SRPM and may get a

system demage.



One reason why the SuSE Build server is bad is the fact, that builds are executed

in a root environment. So some kinds of errors may be not find, which may be dangerous

for users which try to rebuild the created SRPMs on thier own systems.



Instead of using yum and rpm to install packages requires for build time, please

use BuidRequires:. Mock and koji can analyze the package can install the requires

package in the build environemnt.



Best Regards:



Jochen Schmitt

--

packaging mailing list

packaging@lists.fedoraproject.org

https://admin.fedoraproject.org/mailman/listinfo/packaging

--
Sent from Gmail Mobile

--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging


All times are GMT. The time now is 10:08 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.