[libvirt] [libvirt-php][PATCH] Generate AUTHORS file

This is basically taken from libvirt repo. I'm creating .mailmap to avoid doubled entries in the AUTHORS file. Also, AUTHORS is no longer tracked by git. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- .gitignore | 1 + .mailmap | 13 +++++++++++++ AUTHORS => AUTHORS.in | 21 +++++---------------- Makefile.am | 13 ++++++++++++- autogen.sh | 3 +++ 5 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 .mailmap rename AUTHORS => AUTHORS.in (45%) diff --git a/.gitignore b/.gitignore index 8c52e3f..c622359 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ /tests/*.trs /tests/functions.phpt /test-driver +/AUTHORS /INSTALL Makefile Makefile.in diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..213131d --- /dev/null +++ b/.mailmap @@ -0,0 +1,13 @@ +# 'git shortlog --help' and look for mailmap for the format of each line + +# Email consolidation: +# <Preferred address in AUTHORS> <other alias used by same author> +<liyong@skybility.com> <4179e1@gmail.com> +<dzamirski@datto.com> <dzamirski@dattobackup.com> +<Remi@famillecollet.com> <fedora@famillecollet.com> +<mignov@gmail.com> <minovotn@redhat.com> + +# Name consolidation: +# Preferred author spelling <preferred email> +Tiziano Müller <dev-zero@gentoo.org> +Stefan Kuhn <stefan.kuhn@foss-group.ch> diff --git a/AUTHORS b/AUTHORS.in similarity index 45% rename from AUTHORS rename to AUTHORS.in index 4004b20..87e619b 100644 --- a/AUTHORS +++ b/AUTHORS.in @@ -3,30 +3,19 @@ Libvirt-php extension Libvirt-php extension is currently maintained and developed by: - Michal Prívozník <mprivozn@redhat.com> + Michal Prívozník <mprivozn@redhat.com> The original project, called php-libvirt, has been originally developed and maintained by: - Radek Hladik <r.hladik@cybersales.cz> + Radek Hladik <r.hladik@cybersales.cz> who is still contributing to the project with his patches. There are also other people that have contributed to the project: - David King <e-mail@unknown.tld> - Jan-Paul van Burgsteden <e-mail@unknown.tld> - Lyre <liyong@skybility.com> (or <4179e1@gmail.com>) - Daniel P. Berrange <berrange@redhat.com> - Tiziano Mueller <dev-zero@gentoo.org> - Yukihiro Kawada <warp.kawada@gmail.com> - Remi Collet <Remi@famillecollet.com> - Ivo van den Abeelen <ivovandenabeelen@gmail.com> - Tiziano Müller <dev-zero@gentoo.org> - Pavel Odintsov <pavel.odintsov@gmail.com> - Tugdual Saunier <tugdual.saunier@gmail.com> - Stefan Kuhn <stefan.kuhn@foss-group.ch> - Dawid Zamirski <dzrudy@gmail.com> - Michal Novotny <minovotn@redhat.com> + David King <e-mail@unknown.tld> + Jan-Paul van Burgsteden <e-mail@unknown.tld> +#authorslist# Thanks goes to all of them with big thanks to Tugdual Saunier for various fixes and OS-X compilation support. diff --git a/Makefile.am b/Makefile.am index e28a96f..4633f43 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,9 +2,20 @@ SUBDIRS = tools src docs tests ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = libvirt-php.spec libvirt-php.spec.in winsrc +EXTRA_DIST = libvirt-php.spec libvirt-php.spec.in winsrc AUTHORS.in AM_DISTCHECK_CONFIGURE_FLAGS = --with-distcheck rpm: clean @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) + +dist-hook: gen-AUTHORS + +.PHONY: gen-AUTHORS +gen-AUTHORS: + $(AM_V_GEN)if test -d $(srcdir)/.git; then \ + out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u | sed 's/^/\t/'`" && \ + 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 2d8179c..4234d1e 100755 --- a/autogen.sh +++ b/autogen.sh @@ -2,5 +2,8 @@ test -n "$srcdir" || srcdir=`dirname "$0"` test -n "$srcdir" || srcdir=. +# Automake requires that ChangeLog and AUTHORS exist. +touch AUTHORS ChangeLog || exit 1 + autoreconf --force --install --verbose "$srcdir" test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" -- 2.13.0

