[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Git packaging workflow discussion on planet.d.o

On 04/04/2013 10:25 PM, Jeremy Stanley wrote:
> On 2013-04-04 16:00:34 +0200 (+0200), Andreas Tille wrote:
> [...]
>> I can not see how Joey[1] and Daniel[3] would solve these problem when
>> they are not interested in upstream tarball releases any more.
> It's worth pointing out, packagers should not assume just because an
> upstream uses a VCS with public access, it in any way means they
> release directly out of their version control repositories. A rather
> large project with which I'm involved has an automated release
> mechanism which integrates information from git tags into files
> within the tarballs at release time... we generate these tarballs
> mostly for the benefit of distribution packagers, to make their
> lives easier (so they don't have to re-run the release scripts).
> A simpler example is the common practice of projects which
> autogenerate AUTHORS and ChangeLog files out of their VCS logs... it
> makes no sense to store those files back into the version control,
> but adding them to release tarballs via a scripted release mechanism
> makes a lot of sense. If your packaging workflow does not rely on
> importing the contents of release tarballs, then for projects like
> this you miss some content unless you re-run the same release
> scripts post-facto.
Well, if you really want to generate these from Git, that's
also possible (though the changelog might be quite big, so
in some cases, I'm about to give up on that...):

        git checkout master
        git reset --hard $(GIT_TAG)
        git log >$(CURDIR)/../CHANGELOG
        git checkout debian/$(DEBFLAVOR)
        mv $(CURDIR)/../CHANGELOG $(CURDIR)/debian/CHANGELOG
        git add $(CURDIR)/debian/CHANGELOG
        git commit -a -m "Updated upstream changelog"

        if [ -e $(CURDIR)/debian/CHANGELOG ] ; then \
                dh_installchangelogs $(CURDIR)/debian/CHANGELOG ; \
        else \
                dh_installchangelogs ; \

        git log --format='%aN <%aE>' | awk '{arr[$$0]++} END{for (i in
arr){print arr[i], i;}}' | sort -rn | cut -d' ' -f2-

I use often the above gen-author-list for the debian/copyright file.


Reply to: