FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 12-16-2010, 02:33 PM
Leonard den Ottolander
 
Default Building packages using RPMBUILD

Hello Keith,

On Thu, 2010-12-16 at 15:25 +0000, Keith Roberts wrote:
> What's that all about - user mockbuild?
>
> Is that a user created by one of the rpm builder scripts?

No, it's the user that mock uses for its builds. Most if not all
upstream rpms are built using mock and so are the CentOS rpms.

Regards,
Leonard.

--
mount -t life -o ro /dev/dna /genetic/research


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-16-2010, 02:37 PM
Keith Roberts
 
Default Building packages using RPMBUILD

On Thu, 16 Dec 2010, Leonard den Ottolander wrote:

> To: CentOS mailing list <centos@centos.org>
> From: Leonard den Ottolander <leonard@den.ottolander.nl>
> Subject: Re: [CentOS] Building packages using RPMBUILD
>
> Hello Keith,
>
> On Thu, 2010-12-16 at 15:25 +0000, Keith Roberts wrote:
>> What's that all about - user mockbuild?
>>
>> Is that a user created by one of the rpm builder scripts?
>
> No, it's the user that mock uses for its builds. Most if not all
> upstream rpms are built using mock and so are the CentOS rpms.
>
> Regards,
> Leonard.

Hi Leonard.

Thanks for that.

So I don't need to worry about that!

Regards,

Keith

--
In theory, theory and practice are the same;
in practice they are not.

This email was sent from my laptop with Centos 5.5
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-16-2010, 03:00 PM
Leonard den Ottolander
 
Default Building packages using RPMBUILD

Hello Keith,

On Thu, 2010-12-16 at 15:08 +0000, Keith Roberts wrote:
> [rpmbuilder@karsites sox]$ rpm -iv ./sox-12.18.1-1.src.rpm
> error: cannot write to %sourcedir /usr/src/redhat/SOURCES

/usr/src/redhat and sub dirs are owned root.root. If you want to build
as a normal user (and you should!) you should fix the ownership of those
directories.

> Is there a package I need to install and run to set
> things up corectly?

redhat-rpm-config sets certain build macros. Although not strictly
required you should probably always install this packages. One thing I
stumbled on is that a new type of check summing is used nowadays for the
content of the rpms. If the correct macro isn't set you might run into
installation conflicts, f.e. for multilib doc files.

> I have created a user called 'rpmbuilder' under my home dir,
> and created the rpmbuild dirs under that.

If you make a different user to do builds you should rather give it its
own home dir. But you can just as well build using your default account.

> So what build dir shall I go for?

Whatever you prefer. Just using /usr/src/redhat is probably the easiest.
If you want to use a different path scheme you can override the default
settings in ~/.rpmmacros to suit your needs.
%_sourcedir %{_topdir}/%{name}-%{version}
%_binary_filedigest_algorithm 8
Regards,
Leonard.

--
mount -t life -o ro /dev/dna /genetic/research


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-16-2010, 03:03 PM
Leonard den Ottolander
 
Default Building packages using RPMBUILD

Hello Keith,

(Oops, send out the previous mail before it was finished.)

On Thu, 2010-12-16 at 15:08 +0000, Keith Roberts wrote:
> [rpmbuilder@karsites sox]$ rpm -iv ./sox-12.18.1-1.src.rpm
> error: cannot write to %sourcedir /usr/src/redhat/SOURCES

/usr/src/redhat and sub dirs are owned root.root. If you want to build
as a normal user (and you should!) you should fix the ownership of those
directories.

> Is there a package I need to install and run to set
> things up corectly?

redhat-rpm-config sets certain build macros. Although not strictly
required you should probably always install this packages. One thing I
stumbled on is that a new type of check summing is used nowadays for the
content of the rpms. If the correct macro isn't set you might run into
installation conflicts, f.e. for multilib doc files.

> I have created a user called 'rpmbuilder' under my home dir,
> and created the rpmbuild dirs under that.

If you make a different user to do builds you should rather give it its
own home dir. But you can just as well build using your default account.

