[libvirt] [dbus PATCH 0/4] remove AUTHORS file and cleanup spec file

Pavel Hrdina (4): maint: remove AUTHORS from repository spec: cleanup spec file based on fedora package review spec: Require dbus and polkit spec: fix D-Bus spelling and improve description AUTHORS.in | 13 ------------- Makefile.am | 14 -------------- libvirt-dbus.spec.in | 34 +++++++++++++++------------------- 3 files changed, 15 insertions(+), 46 deletions(-) delete mode 100644 AUTHORS.in -- 2.14.3

This is tracked by git itself. Suggested during fedora package review. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- AUTHORS.in | 13 ------------- Makefile.am | 14 -------------- libvirt-dbus.spec.in | 2 +- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 AUTHORS.in diff --git a/AUTHORS.in b/AUTHORS.in deleted file mode 100644 index 988dd6a..0000000 --- a/AUTHORS.in +++ /dev/null @@ -1,13 +0,0 @@ - libvirt-dbus Authors - ==================== - -The primary maintainers of libvirt-dbus are: - - Lars Karlitski <lars@karlitski.net> - Pavel Hrdina <phrdina@redhat.com> - -Patches have been received from: - -#authorslist# - - ... send patches to get your name added ... diff --git a/Makefile.am b/Makefile.am index a890ff1..0c792c1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,6 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ $(PACKAGE).spec \ $(PACKAGE).spec.in \ - AUTHORS.in \ HACKING.md \ README.md \ $(NULL) @@ -15,16 +14,3 @@ DISTCLEAN_FILES = $(PACKAGE).spec rpm: clean @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) - -dist-hook: gen-AUTHORS - -# Generate the AUTHORS file (with all entries since the switch to git) -# and insert it into the directory we're about to use to create a tarball. -.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`" && \ - 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/libvirt-dbus.spec.in b/libvirt-dbus.spec.in index 1cf5922..3a04ad6 100644 --- a/libvirt-dbus.spec.in +++ b/libvirt-dbus.spec.in @@ -52,7 +52,7 @@ exit 0 %files %defattr(-,root,root,-) -%doc README.md HACKING.md COPYING AUTHORS NEWS +%doc README.md HACKING.md COPYING NEWS %{_sysconfdir}/polkit-1/rules.d/libvirt-dbus.rules %{_bindir}/libvirt-dbus %{_datadir}/dbus-1/services/org.libvirt.service -- 2.14.3

On Mon, Mar 26, 2018 at 03:33:50PM +0200, Pavel Hrdina wrote:
This is tracked by git itself. Suggested during fedora package review.
AUTHORS is a file that autoconf/automake expects to exist in all projects. Also the git history is not included with the tar.gz dist, so IMHO the AUTHORS is appropriate to keep regardless.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- AUTHORS.in | 13 ------------- Makefile.am | 14 -------------- libvirt-dbus.spec.in | 2 +- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 AUTHORS.in
diff --git a/AUTHORS.in b/AUTHORS.in deleted file mode 100644 index 988dd6a..0000000 --- a/AUTHORS.in +++ /dev/null @@ -1,13 +0,0 @@ - libvirt-dbus Authors - ==================== - -The primary maintainers of libvirt-dbus are: - - Lars Karlitski <lars@karlitski.net> - Pavel Hrdina <phrdina@redhat.com> - -Patches have been received from: - -#authorslist# - - ... send patches to get your name added ... diff --git a/Makefile.am b/Makefile.am index a890ff1..0c792c1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,6 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ $(PACKAGE).spec \ $(PACKAGE).spec.in \ - AUTHORS.in \ HACKING.md \ README.md \ $(NULL) @@ -15,16 +14,3 @@ DISTCLEAN_FILES = $(PACKAGE).spec
rpm: clean @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) - -dist-hook: gen-AUTHORS - -# Generate the AUTHORS file (with all entries since the switch to git) -# and insert it into the directory we're about to use to create a tarball. -.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`" && \ - 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/libvirt-dbus.spec.in b/libvirt-dbus.spec.in index 1cf5922..3a04ad6 100644 --- a/libvirt-dbus.spec.in +++ b/libvirt-dbus.spec.in @@ -52,7 +52,7 @@ exit 0
%files %defattr(-,root,root,-) -%doc README.md HACKING.md COPYING AUTHORS NEWS +%doc README.md HACKING.md COPYING NEWS %{_sysconfdir}/polkit-1/rules.d/libvirt-dbus.rules %{_bindir}/libvirt-dbus %{_datadir}/dbus-1/services/org.libvirt.service -- 2.14.3
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Mon, Mar 26, 2018 at 02:56:06PM +0100, Daniel P. Berrangé wrote:
On Mon, Mar 26, 2018 at 03:33:50PM +0200, Pavel Hrdina wrote:
This is tracked by git itself. Suggested during fedora package review.
AUTHORS is a file that autoconf/automake expects to exist in all projects. Also the git history is not included with the tar.gz
That is true only if the project decides to follow GNU standard, it requires ChangeLog file which is not present.
dist, so IMHO the AUTHORS is appropriate to keep regardless.
That is correct, however, if someone really wants to know who contributed into the project and what was the contribution the AUTHORS file will not provide you all these information and you will have to look into the git repository. Pavel