On Sat, Aug 05, 2017 at 02:29:58PM +0200, Michal Privoznik wrote:
This is basically taken from libvirt repo. I'm creating .mailmap to avoid doubled entries in the AUTHORS file. Also, AUTHORS is no longer tracked by git.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- .gitignore | 1 + .mailmap | 13 +++++++++++++ AUTHORS => AUTHORS.in | 21 +++++---------------- Makefile.am | 13 ++++++++++++- autogen.sh | 3 +++ 5 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 .mailmap rename AUTHORS => AUTHORS.in (45%)
diff --git a/Makefile.am b/Makefile.am index e28a96f..4633f43 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,9 +2,20 @@ SUBDIRS = tools src docs tests
ACLOCAL_AMFLAGS = -I m4
-EXTRA_DIST = libvirt-php.spec libvirt-php.spec.in winsrc +EXTRA_DIST = libvirt-php.spec libvirt-php.spec.in winsrc AUTHORS.in
AM_DISTCHECK_CONFIGURE_FLAGS = --with-distcheck
rpm: clean @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) + +dist-hook: gen-AUTHORS + +.PHONY: gen-AUTHORS +gen-AUTHORS: + $(AM_V_GEN)if test -d $(srcdir)/.git; then \ + out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u | sed 's/^/\t/'`" && \ + perl -p -e "s/#authorslist#// and print '$$out'" \ + < $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \ + mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \ + fi
What is the point of going through a temporary file and spawning one extra process on success? We use the pattern a lot in libvirt's Makefile and it just seems wasteful to me. Also, this probably won't work correctly with git work-trees, since those have .git as a regular file, not a directory. See: http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=e97dce1b84ab63 Jan

On 08/14/2017 05:42 PM, Ján Tomko wrote:
On Sat, Aug 05, 2017 at 02:29:58PM +0200, Michal Privoznik wrote:
This is basically taken from libvirt repo. I'm creating .mailmap to avoid doubled entries in the AUTHORS file. Also, AUTHORS is no longer tracked by git.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- .gitignore | 1 + .mailmap | 13 +++++++++++++ AUTHORS => AUTHORS.in | 21 +++++---------------- Makefile.am | 13 ++++++++++++- autogen.sh | 3 +++ 5 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 .mailmap rename AUTHORS => AUTHORS.in (45%)
diff --git a/Makefile.am b/Makefile.am index e28a96f..4633f43 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,9 +2,20 @@ SUBDIRS = tools src docs tests
ACLOCAL_AMFLAGS = -I m4
-EXTRA_DIST = libvirt-php.spec libvirt-php.spec.in winsrc +EXTRA_DIST = libvirt-php.spec libvirt-php.spec.in winsrc AUTHORS.in
AM_DISTCHECK_CONFIGURE_FLAGS = --with-distcheck
rpm: clean @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) + +dist-hook: gen-AUTHORS + +.PHONY: gen-AUTHORS +gen-AUTHORS: + $(AM_V_GEN)if test -d $(srcdir)/.git; then \ + out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u | sed 's/^/\t/'`" && \ + perl -p -e "s/#authorslist#// and print '$$out'" \ + < $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \ + mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \ + fi
What is the point of going through a temporary file and spawning one extra process on success? We use the pattern a lot in libvirt's Makefile and it just seems wasteful to me.
What extra process do you have in mind?
Also, this probably won't work correctly with git work-trees, since those have .git as a regular file, not a directory. See: http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=e97dce1b84ab63
Well, in that case it's broken in libvirt too. Feel free to fix it and I'll cherry-pick the fix into -php then. Michal

On Tue, Aug 15, 2017 at 07:43:36AM +0200, Michal Privoznik wrote:
On 08/14/2017 05:42 PM, Ján Tomko wrote:
On Sat, Aug 05, 2017 at 02:29:58PM +0200, Michal Privoznik wrote:
+gen-AUTHORS: + $(AM_V_GEN)if test -d $(srcdir)/.git; then \ + out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u | sed 's/^/\t/'`" && \ + perl -p -e "s/#authorslist#// and print '$$out'" \ + < $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \ + mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \ + fi
What is the point of going through a temporary file and spawning one extra process on success? We use the pattern a lot in libvirt's Makefile and it just seems wasteful to me.
What extra process do you have in mind?
mv
Also, this probably won't work correctly with git work-trees, since those have .git as a regular file, not a directory. See: http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=e97dce1b84ab63
Well, in that case it's broken in libvirt too. Feel free to fix it and I'll cherry-pick the fix into -php then.
I volunteer to cherry-pick it to libvirt, just in case you fix it in libvirt-php first. Jan

On 08/15/2017 10:39 AM, Ján Tomko wrote:
On Tue, Aug 15, 2017 at 07:43:36AM +0200, Michal Privoznik wrote:
On 08/14/2017 05:42 PM, Ján Tomko wrote:
On Sat, Aug 05, 2017 at 02:29:58PM +0200, Michal Privoznik wrote:
+gen-AUTHORS: + $(AM_V_GEN)if test -d $(srcdir)/.git; then \ + out="`cd $(srcdir) && git log --pretty=format:'%aN <%aE>' | sort -u | sed 's/^/\t/'`" && \ + perl -p -e "s/#authorslist#// and print '$$out'" \ + < $(srcdir)/AUTHORS.in > $(distdir)/AUTHORS-tmp && \ + mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS ; \ + fi
What is the point of going through a temporary file and spawning one extra process on success? We use the pattern a lot in libvirt's Makefile and it just seems wasteful to me.
What extra process do you have in mind?
mv
Oh yeah. Well I think the idea is to replace AUTHORS iff we successfully generated it. It doesn't bother me that much to rewrite it. Processes come and go. But yet again, if you feel like this is a problem be my guest a propose a patch.
Also, this probably won't work correctly with git work-trees, since those have .git as a regular file, not a directory. See: http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=e97dce1b84ab63
Well, in that case it's broken in libvirt too. Feel free to fix it and I'll cherry-pick the fix into -php then.
I volunteer to cherry-pick it to libvirt, just in case you fix it in libvirt-php first.
I will not. I don't care that much to try to fix it. Be my guest. Michal
participants (2)
-
Ján Tomko
-
Michal Privoznik