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 Development

 
 
LinkBack Thread Tools
 
Old 07-24-2011, 02:02 PM
Ljubomir Ljubojevic
 
Default mock using yum .repo file?

Hi.
I hope this is not too off-topic.

I am setting up and learning mock to build packages for CentOS 6, and I
have couple of questions for experts.

1. Can I somehow use .repo files from /etc/yum.repos.d/ ? I use 20-30
.repo files on and off (each repository(folder) in it's own file for
easier manipulation without editing files), and editing repo configs in
2 places is not too appealing. I have seen this:

$MOCK --copyin /etc/yum.repos.d/texlive-mock.repo /etc/yum.repos.d/

is this what I am looking for?

2. Will cleaning mentioned in manual delete all installed rpms
(dependencies) or just building folder? If I want to compile same (or
different but using same dependancies) package, how to keep dependencies
packages for faster compile? I have ccache = 4G, yum cache on 15 days
and root cahce on 10 days. Will this do?

3. How do yum priorities work in mock? I have them set for every repo
and if I can use .repo files will mock honor priorities?

If .repo files can not be used, do I have to sort repos based on
priorities values or can I use priority= ?

Thanks in advance.

--

Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

Google is the Mother, Google is the Father, and traceroute is your
trusty Spiderman...
StarOS, Mikrotik and CentOS/RHEL/Linux consultant
_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel
 
Old 07-24-2011, 03:15 PM
Alberto Sentieri
 
Default mock using yum .repo file?

I am also interested in building packages and I do not know where to
start from. Is there a howto with the basics on the subject?

AS

On 07/24/2011 10:02 AM, Ljubomir Ljubojevic wrote:
> Hi.
> I hope this is not too off-topic.
>
> I am setting up and learning mock to build packages for CentOS 6, and I
> have couple of questions for experts.
>
> 1. Can I somehow use .repo files from /etc/yum.repos.d/ ? I use 20-30
> .repo files on and off (each repository(folder) in it's own file for
> easier manipulation without editing files), and editing repo configs in
> 2 places is not too appealing. I have seen this:
>
> $MOCK --copyin /etc/yum.repos.d/texlive-mock.repo /etc/yum.repos.d/
>
> is this what I am looking for?
>
> 2. Will cleaning mentioned in manual delete all installed rpms
> (dependencies) or just building folder? If I want to compile same (or
> different but using same dependancies) package, how to keep dependencies
> packages for faster compile? I have ccache = 4G, yum cache on 15 days
> and root cahce on 10 days. Will this do?
>
> 3. How do yum priorities work in mock? I have them set for every repo
> and if I can use .repo files will mock honor priorities?
>
> If .repo files can not be used, do I have to sort repos based on
> priorities values or can I use priority= ?
>
> Thanks in advance.
>

_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel
 
Old 07-24-2011, 04:59 PM
Ljubomir Ljubojevic
 
Default mock using yum .repo file?

Alberto Sentieri wrote:

> I am also interested in building packages and I do not know where to
> start from. Is there a howto with the basics on the subject?
>

[1]: http://www.rpm.org/max-rpm/
[2]: http://fedoraproject.org/wiki/Projects/Mock
[3]: http://fedoraproject.org/wiki/Extras/MockTricks

--

Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

Google is the Mother, Google is the Father, and traceroute is your
trusty Spiderman...
StarOS, Mikrotik and CentOS/RHEL/Linux consultant
_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel
 
Old 07-24-2011, 05:14 PM
Jeff Johnson
 
Default mock using yum .repo file?

On Jul 24, 2011, at 12:59 PM, Ljubomir Ljubojevic wrote:

> Alberto Sentieri wrote:
>
>> I am also interested in building packages and I do not know where to
>> start from. Is there a howto with the basics on the subject?
>>
>
> [1]: http://www.rpm.org/max-rpm/
> [2]: http://fedoraproject.org/wiki/Projects/Mock
> [3]: http://fedoraproject.org/wiki/Extras/MockTricks
>

(aside)
Um, you *could* be a little bit more verbose and helpful.

You can build packages using rpmbuild or you can attempt to use mock.

The choice between rpm build <-> mock will depend on what platform you are building on,
and what intent you have with building packages.

If you are just getting started building, then rpmbuild is likely
the easier tool to learn. The link [1] isn't bad, but max-rom
assumes you are writing recipes from scratch, and none (that I know of)
has been doing that for almost a decade. Instead what is typically
done is to find a closely similar *.src.rpm and edit at the *.spec recipe.

Starting with Big Packages like kernel/glibc/X11/python isn't advised,
theres a fairly steep learning curve there.

If your intent is contributing a package to Fedora, then you will need
to learn to use mock. One of the impediments to using mock on CentOS
will be setting up entries in /etc/mock/* for CentOS.

(aside)
I'm not sure whether CentOS adds those to mock or not. Consider it a RFE
if not, and blame me for ignorance because these days I use Serentos
not CentOS, largely … because … well … you know why.

The benefit of mock over rpmbuild is that it will setup most
of the build environment for you (when configured correctly).

The benefit of rpmbuild over mock is that its a simpler tool to understand
(too much automation isn't always the best way to learn).

hth

73 de Jeff


> --
>
> Ljubomir Ljubojevic
> (Love is in the Air)
> PL Computers
> Serbia, Europe
>
> Google is the Mother, Google is the Father, and traceroute is your
> trusty Spiderman...
> StarOS, Mikrotik and CentOS/RHEL/Linux consultant
> _______________________________________________
> CentOS-devel mailing list
> CentOS-devel@centos.org
> http://lists.centos.org/mailman/listinfo/centos-devel

_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel
 
Old 07-24-2011, 05:31 PM
Ljubomir Ljubojevic
 
Default mock using yum .repo file?

Jeff Johnson wrote:
> On Jul 24, 2011, at 12:59 PM, Ljubomir Ljubojevic wrote:
>
>> Alberto Sentieri wrote:
>>
>>> I am also interested in building packages and I do not know where to
>>> start from. Is there a howto with the basics on the subject?
>>>
>> [1]: http://www.rpm.org/max-rpm/
>> [2]: http://fedoraproject.org/wiki/Projects/Mock
>> [3]: http://fedoraproject.org/wiki/Extras/MockTricks
>>
>
> (aside)
> Um, you *could* be a little bit more verbose and helpful.
>

Too much postings and not much free time meant more errors and that got
me a lot of warnings on centos-users ml, I finally unsubscribed, and I
am limiting my help for now to what other people do not respond to, on
the rest of comm media.

That and this is basically what I read to learn when I started few years
ago.

--

Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

Google is the Mother, Google is the Father, and traceroute is your
trusty Spiderman...
StarOS, Mikrotik and CentOS/RHEL/Linux consultant
_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel
 
Old 07-24-2011, 05:52 PM
Jeff Johnson
 
Default mock using yum .repo file?

On Jul 24, 2011, at 1:31 PM, Ljubomir Ljubojevic wrote:

> Jeff Johnson wrote:
>> On Jul 24, 2011, at 12:59 PM, Ljubomir Ljubojevic wrote:
>>
>>> Alberto Sentieri wrote:
>>>
>>>> I am also interested in building packages and I do not know where to
>>>> start from. Is there a howto with the basics on the subject?
>>>>
>>> [1]: http://www.rpm.org/max-rpm/
>>> [2]: http://fedoraproject.org/wiki/Projects/Mock
>>> [3]: http://fedoraproject.org/wiki/Extras/MockTricks
>>>
>>
>> (aside)
>> Um, you *could* be a little bit more verbose and helpful.
>>
>
> Too much postings and not much free time meant more errors and that got
> me a lot of warnings on centos-users ml, I finally unsubscribed, and I
> am limiting my help for now to what other people do not respond to, on
> the rest of comm media.
>

Understood.

Oddly I'm on a mock learning curve as well today, but
mock running on Lion and koji+mock running on
armv5te dreamplugs and rpmv7he panda boards

That and this is basically what I read to learn when I started few years

Those aren't bad pointers, I merely tried to supply some context.

Meanwhile (while I'm here) here's the answers to your questions:

1) Yes, mock uses yum which will use repo files. You likely need
to configure up /etc/mock/* somehow … checking … yes stanzas
like this are merely yum repositories written differently:
[fedora]
name=fedora
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-15&arch=i386
failovermethod=priority
See if someone hasn't configured up mock for cents somehow: that was the point
of my aside: its often quite mysterious how to find the right URI. I have difficulties
all the time.

2) Cleaning is likely to be mapped onto yum cache cleaning (mock goes to
some lengths to preserve a build system image and not download needlessly).
The mock->yum connection is moderately expensive, but the intent is
1) (initially) populate the chroot with packages
2) (normally) update the chroot (and the image) with later packages.
The options win the man page are more to work around issues afaict: try-and-see,
the normal operations SHOULD just work and if not think carefully about
what isn't working for your purposes.

3) priorities don't work too well generally (but do work with specific usage cases).
The typical usage case for priorities is to set up a precedence order if/when
there are multiple choices for a package to install. I would always use
whatever is recommended by add-on repositories, and (if you intent is to become
an add-on repository using preferences) well Dag's repository uses priorities nicely
and flawlessly (from first hand experience) and is worthy of study. But you shouldn't
have to do too much with priorities, you will absolutely know when there is a need
to use, because your updates will be breaking, and your preference (which will determine
the priority field) will be clearer.

hth

73 de Jeff

> ago.
>
> --
>
> Ljubomir Ljubojevic
> (Love is in the Air)
> PL Computers
> Serbia, Europe
>
> Google is the Mother, Google is the Father, and traceroute is your
> trusty Spiderman...
> StarOS, Mikrotik and CentOS/RHEL/Linux consultant
> _______________________________________________
> CentOS-devel mailing list
> CentOS-devel@centos.org
> http://lists.centos.org/mailman/listinfo/centos-devel

_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel
 
Old 07-24-2011, 06:16 PM
Manuel Wolfshant
 
Default mock using yum .repo file?

On 07/24/2011 08:52 PM, Jeff Johnson wrote:
>
> 1) Yes, mock uses yum which will use repo files. You likely need
> to configure up /etc/mock/* somehow … checking … yes stanzas
> like this are merely yum repositories written differently:
> [fedora]
> name=fedora
> mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-15&arch=i386
> failovermethod=priority
> See if someone hasn't configured up mock for cents somehow: that was the point
> of my aside: its often quite mysterious how to find the right URI. I have difficulties
> all the time.
mock from epel comes preconfigured to use centos repos when building for
RHEL 4 and RHEL 5. As last versions of mock (both for epel-5 and epel-6)
were released before centos 6 was out, the config files for RHEL6 are
preconfigured to use RH beta ( 5.90). However it's quite trivial to
adjust the 2 lines to point to centos repos instead.

Why on Earth did mock's maintainer decide to point the config files for
PPC to centos ( give that there is no centos for ppc) is however an
enigma for me.


73 de wolfy

_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel
 
Old 07-24-2011, 06:21 PM
Jeff Johnson
 
Default mock using yum .repo file?

On Jul 24, 2011, at 2:16 PM, Manuel Wolfshant wrote:

> On 07/24/2011 08:52 PM, Jeff Johnson wrote:
>>
>> 1) Yes, mock uses yum which will use repo files. You likely need
>> to configure up /etc/mock/* somehow … checking … yes stanzas
>> like this are merely yum repositories written differently:
>> [fedora]
>> name=fedora
>> mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-15&arch=i386
>> failovermethod=priority
>> See if someone hasn't configured up mock for cents somehow: that was the point
>> of my aside: its often quite mysterious how to find the right URI. I have difficulties
>> all the time.
> mock from epel comes preconfigured to use centos repos when building for
> RHEL 4 and RHEL 5. As last versions of mock (both for epel-5 and epel-6)
> were released before centos 6 was out, the config files for RHEL6 are
> preconfigured to use RH beta ( 5.90). However it's quite trivial to
> adjust the 2 lines to point to centos repos instead.
>
> Why on Earth did mock's maintainer decide to point the config files for
> PPC to centos ( give that there is no centos for ppc) is however an
> enigma for me.
>

Brain fart likely … the real flaw in /etc/mock/* is too many notes and
not enough music.

What I mean by that is this: its all cookie-cutter cut-n-paste
of .ini files with way too many details and complexity for not
much purpose.

A better approach (if anyone is listening and uses mock) would be to write
a script that generates the necessary information as needed for mock,
not distributing all possible (and conceivable) configuration, typos and all.

>
> 73 de wolfy
>

;-)

73 de Jeff

_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel
 
Old 07-24-2011, 06:24 PM
Ljubomir Ljubojevic
 
Default mock using yum .repo file?

Jeff Johnson wrote:
> 1) Yes, mock uses yum which will use repo files. You likely need
> to configure up /etc/mock/* somehow … checking … yes stanzas
> like this are merely yum repositories written differently:
> [fedora]
> name=fedora
> mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-15&arch=i386
> failovermethod=priority
> See if someone hasn't configured up mock for cents somehow: that was the point
> of my aside: its often quite mysterious how to find the right URI. I have difficulties
> all the time.

> 3) priorities don't work too well generally (but do work with specific usage cases).
> The typical usage case for priorities is to set up a precedence order if/when
> there are multiple choices for a package to install. I would always use
> whatever is recommended by add-on repositories, and (if you intent is to become
> an add-on repository using preferences) well Dag's repository uses priorities nicely
> and flawlessly (from first hand experience) and is worthy of study. But you shouldn't
> have to do too much with priorities, you will absolutely know when there is a need
> to use, because your updates will be breaking, and your preference (which will determine
> the priority field) will be clearer.
>
> hth
>
> 73 de Jeff

I use following repos:

playonlinux-on.repo
plc-adobe-linux-on.repo
plc-atrpms-stable-off.repo
plc-atrpms-testing-off.repo
plc-c6-testing-off.repo
plc-centosplus-on.repo
plc-elrepo-extras-off.repo
plc-elrepo-fasttrack-off.repo
plc-elrepo-kernel.repo
plc-elrepo-on.repo
plc-elrepo-testing-off.repo
plc-epel-on.repo
plc-extras-on.repo
plc-fasttrack-off.repo
plc-kb-el6-ext-off.repo
plc-kb-el6-ext-test-off.repo
plc-kb-el6-misc-off.repo
plc-kb-el6-misc-test-off.repo
plc-os-on.repo
plc-releases-on.repo
plc-remi-off.repo
plc-remi-test-off.repo
plc-repoforge-buildtools-off.repo
plc-repoforge-dag-off.repo
plc-repoforge-extras-off.repo
plc-repoforge-on.repo
plc-rpmfusion-free-updates-off.repo
plc-rpmfusion-free-updates-testing-off.repo
plc-rpmfusion-nonfree-updates-off.repo
plc-rpmfusion-nonfree-updates-testing-off.repo
plc-sernet-samba-off.repo
plc-updates-on.repo
plc-virtualbox-on.repo
plc-virtualmin-universal-on.repo
plnet-archive-off.repo
plnet-compiled-on.repo
plnet-downloaded-on.repo
plnet-releases-on.repo
plnet-replace-off.repo
plnet-test-off.repo

plc-os-on.repo:
name=Spec CentOS-$releasever - os - $releasever - $basearch
baseurl=http://xxx.wwwww.rs/mrepo/plc-centos6-$basearch/RPMS.os/
gpgcheck=0
enabled=1
priority=1
exclude=*releases

All priorities in yum .repo files are carefully adjusted to not mess
with repos of higher value for me, but to also provide all available
packages.

plnet-downloaded for example is repo with high priority and is populated
with carefully selected packages from other repos with lower priority
that conflict (like aTrpms and repoForge) and packages not available via
regular repositories but from download web pages (skype, shorewall, etc..).

"-off" at the end marks disabled repos. Those are all local repos and I
have URI's. But I am still modifying and selecting repositories and
packages. That is why I would like to use .repo files from
/etc/yum/repos.d/. So I do not have to worry if there were changes.


--

Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

Google is the Mother, Google is the Father, and traceroute is your
trusty Spiderman...
StarOS, Mikrotik and CentOS/RHEL/Linux consultant
_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel
 
Old 07-24-2011, 06:25 PM
Ljubomir Ljubojevic
 
Default mock using yum .repo file?

Manuel Wolfshant wrote:
> Why on Earth did mock's maintainer decide to point the config files for
> PPC to centos ( give that there is no centos for ppc) is however an
> enigma for me.
>
Maybe there was rummer there will be PPC version

--

Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

Google is the Mother, Google is the Father, and traceroute is your
trusty Spiderman...
StarOS, Mikrotik and CentOS/RHEL/Linux consultant
_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel
 

Thread Tools




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

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