> So what build dir shall I go for?

Whatever you prefer. Just using /usr/src/redhat is probably the easiest.
If you want to use a different path scheme you can override the default
settings in ~/.rpmmacros to suit your needs.

For example, I use
%_sourcedir %{_topdir}/%{name}-%{version}
%_specdir %{_sourcedir}
so the source files end up in their own directory and not all in the
same SOURCES dir.

Regards,
Leonard.

--
mount -t life -o ro /dev/dna /genetic/research


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-16-2010, 03:05 PM
Lamar Owen
 
Default Building packages using RPMBUILD

On Thursday, December 16, 2010 10:08:12 am Keith Roberts wrote:
> Is there a package I need to install and run to set
> things up corectly?
[snip]
> So what build dir shall I go for?

See the Fedora packaging guidelines, and install 'fedora-packager' from EPEL to get the tools that help you set up a normal user build environment. This works quite well for the most part, and should work better in 6.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-16-2010, 03:11 PM
Keith Roberts
 
Default Building packages using RPMBUILD

On Thu, 16 Dec 2010, Lamar Owen wrote:

> To: CentOS mailing list <centos@centos.org>
> From: Lamar Owen <lowen@pari.edu>
> Subject: Re: [CentOS] Building packages using RPMBUILD
>
> On Thursday, December 16, 2010 10:08:12 am Keith Roberts wrote:
>> Is there a package I need to install and run to set
>> things up corectly?
> [snip]
>> So what build dir shall I go for?
>
> See the Fedora packaging guidelines, and install
> 'fedora-packager' from EPEL to get the tools that help you
> set up a normal user build environment. This works quite
> well for the most part, and should work better in 6.

I've done that now.

I had already installed the packages mentioned in the Centos
wiki.

These won't cause conflicts at all with each other?

Keith

--
In theory, theory and practice are the same;
in practice they are not.

This email was sent from my laptop with Centos 5.5
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-16-2010, 03:20 PM
Lamar Owen
 
Default Building packages using RPMBUILD

On Thursday, December 16, 2010 11:11:17 am Keith Roberts wrote:
> I had already installed the packages mentioned in the Centos
> wiki.
>
> These won't cause conflicts at all with each other?

Don't know for sure, but in the case of RPMs I've built on CentOS 4 and 5 in the past they coexisted ok. But I need to double check the wiki to make sure I'm doing it the same way 'recommended'; I've been building my own RPMs for different purposes for a long time (right now 12 years total, and it's been 11 years since the start of my five year stint maintaining the PostgreSQL RPM set, some work of which you're still using if you're still using CentOS 3 or 4 in production), so I'm going to see things from a different point of view than someone who hasn't ever done it.

Try it out and see.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-16-2010, 03:23 PM
Akemi Yagi
 
Default Building packages using RPMBUILD

On Thu, Dec 16, 2010 at 8:11 AM, Keith Roberts <keith@karsites.net> wrote:
>
> I had already installed the packages mentioned in the Centos
> wiki.

I assume you are referring to this wiki:

http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment

If not, I strongly recommend reading it through. Up front it warns you
to not do the build as root. It provides the details for setting up
the build environment which will help you understand the whole
process. Installing some rpms may be convenient but you may miss the
chance of learning. :-)

Akemi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-16-2010, 03:27 PM
Keith Roberts
 
Default Building packages using RPMBUILD

On Thu, 16 Dec 2010, Leonard den Ottolander wrote:

> To: CentOS mailing list <centos@centos.org>
> From: Leonard den Ottolander <leonard@den.ottolander.nl>
> Subject: Re: [CentOS] Building packages using RPMBUILD
>
> Hello Keith,
>
> (Oops, send out the previous mail before it was finished.)

OK!

> On Thu, 2010-12-16 at 15:08 +0000, Keith Roberts wrote:
>> [rpmbuilder@karsites sox]$ rpm -iv ./sox-12.18.1-1.src.rpm
>> error: cannot write to %sourcedir /usr/src/redhat/SOURCES
>
> /usr/src/redhat and sub dirs are owned root.root. If you want to build
> as a normal user (and you should!) you should fix the ownership of those
> directories.

