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

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

 



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@xxxxxxxxxx>
---
.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@xxxxxxxxxx>
AuthorDate: Thu Feb 3 10:51:36 2011 +0100
Commit:     Michal Privoznik <mprivozn@xxxxxxxxxx>
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@xxxxxxxxxx>

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

Jano

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux