Subject: lost history of patches (was Re: qemu patches to upstream)
To: None <tech-pkg@NetBSD.org>
From: Klaus Heinz <k.heinz@dezsieben.kh-22.de>
List: tech-pkg
Date: 12/05/2007 20:32:28
reed@reedmedia.net wrote:
> Can someone who understands the qemu patches please submit them to qemu?

This reminds of a major weakness of our processes.
We have patches in CVS but many (if not most) of them are not documented
in any way and history is often absent/useless.

For a new package the packager usually builds the package and creates
all patches necessary. All the files get committed at the same time,
mostly with a simple repetition of DESCR as the commit message. Where
can I see what the patches are supposed to do?

For an update, some patches are removed (maybe integrated upstream),
some new patches are created and often new patches get the same file
name as patches removed in the past:  history for the patch file is busted
because it refers to different source files at different times in the
life of the package.

For all commits we need descriptions what the changes are supposed to do.
The descriptions can be contained in the commit message for _all_ files
(see example below) or take the form of pkgsrc-specific comments either at
the start of the patch describing all the patch hunks or the hunks need
to include the comments so they are visible in the patched source files.

Patch files should refer to a single source file name during the entire
life of a package. If the file does not need to be patched anymore, the
name of the patch file must not be reused for different source files.

I think the latter rule would be much easier to follow if we adopted the
FreeBSD practice of naming patch files after the source files they are
changing.

Personally, for some time I have tried to use commit messages like this
when I updated packages (Makefile, distinfo, patch files) with a single
commit:

  Pkgsrc changes:
    - Added security/gnupg as a required package. Without it, sa-update
      does not work.
    - Added requirement for p5-INET6 which may be needed for IPv6 nameservers.
      Until now, this only worked because p5-Net-DNS already pulled in this
      package.
    - New option "inet6" (enabled by default) for switching off the requirement
      for p5-INET6.
    - Got rid of some backslashes in options.mk
    - patch-ba and patch-bc correct discrepancies between the man page
      and the code. Additionally, they adapt hard-coded paths to the actual
      installation. Submitted upstream.


ciao
     Klaus