[libvirt] [libvirt-snmp][PATCH 1/3] Generate AUTHORS from git log

Ján Tomko jtomko at redhat.com
Wed Sep 5 14:47:07 UTC 2018


On Wed, Sep 05, 2018 at 10:55:38AM +0200, Michal Privoznik wrote:
>Adding new contributor to the list is something I keep forgetting
>about. Therefore switch to autogenerated list of contributors,
>just like every other libvirt project is doing so.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> .gitignore            |  4 ++--
> AUTHORS => AUTHORS.in | 12 +++++-------
> Makefile.am           | 30 +++++++++++++++++++++---------
> autogen.sh            | 10 ++++++----
> 4 files changed, 34 insertions(+), 22 deletions(-)
> rename AUTHORS => AUTHORS.in (44%)
>

>diff --git a/Makefile.am b/Makefile.am
>index ae1cd79..9ac6fc2 100644
>--- a/Makefile.am
>+++ b/Makefile.am
>@@ -3,18 +3,30 @@ SUBDIRS=src/ docs/
> EXTRA_DIST = \
> 	libvirt-snmp.spec libvirt-snmp.spec.in \
> 	autobuild.sh \
>-	autogen.sh
>+	autogen.sh \
>+	AUTHORS.in \
>+	$(NULL)
>
> rpm: clean
> 		@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
>
>+dist-hook: gen-ChangeLog gen-AUTHORS
>+
>+# Generate the ChangeLog file (with all entries since the switch to git)

What was the versioning system used by libvirt-snmp before?

commit ac37a36d642c7e035ec1651dbf8d30c12c648efe
Author:     Michal Privoznik <mprivozn at redhat.com>
AuthorDate: Thu Feb 3 10:51:36 2011 +0100
Commit:     Michal Privoznik <mprivozn at redhat.com>
CommitDate: Thu Feb 3 10:51:36 2011 +0100

    Initial revision


>+# and insert it into the directory we're about to use to create a tarball.
>+.PHONY: gen-ChangeLog gen-AUTHORS
> gen-ChangeLog:
>-		if [ -d .git ]; then \
>-			git log --oneline | sed 's/[0-9a-f]* \(.*\)/\1/' > $(distdir)/ChangeLog; \
>-		else \
>-			echo "Prevent non-empty ChangeLog" > $(distdir)/ChangeLog ;\
>-		fi
>+	if test -d .git || test -d ../.git; then					\

The ../.git test is suspicious, but, more importantly:

>+	  $(top_srcdir)/build-aux/gitlog-to-changelog		\

how do you expect gitlog-to-changelog to appear in build-aux?

>+	     > $(distdir)/cl-t;	\
>+	  rm -f $(distdir)/ChangeLog;				\
>+	  mv $(distdir)/cl-t $(distdir)/ChangeLog;		\

This is just an overly verbose touch.

Are you looking for the 'foreign' option to AM_INIT_AUTOMAKE which
relaxes the GNU packaging standards?

>+	fi
>
>-.PHONY: gen-ChangeLog
>-
>-dist-hook: gen-ChangeLog
>+gen-AUTHORS:
>+	$(AM_V_GEN)if test -d $(srcdir)/.git; then                      \

test -x

>+	  out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u`" && \
>+	  perl -p -e "s/#authorslist#// and print '$$out'"            \
>+	    < $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp &&        \
>+	  mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ;           \
>+	fi
>diff --git a/autogen.sh b/autogen.sh
>index 5d00494..12d0dc0 100755
>--- a/autogen.sh
>+++ b/autogen.sh
>@@ -15,11 +15,13 @@ if test -z "$*"; then
> fi
>
> # Automake requires that ChangeLog exist.
>-if test ! -f ChangeLog; then
>-    touch ChangeLog || exit 1
>-fi

Unrelated change.

>+# Real ChangeLog/AUTHORS is auto-generated from GIT logs at

s/ChangeLog//

>+# make dist time, but automake requires that it
>+# exists at all times :-(
>+touch ChangeLog AUTHORS

s/ChangeLog//

>
>-autoreconf -i -f
>+mkdir -p build-aux

This will not be needed without ChangeLog

>+autoreconf -if

And this change is also unrelated.

>
> cd $THEDIR
>
>-- 
>2.16.4

With only the AUTHORS-related stuff in:
Reviewed-by: Ján Tomko <jtomko at redhat.com>

Otherwise, the "nobody cares about libvirt-snmp" rule applies.

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180905/0162a289/attachment-0001.sig>


More information about the libvir-list mailing list