Mailinglist Archive: opensuse-buildservice (233 mails)
| < Previous | Next > |
Re: [opensuse-buildservice] preferred rpms and ccache
- From: "Dr. Peter Poeml" <poeml@xxxxxxx>
- Date: Wed, 2 May 2007 21:09:11 +0200
- Message-id: <20070502190911.GH4538@xxxxxxx>
Hi Michael,
thanks for your initiative and for your patience.
On Mon, Mar 05, 2007 at 11:42:30AM -0600, Michael Wolf wrote:
> Yo
>
> In home:maw, I have two packages which may be of interest to other
> people using the build service.
>
> First is a patched version of osc. It has two patches.
>
> One patch, pubkey-instructions.patch, is pretty straightforward, and I
> think it should be committed to svn.
I'm not entirely happy with the '/tmp' dir, and tend to replace it with
the homedir of the user.
> Another patch, preferred-rpms.patch, lets you run osc with the
> environment variable OSC_PREFERRED_RPMS set. This allows you to run
> builds with your own packages - it's useful when you update foo, and
> then get to work on bar, upon which foo depends. Sure, foo will be
> rebuilt automatically by the build service, but sometimes it takes a
> while; this way you can keep on working. As is, it's pretty hacky and
> kind of dumb (osc will download the packages needed to build your
> package even if that package already exists in your preferred rpms
> directory), but it might be useful to other people anyway. It's been
> very useful for me, at any rate.
I implemented the functionality in a slightly different way. osc now has
a new commandline option (implementing commandline options has become
much easier with the latest code, which was the reason I put this back):
-p DIR, --prefer-pacs=DIR
Prefer packages from this directory when installing
the build-root
> (Is there already a better way to do this? I couldn't find it...)
I implemented it slightly differently:
- avoiding downloading of packages for which there is a local preferred
package
- skipping the signature check for preferred packages, since they most
likely won't be signed
- only install packages which are meant to be installed according to the
buildinfo. To add extra package, I think it makes more sense to add a
--extra-pacs PACK option, to also intall package 'PACK'. PACK could
come from the underlying repositories, or again from the prefer dir.
To pull such an extra pack from a repo, osc would probably need the
help of the buildservice, I guess, because it needs the exact
filename which includes version number and alike.
- ignore debuginfo packages and source rpms
- ignore packages with wrong arch
- using a commandline switch rather than an environmental variable
Hope this all makes sense.
> Second is a patched version of ccache. This links
> /usr/local/bin/{gcc,cc,g++,c++} to /usr/bin/ccache. The result is that
> ccache is transparently invoked when building, no need modify your .spec
> or anything like that. Also, the default cache size is raised to 3G and
> ccache's directory goes into /.ccache. To use, you currently need my
> patched osc; put the ccache package into your preferred rpms directory
> and build away.
This calls for an --extra-pacs option. For now, it might be acceptable
to put ccache into BuildRequires and let it come from the preferred
dir...
> At the risk of stating the obvious, I don't advise installing this
> package outside of osc build roots.
>
>
> Together, these make building large packages (such as firefox) and
> groups of many packages with lots of interdependencies (such as gnome)
> much faster.
Locally, I played with another option today:
-k DIR, --keep-pacs=DIR
Save built packages into this directory
This can work hand in hand with --prefer-pacs. Does this sound cool or
stupid to anyone?
Peter
--
Allen Gewalten zum Trutz sich erhalten.
SUSE LINUX Products GmbH
Research & Development
thanks for your initiative and for your patience.
On Mon, Mar 05, 2007 at 11:42:30AM -0600, Michael Wolf wrote:
> Yo
>
> In home:maw, I have two packages which may be of interest to other
> people using the build service.
>
> First is a patched version of osc. It has two patches.
>
> One patch, pubkey-instructions.patch, is pretty straightforward, and I
> think it should be committed to svn.
I'm not entirely happy with the '/tmp' dir, and tend to replace it with
the homedir of the user.
> Another patch, preferred-rpms.patch, lets you run osc with the
> environment variable OSC_PREFERRED_RPMS set. This allows you to run
> builds with your own packages - it's useful when you update foo, and
> then get to work on bar, upon which foo depends. Sure, foo will be
> rebuilt automatically by the build service, but sometimes it takes a
> while; this way you can keep on working. As is, it's pretty hacky and
> kind of dumb (osc will download the packages needed to build your
> package even if that package already exists in your preferred rpms
> directory), but it might be useful to other people anyway. It's been
> very useful for me, at any rate.
I implemented the functionality in a slightly different way. osc now has
a new commandline option (implementing commandline options has become
much easier with the latest code, which was the reason I put this back):
-p DIR, --prefer-pacs=DIR
Prefer packages from this directory when installing
the build-root
> (Is there already a better way to do this? I couldn't find it...)
I implemented it slightly differently:
- avoiding downloading of packages for which there is a local preferred
package
- skipping the signature check for preferred packages, since they most
likely won't be signed
- only install packages which are meant to be installed according to the
buildinfo. To add extra package, I think it makes more sense to add a
--extra-pacs PACK option, to also intall package 'PACK'. PACK could
come from the underlying repositories, or again from the prefer dir.
To pull such an extra pack from a repo, osc would probably need the
help of the buildservice, I guess, because it needs the exact
filename which includes version number and alike.
- ignore debuginfo packages and source rpms
- ignore packages with wrong arch
- using a commandline switch rather than an environmental variable
Hope this all makes sense.
> Second is a patched version of ccache. This links
> /usr/local/bin/{gcc,cc,g++,c++} to /usr/bin/ccache. The result is that
> ccache is transparently invoked when building, no need modify your .spec
> or anything like that. Also, the default cache size is raised to 3G and
> ccache's directory goes into /.ccache. To use, you currently need my
> patched osc; put the ccache package into your preferred rpms directory
> and build away.
This calls for an --extra-pacs option. For now, it might be acceptable
to put ccache into BuildRequires and let it come from the preferred
dir...
> At the risk of stating the obvious, I don't advise installing this
> package outside of osc build roots.
>
>
> Together, these make building large packages (such as firefox) and
> groups of many packages with lots of interdependencies (such as gnome)
> much faster.
Locally, I played with another option today:
-k DIR, --keep-pacs=DIR
Save built packages into this directory
This can work hand in hand with --prefer-pacs. Does this sound cool or
stupid to anyone?
Peter
--
Allen Gewalten zum Trutz sich erhalten.
SUSE LINUX Products GmbH
Research & Development
| < Previous | Next > |