[pacman-dev] [RFC] [PATCH 0/4] makepkg: VCS package overhaul

Allan McRae allan at archlinux.org
Sun Jun 3 22:23:50 EDT 2012


On 04/06/12 01:40, Allan McRae wrote:
> This is my first attempt at overhauling the really crap VCS PKGBUILD
> support in makepkg.  So far only git is implemented.
> 
> This is for initial comments.  There is still much to tidy up (apart from
> reinstating all the other VCS...), but using git works.  E.g. to make a
> package for pacman-git from the maint branch:
> 
> source=('git+https://projects.archlinux.org/git/pacman.git#branch=maint')
> 
> Currently you need to use --skipinteg, as integrity checking is broken.
> So is generating the integrity checks.
> 
> Also, I would like ideas on how to stop the git repo being updated.  This is
> a common request for having VCS PKGBUILDs work offline (assumably after an
> initial checkout...).   Should I add a new flag, or just not error out when
> updating the repo fails?
> 

I am not going to resend the patchset at this stage, but I now consider
git PKGBUILDs to be finished (apart from a documentation update). See
the full patchset at:
https://projects.archlinux.org/users/allan/pacman.git/log/?h=vcs


Changes made since the last patchset:
 - Failing when updating a repo only produces a warning.  This allows
packages to be build while offline (provided the initial checkout is
available)
 - Checking checksums bails early if "SKIP" is specified.  No need to
use --skipinteg anymore
 - "makepkg -g" prints "SKIP" for git sources
 - "makepkg --allsource" will backup the VCS checkout


Allan McRae (9):
  makepkg: remove VCS package support
  makepkg: reorder source handling functions
  makepkg: add function to return download protocol
  makepkg: generalize download_sources
  makepkg: skip integrity checking early
  makepkg: allow using GIT source URLs
  makepkg: fix checksum generation with VCS sources
  makepkg: modify get_filename to handle git sources
  makepkg: modify get_filepath to handle VCS sources

 doc/PKGBUILD.5.txt    |   64 ------
 scripts/makepkg.sh.in |  577
++++++++++++++++++++++++++-----------------------
 2 files changed, 311 insertions(+), 330 deletions(-)


This fixes the following bugs:

FS#7816 - get source from svn/Subversion URLs
FS#8890 - separate download and build stages for offline mode (cvs/svn
PKGBUILDs)
FS#13727 - VCS packages, makedepends and output
FS#15895 - PKGBUILD git feature is systematically setting pkgver to
today date, not date of the last commit
FS#16384 - Inconsistency of makepkg's activities in devel_check() for
Mercurial
FS#16872 - the way VCS packages are handled is a mess
FS#19459 - Integrated VCS checkout, update and revision selection
FS#19476 - Remove duplication of VCS downloads from PKGBUILDs
FS#21098 - [makepkg] Backup VCS source code with --allsource


Work is needed to readd CVS, SVN, Mercurial, Darcs and Bazaar.  These
should be fairly simple to add given I have done the groundwork already.


Apart from code comments, the only area I would like input on is the
pkgver for git packages.  When not using --holdver, "#tag=..." or
"#commit=...", makepkg will update the pkgver to:

$(git rev-list HEAD | wc -l)_$(git rev-parse --short HEAD)

This increases with increasing commits (so version comparisons are fine)
and includes a commit ID for uniqueness.  I can not think of a better way...

Allan


More information about the pacman-dev mailing list