Right. I did su to root, and it work OK. But will chown
those if I decide to use that branch of dirs.

>> Is there a package I need to install and run to set
>> things up corectly?
>
> redhat-rpm-config sets certain build macros. Although not strictly
> required you should probably always install this packages. One thing I
> stumbled on is that a new type of check summing is used nowadays for the
> content of the rpms. If the correct macro isn't set you might run into
> installation conflicts, f.e. for multilib doc files.

That's installed OK.

Installed Packages
Name : redhat-rpm-config
Arch : noarch
Version : 8.0.45
Release : 32.el5.centos
Size : 128 k
Repo : installed
Summary : CentOS specific rpm configuration files.
License : GPL
Description: CentOS specific rpm configuration files.


double-tabbing on rpm gives me:

[root@karsites ~]# rpm
rpm rpmdev-diff rpmdev-sha384
rpmlint
rpm2cpio rpmdev-extract rpmdev-sha512
rpmls
rpmargs rpmdev-md5 rpmdev-sum
rpmpeek
rpmbuild rpmdev-newspec rpmdev-vercmp
rpmquery
rpmbuild-md5 rpmdev-rmdevelrpms rpmdev-wipetree
rpmsign
rpmdb rpmdev-setuptree rpmdiff
rpmsodiff
rpmdev-bumpspec rpmdev-sha1 rpmelfsym
rpmsoname
rpmdev-checksig rpmdev-sha224 rpmfile
rpmverify
rpmdev-cksum rpmdev-sha256 rpminfo

>> I have created a user called 'rpmbuilder' under my home dir,
>> and created the rpmbuild dirs under that.
>
> If you make a different user to do builds you should rather give it its
> own home dir. But you can just as well build using your default account.

Sorry, I meant I have created a new user account under the
/home/rpmbuilder directory.

>> So what build dir shall I go for?
>
> Whatever you prefer. Just using /usr/src/redhat is probably the easiest.
> If you want to use a different path scheme you can override the default
> settings in ~/.rpmmacros to suit your needs.
>
> For example, I use
> %_sourcedir %{_topdir}/%{name}-%{version}
> %_specdir %{_sourcedir}
> so the source files end up in their own directory and not all in the
> same SOURCES dir.

That's a handy tip to know!

Thanks again.

I'll see how things go now.

Kind Regards,

Keith

--
In theory, theory and practice are the same;
in practice they are not.

This email was sent from my laptop with Centos 5.5
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-16-2010, 03:33 PM
Keith Roberts
 
Default Building packages using RPMBUILD

On Thu, 16 Dec 2010, Akemi Yagi wrote:

> To: CentOS mailing list <centos@centos.org>
> From: Akemi Yagi <amyagi@gmail.com>
> Subject: Re: [CentOS] Building packages using RPMBUILD
>
> On Thu, Dec 16, 2010 at 8:11 AM, Keith Roberts <keith@karsites.net> wrote:
>>
>> I had already installed the packages mentioned in the Centos
>> wiki.
>
> I assume you are referring to this wiki:
>
> http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment


Thanks Akemi.

I was refering to this Centos wiki article:

http://wiki.centos.org/HowTos/I_need_the_Kernel_Source

The second part.

I'll read up on the link you sent me.

Thanks for that.

Is the link you sent me more relevant than the MaxRPM
guidelines:

http://www.rpm.org/max-rpm-snapshot/p5206.html

Kind Regards,

Keith



> If not, I strongly recommend reading it through. Up front it warns you
> to not do the build as root. It provides the details for setting up
> the build environment which will help you understand the whole
> process. Installing some rpms may be convenient but you may miss the
> chance of learning. :-)
>
> Akemi
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

--
In theory, theory and practice are the same;
in practice they are not.

This email was sent from my laptop with Centos 5.5
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 07:04 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org