On Mon, Mar 26, 2018 at 05:11:06PM +0200, Pavel Hrdina wrote:
On Mon, Mar 26, 2018 at 02:56:06PM +0100, Daniel P. Berrangé wrote:
On Mon, Mar 26, 2018 at 03:33:50PM +0200, Pavel Hrdina wrote:
This is tracked by git itself. Suggested during fedora package review.
AUTHORS is a file that autoconf/automake expects to exist in all projects. Also the git history is not included with the tar.gz
That is true only if the project decides to follow GNU standard, it requires ChangeLog file which is not present.
dist, so IMHO the AUTHORS is appropriate to keep regardless.
That is correct, however, if someone really wants to know who contributed into the project and what was the contribution the AUTHORS file will not provide you all these information and you will have to look into the git repository.
If the git repository still exists, and is accessible, when you want to look for it. Sadly there are many projects with no git repo anymore after services like gitorious.org and code.google.com shutdown. Not that I'm suggesting libvirt.org is going away any time soon, but no one can predict 10+ years into the future. IMHO, giving authors credit in the distributed release tarballs is important, even if git or any other repo exists. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Mon, Mar 26, 2018 at 04:22:02PM +0100, Daniel P. Berrangé wrote:
On Mon, Mar 26, 2018 at 05:11:06PM +0200, Pavel Hrdina wrote:
On Mon, Mar 26, 2018 at 02:56:06PM +0100, Daniel P. Berrangé wrote:
On Mon, Mar 26, 2018 at 03:33:50PM +0200, Pavel Hrdina wrote:
This is tracked by git itself. Suggested during fedora package review.
AUTHORS is a file that autoconf/automake expects to exist in all projects. Also the git history is not included with the tar.gz
That is true only if the project decides to follow GNU standard, it requires ChangeLog file which is not present.
dist, so IMHO the AUTHORS is appropriate to keep regardless.
That is correct, however, if someone really wants to know who contributed into the project and what was the contribution the AUTHORS file will not provide you all these information and you will have to look into the git repository.
If the git repository still exists, and is accessible, when you want to look for it. Sadly there are many projects with no git repo anymore after services like gitorious.org and code.google.com shutdown. Not that I'm suggesting libvirt.org is going away any time soon, but no one can predict 10+ years into the future. IMHO, giving authors credit in the distributed release tarballs is important, even if git or any other repo exists.
OK, I can agree with this argument :). I'll drop this patch. Thanks, Pavel

On Mon, Mar 26, 2018 at 03:33:50PM +0200, Pavel Hrdina wrote:
This is tracked by git itself. Suggested during fedora package review.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- AUTHORS.in | 13 ------------- Makefile.am | 14 -------------- libvirt-dbus.spec.in | 2 +- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 AUTHORS.in
ACK Jan

All of these changes are simple enough so I've put the into single commit: - remove obsolete tags and commands - %global macro is preferred over %define macro - use %autosetup, %make_build and %make_install macros - COPYING file should be listed using %license macro Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- libvirt-dbus.spec.in | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/libvirt-dbus.spec.in b/libvirt-dbus.spec.in index 3a04ad6..4b8e752 100644 --- a/libvirt-dbus.spec.in +++ b/libvirt-dbus.spec.in @@ -1,19 +1,17 @@ # -*- rpm-spec -*- -%define glib2_version @GLIB2_REQUIRED@ -%define libvirt_version @LIBVIRT_REQUIRED@ -%define libvirt_glib_version @LIBVIRT_GLIB_REQUIRED@ -%define system_user @SYSTEM_USER@ +%global glib2_version @GLIB2_REQUIRED@ +%global libvirt_version @LIBVIRT_REQUIRED@ +%global libvirt_glib_version @LIBVIRT_GLIB_REQUIRED@ +%global system_user @SYSTEM_USER@ Name: @PACKAGE@ Version: @VERSION@ -Release: 1%{?dist}%{?extra_release} +Release: 1%{?dist} Summary: libvirt dbus API binding -Group: Development/Libraries License: LGPLv2+ URL: https://libvirt.org/ Source0: https://libvirt.org/sources/dbus/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc BuildRequires: glib2-devel >= %{glib2_version} @@ -30,18 +28,14 @@ Requires(pre): shadow-utils This package provides integration between libvirt and the DBus %prep -%setup -q +%autosetup %build %configure -%__make %{?_smp_mflags} +%make_build %install -rm -rf $RPM_BUILD_ROOT -%__make install DESTDIR=$RPM_BUILD_ROOT - -%clean -rm -rf $RPM_BUILD_ROOT +%make_install %pre getent group %{system_user} >/dev/null || groupadd -r %{system_user} @@ -51,8 +45,8 @@ getent passwd %{system_user} >/dev/null || \ exit 0 %files -%defattr(-,root,root,-) -%doc README.md HACKING.md COPYING NEWS +%doc README.md HACKING.md NEWS +%license COPYING %{_sysconfdir}/polkit-1/rules.d/libvirt-dbus.rules %{_bindir}/libvirt-dbus %{_datadir}/dbus-1/services/org.libvirt.service -- 2.14.3

