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 > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 09-06-2011, 02:58 PM
Toshio Kuratomi
 
Default Best practices for patch management on RPM based packages?

On Tue, Sep 06, 2011 at 09:16:44AM -0500, Richard Shaw wrote:
> Most of the packages I work with have very few patches so it's not all
> that difficult, but there are a couple of packages I'm working with
> that have a lot of patches and one of them has a very active upstream
> (which is a good thing!) but that also means that the patches need
> frequent adjustment.
>
> I like the idea of quilt but I can't seem to find the magic recipe to
> get it to integrate with rpmbuild.
>
> Any ideas?
>
I use quilt but it's not really integrated.

fedpkg clone PACKAGE
cd PACKAGE
fedpkg sources PACkAGE
quilt setup PACKAGE.spec
# Do whatever work is necessary via quilt in the tarball directory.
# If new patches were generated, add them to the spec file manually
fedpkg srpm
fedpkg scratch-build PACKAGE*srpm

-Toshio
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-06-2011, 03:29 PM
Adam Jackson
 
Default Best practices for patch management on RPM based packages?

On Tue, 2011-09-06 at 09:16 -0500, Richard Shaw wrote:
> Most of the packages I work with have very few patches so it's not all
> that difficult, but there are a couple of packages I'm working with
> that have a lot of patches and one of them has a very active upstream
> (which is a good thing!) but that also means that the patches need
> frequent adjustment.
>
> I like the idea of quilt but I can't seem to find the magic recipe to
> get it to integrate with rpmbuild.

If your upstream is using git, there's some boilerplate for automating
this with git-am in xorg-x11-server.spec.

- ajax
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-06-2011, 03:59 PM
Richard Shaw
 
Default Best practices for patch management on RPM based packages?

Thanks for the suggestions so far.

I think quilt works ok with Fedora scm (or RPM Fusion cvs) since
everything lives in one directory. I'm trying to get it to place nice
with rpmbuild because not everything I'm working on is in Fedora or
RPM Fusion.

Also, I like to use rpmbuild as kind of a sandbox for me to try things
out without worrying about messing anything up.

It would be nice to add some sort of configuration option to quilt so
it could query rpm to see where everything is located. I'm currently
using the _topdir relocation so that all the pacakages are separated,
i.e.

~/rpmbuild/%{name}/{BUILD,SPECS, etc..}

I've tried running quilt from the SOURCES directory and pointing to
the spec (../SPEC/%{name}.spec) but it still didn't do anything
useful.

Thanks,
Richard
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-06-2011, 06:53 PM
Matej Cepl
 
Default Best practices for patch management on RPM based packages?

Dne 6.9.2011 16:29, Panu Matilainen napsal(a):
>> I like the idea of quilt but I can't seem to find the magic recipe to
>> get it to integrate with rpmbuild.

What's wrong with

quilt setup specname.spec

?

Best,

Matěj
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-06-2011, 06:53 PM
Matej Cepl
 
Default Best practices for patch management on RPM based packages?

Dne 6.9.2011 16:29, Panu Matilainen napsal(a):
>> I like the idea of quilt but I can't seem to find the magic recipe to
>> get it to integrate with rpmbuild.

What's wrong with

quilt setup specname.spec

?

Best,

Matěj

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-06-2011, 07:23 PM
Panu Matilainen
 
Default Best practices for patch management on RPM based packages?

On 09/06/2011 09:53 PM, Matej Cepl wrote:
> Dne 6.9.2011 16:29, Panu Matilainen napsal(a):
>>> I like the idea of quilt but I can't seem to find the magic recipe to
>>> get it to integrate with rpmbuild.

Please mind your quotes, I didn't write the above.

> What's wrong with
>
> quilt setup specname.spec

Frankly, I don't know. My knowledge of quilt stops at "it has to do with
patches." This would seem to be the other way around wrt what I have in
mind (have rpmbuild setup a temporary git/quilt/whatever "repository"
inside the build directory, such as in the git example I mentioned), but
dunno.

- Panu -
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-06-2011, 07:45 PM
Enrico Scholz
 
Default Best practices for patch management on RPM based packages?

Richard Shaw <hobbes1069@gmail.com> writes:

> I like the idea of quilt but I can't seem to find the magic recipe to
> get it to integrate with rpmbuild.

I use an %apply macro in ways like

| %apply -n4 -p1

which is equivalent to

| %patch4 -p1

on ordinary hosts. But defining this macro as

| %apply(p:n:b
| if test -n "$RPM_NO_DEVEL"; then
| %patch%{-n:%{-n*}} %-p %-b
| else
| quilt import %-p %{!-p:-p 0} %{P:%{-n*}}
| quilt push -f;
| fi
| %nil

in ~/.rpmmacros allows the management of patches by 'quilt'.

See e.g.

http://pkgs.fedoraproject.org/gitweb/?p=milter-greylist.git;a=blob;f=milter-greylist.spec;hb=HEAD

for the definition of %apply.



Enrico
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-06-2011, 08:04 PM
Richard Shaw
 
Default Best practices for patch management on RPM based packages?

On Tue, Sep 6, 2011 at 2:23 PM, Panu Matilainen
<pmatilai@laiskiainen.org> wrote:
> On 09/06/2011 09:53 PM, Matej Cepl wrote:
>> Dne 6.9.2011 16:29, Panu Matilainen napsal(a):
>>>> I like the idea of quilt but I can't seem to find the magic recipe to
>>>> get it to integrate with rpmbuild.
>
> Please mind your quotes, I didn't write the above.

My apologies!


>> What's wrong with
>>
>> quilt setup specname.spec

Because rpmbuild segregates everything, quilt doesn't seem to know how
to handle that.

When you create the directory tree for rpmbuild it (at some point) creates:

BUILD
BUILDROOT
RPMS
SOURCES
SPECS
SRPMS

Of course the only ones of intrest to quilt is SOURCES and SPECS but
that means they are not in the same directory.

I've tried changing into the SOURCES directory (so it will find the
source archive) at la:

quilt -v setup ../SPECS/<name>.spec

which gets me most of the way there. It actually md5sums all the files
in the SOURCE directory and runs %prep from the spec file but then it
tries to create the 'patches' and 'series' directories in the expanded
archive directory from the current directory
(SOURCES/<name>-<version>) instead of which they are actually expanded
(../BUILD/<name>-<version>/)

And even if it did, that's not a good place to put it because that
directory is removed and recreated every time you run rpmbuild (-bp,
-bc, -bi, etc).

Thanks,
Richard
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-06-2011, 08:17 PM
Richard Shaw
 
Default Best practices for patch management on RPM based packages?

I think I've gotten over the first hurdle. I ended up using the
following command:

$ quilt setup -d rpmbuild/BUILD --sourcedir rpmbuild/SOURCES/
rpmbuild/SPECS/<name>.spec

Now that doesn't fix the persistence issue since anything in BUILD/
will be deleted on the next run of rpmbuild... In this case 'patches'
ends up being a symbolic link to ../SOURCES so that's ok, but the
'series' file will get deleted...

Thanks,
Richard
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-06-2011, 08:33 PM
Richard Shaw
 
Default Best practices for patch management on RPM based packages?

On Tue, Sep 6, 2011 at 3:17 PM, Richard Shaw <hobbes1069@gmail.com> wrote:
> I think I've gotten over the first hurdle. I ended up using the
> following command:
>
> $ quilt setup -d rpmbuild/BUILD --sourcedir rpmbuild/SOURCES/
> rpmbuild/SPECS/<name>.spec

Well not so fast...

I don't know why, but even though I'm telling it to expand in
~/rpmbuild/BUILD it seems to be expanding the source archive into a
temporary directory in /var/tmp...

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

Thread Tools




All times are GMT. The time now is 04:41 PM.

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