Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Development (http://www.linux-archive.org/debian-development/)
-   -   Standardisation of the name of the patching targets included in debian/rules. (http://www.linux-archive.org/debian-development/45952-standardisation-name-patching-targets-included-debian-rules.html)

Martin Quinson 02-03-2008 09:10 AM

Standardisation of the name of the patching targets included in debian/rules.
 
On Sun, Feb 03, 2008 at 06:32:42PM +0900, Charles Plessy wrote:
> Dear maintainers of CDBS, dpatch, and quilt,
>
> if you are subscribed to debian-devel@l.d.o, you must have noticed the
> long discussion about patch systems. An idea that was quite popular
> was to standardise the patch target in all patch systems used during
> package building.
>
> Here is a summary of the targets used by the different makefile
> includes available to the developpers:
>
> File Package To patch To depatch
> /usr/share/dpatch/dpatch.make dpatch patch unpatch
> /usr/share/quilt/quilt.make quilt patch unpatch
> /usr/share/cdbs/1/rules/patchsys-quilt.mk quilt apply-patches reverse-patches
> /usr/share/cdbs/1/rules/simple-patchsys.mk cdbs apply-patches reverse-patches
> /usr/share/cdbs/1/rules/dpatch.mk cdbs apply-dpatches deapply-dpatches
>
> Since these five files provide patching facilities to a large number of Debian
> source packages, it would be very advantageous if they could use the same
> name for the patching and depatching rules: developpers could use them
> without needing ab initio knowledge of the underlying system.
>
> Obviously, there is no solution that wouldn't require a change in at least two
> packages, and that is the reason I contact all of you and CC debian-devel.

Hello,

I'm sorry I'm so overhelmed currently that I cannot follow d-d.
Whatever the conclusion of the discussion is, I'll happilly follow it.

/usr/share/cdbs/1/rules/patchsys-quilt.mk follows the same "syntax"
than /usr/share/cdbs/1/rules/simple-patchsys.mk since it aims at being
a (decent) drop-in replacement for the cdbs trivial patch system.

I find personnaly patch/unpatch more easy to understand, but YMMV...

A solution would be to add "patch: apply-patches" pseudo-rules to cdbs
files, and such.

Please fill a bug when you reach a consensus to keep me aware of it.

Bye, Mt.

--
There is no experimental demonstration of your theorem.
-- Bastard Reviewer From Hell

Stefano Zacchiroli 02-03-2008 06:14 PM

Standardisation of the name of the patching targets included in debian/rules.
 
On Sun, Feb 03, 2008 at 11:10:41AM +0100, Martin Quinson wrote:
> I find personnaly patch/unpatch more easy to understand, but YMMV...

I think (hope) that no one will be able to find a reason why the two
target should *not* be called "patch" / "unpatch". They are IMO the only
2 that people will be able to guess out of the blue.

So please go for patch/unpatch.

--
Stefano Zacchiroli -*- PhD in Computer Science ............... now what?
zack@{upsilon.cc,cs.unibo.it,debian.org} -<%>- http://upsilon.cc/zack/
(15:56:48) Zack: e la demo dema ? / All one has to do is hit the
(15:57:15) Bac: no, la demo scema / right keys at the right time

Simon Horman 02-04-2008 07:28 AM

Standardisation of the name of the patching targets included in debian/rules.
 
On Sun, Feb 03, 2008 at 08:14:35PM +0100, Stefano Zacchiroli wrote:
> On Sun, Feb 03, 2008 at 11:10:41AM +0100, Martin Quinson wrote:
> > I find personnaly patch/unpatch more easy to understand, but YMMV...
>
> I think (hope) that no one will be able to find a reason why the two
> target should *not* be called "patch" / "unpatch". They are IMO the only
> 2 that people will be able to guess out of the blue.
>
> So please go for patch/unpatch.

Fine by me.

Though if you dug a bit deeper I suspect you would find rather a
lot of packages that supply patch/unpatch targets under various names.

Perhaps a policy is in order? That way lintian and friends would
alert packagers to the problem.



--
Horms


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Gerrit Pape 02-06-2008 01:34 PM

Standardisation of the name of the patching targets included in debian/rules.
 
On Sun, Feb 03, 2008 at 08:14:35PM +0100, Stefano Zacchiroli wrote:
> On Sun, Feb 03, 2008 at 11:10:41AM +0100, Martin Quinson wrote:
> > I find personnaly patch/unpatch more easy to understand, but YMMV...
>
> I think (hope) that no one will be able to find a reason why the two
> target should *not* be called "patch" / "unpatch". They are IMO the only
> 2 that people will be able to guess out of the blue.
>
> So please go for patch/unpatch.

An unpatch target might be problematic. There're packages with patches
that touch the upstream Makefile, and calling 'make unpatch' before
'make clean' can break things; of course the clean target can depend on
patch, but this seems to complicate things. Why not simply do the
unpatch in the clean target?

This is what I use in packages I maintain:

patch: deb-checkdir patch-stamp
patch-stamp:
for i in `ls -1 debian/diff/*.diff || :`; do
patch -p1 <$$i || exit 1;
done
touch patch-stamp

clean: deb-checkdir deb-checkuid
$(MAKE) clean $(OPTS)
test ! -e patch-stamp ||
for i in `ls -1r debian/diff/*.diff || :`; do patch -p1 -R <$$i; done
rm -f patch-stamp [...]

Regards, Gerrit.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Stefano Zacchiroli 02-06-2008 02:27 PM

Standardisation of the name of the patching targets included in debian/rules.
 
On Wed, Feb 06, 2008 at 02:34:58PM +0000, Gerrit Pape wrote:
> > So please go for patch/unpatch.
>
> An unpatch target might be problematic. There're packages with patches
> that touch the upstream Makefile, and calling 'make unpatch' before
> 'make clean' can break things; of course the clean target can depend on

Then just make unpatch depends on clean.

Anyhow, we were discussing naming here, that is the API for the package
maintainer to implement, while you seem to dig into details on how the
proposed target names should be internally implemented ...

Cheers.

--
Stefano Zacchiroli -*- PhD in Computer Science ............... now what?
zack@{upsilon.cc,cs.unibo.it,debian.org} -<%>- http://upsilon.cc/zack/
(15:56:48) Zack: e la demo dema ? / All one has to do is hit the
(15:57:15) Bac: no, la demo scema / right keys at the right time

Ben Hutchings 02-10-2008 01:43 PM

Standardisation of the name of the patching targets included in debian/rules.
 
On Wed, 2008-02-06 at 16:27 +0100, Stefano Zacchiroli wrote:
> On Wed, Feb 06, 2008 at 02:34:58PM +0000, Gerrit Pape wrote:
> > > So please go for patch/unpatch.
> >
> > An unpatch target might be problematic. There're packages with patches
> > that touch the upstream Makefile, and calling 'make unpatch' before
> > 'make clean' can break things; of course the clean target can depend on
>
> Then just make unpatch depends on clean.
>
> Anyhow, we were discussing naming here, that is the API for the package
> maintainer to implement, while you seem to dig into details on how the
> proposed target names should be internally implemented ...

"debian/rules clean" should remove patches so that dpkg-buildpackage
doesn't include the patches in the diff.gz twice. (It might also have
to apply a patch to fix upstream's build system. Well, so be it.)

Ben.

--
Ben Hutchings
I'm not a reverse psychological virus. Please don't copy me into your sig.


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

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