On Mon, Mar 26, 2018 at 03:43:02PM +0200, Ján Tomko wrote:
On Mon, Mar 26, 2018 at 03:33:51PM +0200, Pavel Hrdina wrote:
All of these changes are simple enough so I've put the into single commit:
Sigh,
Jan
This means that you want me to send a v2 where I split the changes into separate commits? At first I had a single patch for all the spec file changes, I could have keep it like that and call it "rewrite spec file" :). Pavel

On Mon, Mar 26, 2018 at 03:33:51PM +0200, Pavel Hrdina wrote:
All of these changes are simple enough so I've put the into single commit:
- remove obsolete tags and commands - %global macro is preferred over %define macro - use %autosetup, %make_build and %make_install macros - COPYING file should be listed using %license macro
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- libvirt-dbus.spec.in | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-)
ACK if you leave the testament of your laziness in the commit message. Jan

On Mon, Mar 26, 2018 at 05:54:48PM +0200, Ján Tomko wrote:
On Mon, Mar 26, 2018 at 03:33:51PM +0200, Pavel Hrdina wrote:
All of these changes are simple enough so I've put the into single commit:
- remove obsolete tags and commands - %global macro is preferred over %define macro - use %autosetup, %make_build and %make_install macros - COPYING file should be listed using %license macro
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- libvirt-dbus.spec.in | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-)
ACK if you leave the testament of your laziness in the commit message.
Thanks, I'll keep the commit message as it is :). Pavel

libvirt-dbus installs configuration files for these packages therefore it should depend on it. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- libvirt-dbus.spec.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvirt-dbus.spec.in b/libvirt-dbus.spec.in index 4b8e752..f0e63b5 100644 --- a/libvirt-dbus.spec.in +++ b/libvirt-dbus.spec.in @@ -18,9 +18,11 @@ BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: libvirt-devel >= %{libvirt_version} BuildRequires: libvirt-glib-devel >= %{libvirt_glib_version} +Requires: dbus Requires: glib2 >= %{glib2_version} Requires: libvirt-libs >= %{libvirt_version} Requires: libvirt-glib >= %{libvirt_glib_version} +Requires: polkit Requires(pre): shadow-utils -- 2.14.3

On Mon, Mar 26, 2018 at 03:33:52PM +0200, Pavel Hrdina wrote:
libvirt-dbus installs configuration files for these packages therefore it should depend on it.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- libvirt-dbus.spec.in | 2 ++ 1 file changed, 2 insertions(+)
ACK Jan

Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- libvirt-dbus.spec.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libvirt-dbus.spec.in b/libvirt-dbus.spec.in index f0e63b5..675f463 100644 --- a/libvirt-dbus.spec.in +++ b/libvirt-dbus.spec.in @@ -8,7 +8,7 @@ Name: @PACKAGE@ Version: @VERSION@ Release: 1%{?dist} -Summary: libvirt dbus API binding +Summary: libvirt D-Bus API binding License: LGPLv2+ URL: https://libvirt.org/ Source0: https://libvirt.org/sources/dbus/%{name}-%{version}.tar.gz @@ -27,7 +27,7 @@ Requires: polkit Requires(pre): shadow-utils %description -This package provides integration between libvirt and the DBus +This package provides D-Bus API for libvirt %prep %autosetup @@ -43,7 +43,7 @@ This package provides integration between libvirt and the DBus getent group %{system_user} >/dev/null || groupadd -r %{system_user} getent passwd %{system_user} >/dev/null || \ useradd -r -g %{system_user} -d / -s /sbin/nologin \ - -c "Libvirt DBus bridge" %{system_user} + -c "Libvirt D-Bus bridge" %{system_user} exit 0 %files -- 2.14.3

On Mon, Mar 26, 2018 at 03:33:53PM +0200, Pavel Hrdina wrote:
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> --- libvirt-dbus.spec.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
ACK Jan
participants (3)
-
Daniel P. Berrangé
-
Ján Tomko
-
Pavel Hrdina