[libvirt] [PATCH 0/3] docs/Makefile.am cleanups

The effect of 2/3 will be more apparent after apibuild.py speedups (to be written). Ján Tomko (3): docs/Makefile.am: remove redundant variables docs/Makefile.am: build hvsupport.html earlier docs: drop todo.html .gitignore | 1 - docs/Makefile.am | 44 +++--------------- docs/sitemap.html.in | 4 -- docs/todo.cfg-example | 26 ----------- docs/todo.pl | 125 -------------------------------------------------- 5 files changed, 7 insertions(+), 193 deletions(-) delete mode 100644 docs/todo.cfg-example delete mode 100755 docs/todo.pl -- 2.7.3

Remove DOC_SOURCE_DIR, introduced by and unused since commit b325d74. PERL is already detected in configure.ac. --- docs/Makefile.am | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 206ef3b..f266117 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -16,11 +16,6 @@ ## License along with this library. If not, see ## <http://www.gnu.org/licenses/>. -PERL = perl - -# The directory containing the source code (if it contains documentation). -DOC_SOURCE_DIR=../src - DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt apihtml = \ -- 2.7.3

On Wed, 2016-08-03 at 18:30 +0200, Ján Tomko wrote:
Remove DOC_SOURCE_DIR, introduced by and unused since commit b325d74.
Life was so much simpler back then...
PERL is already detected in configure.ac. --- docs/Makefile.am | 5 ----- 1 file changed, 5 deletions(-)
diff --git a/docs/Makefile.am b/docs/Makefile.am index 206ef3b..f266117 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -16,11 +16,6 @@ ## License along with this library. If not, see ## <http://www.gnu.org/licenses/>.
-PERL = perl - -# The directory containing the source code (if it contains documentation). -DOC_SOURCE_DIR=../src - DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt
apihtml = \
ACK -- Andrea Bolognani / Red Hat / Virtualization

This file requires three steps instead of two. Move it earlier in the list of targets to avoid waiting for it. --- docs/Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index f266117..d6e975d 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -96,9 +96,10 @@ internals_html = $(internals_html_in:%.html.in=%.html) # For all other files, since we ship pre-built html in the # tarball, we must also ship the sources, even when those # sources are themselves generated. -dot_html_in = $(notdir $(wildcard $(srcdir)/*.html.in)) \ +dot_html_in = \ + hvsupport.html.in \ todo.html.in \ - hvsupport.html.in + $(notdir $(wildcard $(srcdir)/*.html.in)) dot_html = $(dot_html_in:%.html.in=%.html) dot_php_in = $(notdir $(wildcard $(srcdir)/*.php.in)) -- 2.7.3

On Wed, 2016-08-03 at 18:30 +0200, Ján Tomko wrote:
This file requires three steps instead of two.
Did you mean "two steps instead of one"? AFAICT it goes hvsupport.pl → hvsupport.html.in → hvsupport.html as opposed to eg. drvqemu.html.in → drvqemu.html
Move it earlier in the list of targets to avoid waiting for it.
This might warrant a comment in Makefile.am, just to make sure the list will not be shuffled around again in the future.
--- docs/Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/docs/Makefile.am b/docs/Makefile.am index f266117..d6e975d 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -96,9 +96,10 @@ internals_html = $(internals_html_in:%.html.in=%.html) # For all other files, since we ship pre-built html in the # tarball, we must also ship the sources, even when those # sources are themselves generated. -dot_html_in = $(notdir $(wildcard $(srcdir)/*.html.in)) \ +dot_html_in = \ + hvsupport.html.in \ todo.html.in \ - hvsupport.html.in + $(notdir $(wildcard $(srcdir)/*.html.in)) dot_html = $(dot_html_in:%.html.in=%.html)
dot_php_in = $(notdir $(wildcard $(srcdir)/*.php.in))
ACK -- Andrea Bolognani / Red Hat / Virtualization

There is little information value in: Todo list unavailable: no config file Drop the file completely along with the script generating it. --- .gitignore | 1 - docs/Makefile.am | 34 ++------------ docs/sitemap.html.in | 4 -- docs/todo.cfg-example | 26 ----------- docs/todo.pl | 125 -------------------------------------------------- 5 files changed, 4 insertions(+), 186 deletions(-) delete mode 100644 docs/todo.cfg-example delete mode 100755 docs/todo.pl diff --git a/.gitignore b/.gitignore index e87c085..96347d8 100644 --- a/.gitignore +++ b/.gitignore @@ -73,7 +73,6 @@ /docs/libvirt-qemu-*.xml /docs/libvirt-refs.xml /docs/search.php -/docs/todo.html.in /examples/admin/client_close /examples/admin/client_info /examples/admin/client_limits diff --git a/docs/Makefile.am b/docs/Makefile.am index d6e975d..4665050 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -90,15 +90,10 @@ internals_html_in = \ $(patsubst $(srcdir)/%,%,$(wildcard $(srcdir)/internals/*.html.in)) internals_html = $(internals_html_in:%.html.in=%.html) -# todo.html is special - it is shipped in the tarball, but we -# have a dedicated 'todo' target to rebuild it from a proper -# config file, all other users are able to build it locally. -# For all other files, since we ship pre-built html in the -# tarball, we must also ship the sources, even when those -# sources are themselves generated. +# Since we ship pre-built html in the tarball, we must also ship +# the sources, even when those sources are themselves generated. dot_html_in = \ hvsupport.html.in \ - todo.html.in \ $(notdir $(wildcard $(srcdir)/*.html.in)) dot_html = $(dot_html_in:%.html.in=%.html) @@ -156,7 +151,7 @@ EXTRA_DIST= \ $(patches) $(dot_php_in) $(dot_php_code_in) $(dot_php)\ $(internals_html_in) $(internals_html) \ sitemap.html.in aclperms.htmlinc \ - todo.pl hvsupport.pl todo.cfg-example \ + hvsupport.pl \ $(schema_DATA) acl_generated = aclperms.htmlinc @@ -183,24 +178,6 @@ admin_api: $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml web: $(dot_html) $(internals_html) html/index.html devhelp/index.html \ $(dot_php) -todo.html.in: todo.pl - if [ -f todo.cfg ]; then \ - echo "Generating $@"; \ - $(PERL) $< > $@ \ - || { rm $@ && exit 1; }; \ - else \ - echo "Stubbing $@"; \ - printf "%s\n" \ - "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \ - "<body>" \ - "<h1>Todo list unavailable: no config file</h1>" \ - "</body></html>" > $@ ; \ - fi - -todo: - rm -f todo.html.in - $(MAKE) todo.html - hvsupport.html: $(srcdir)/hvsupport.html.in $(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \ @@ -210,8 +187,6 @@ $(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \ $(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(top_srcdir)/src > $@ \ || { rm $@ && exit 1; } -.PHONY: todo - %.png: %.fig convert -rotate 90 $< $@ @@ -333,8 +308,7 @@ clean-local: rm -f *~ *.bak *.hierarchy *.signals *-unused.txt *.html maintainer-clean-local: clean-local - rm -rf $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml \ - todo.html.in + rm -rf $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml rm -rf $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml rm -rf $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml rm -rf $(srcdir)/libvirt-admin-api.xml $(srcdir)/libvirt-admin-refs.xml diff --git a/docs/sitemap.html.in b/docs/sitemap.html.in index 757d5aa..fd80d76 100644 --- a/docs/sitemap.html.in +++ b/docs/sitemap.html.in @@ -449,10 +449,6 @@ <span>Security bug reporting and resolution process</span> </li> <li> - <a href="todo.html">Todo list</a> - <span>Main feature request list</span> - </li> - <li> <a href="pending.html">Pending patches</a> <span>Pending patches awaiting reviews and integration</span> </li> diff --git a/docs/todo.cfg-example b/docs/todo.cfg-example deleted file mode 100644 index a99c61a..0000000 --- a/docs/todo.cfg-example +++ /dev/null @@ -1,26 +0,0 @@ -bugzilla = { - #username = ...some email addr... - #password = ...some bz password... - server = https://bugzilla.redhat.com -} -query = { - product = Virtualization Tools - alias = libvirtTodo -} - -output = { - title = Todo list - blurb = <<EOF -This is a summary of all the ideas submitted for future todo items in -libvirt. Listing an idea here does not imply that it is committed to -for inclusion in libvirt, just that someone thought it might be a -useful feature. Discussion for final approval of features always takes -place on the <a href="contact.html">development mailing list</a>. -If you intend to work on one of the items here, it is recommended to -add a comment to the corresponding bugzilla ticket to this effect. -This will reduce the risk of duplicated effort between developers. -It is also strongly recommended to mail the development mailing list -with proposals for new APIs & XML before fully implementing them, to -allow for early design review. -EOF -} diff --git a/docs/todo.pl b/docs/todo.pl deleted file mode 100755 index 36698e8..0000000 --- a/docs/todo.pl +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use BZ::Client; -use BZ::Client::Bug; - -use Config::Record; - -my $cfg = Config::Record->new(file => "todo.cfg"); -my $server = $cfg->get("bugzilla/server", "https://bugzilla.redhat.com"); -my $username = $cfg->get("bugzilla/username"); -my $password = $cfg->get("bugzilla/password"); - -my $product = $cfg->get("query/product", "Virtualization Tools"); -my $todoalias = $cfg->get("query/todoalias", "libvirtTodo"); - -my $title = $cfg->get("output/title", undef); -my $blurb = $cfg->get("output/blurb", undef); - -$SIG{__DIE__} = sub { - my $err = shift; - if (UNIVERSAL::isa($err, "BZ::Client::Exception")) { - die "Unable to access bugzilla: " . $err->message; - } - die $err; -}; - -my $client = BZ::Client->new(url => $server, - user => $username, - password => $password); - -my $todo = BZ::Client::Bug->search($client, {'product' => $product, - 'alias' => $todoalias}); - -die "Cannot find bug alias 'libvirtTodo'" unless $#{$todo} > -1; -my $todoid = $todo->[0]->{'bug_id'}; -my $todosummary = $todo->[0]->{'short_desc'}; -$todosummary =~ s/^\s*RFE\s*:\s*//; -$todosummary =~ s/^\s*\[\s*RFE\s*\]\s*:?\s*//; -$todosummary =~ s/^\s*Tracker\s*:\s*//; - -my $trackers = BZ::Client::Bug->search($client, {'product' => $product, - 'blocked' => $todoid }); - -my @trackers; - -foreach my $tracker (@{$trackers}) { - next if $tracker->{'bug_status'} eq "CLOSED"; - - my $summary = $tracker->{'short_desc'}; - $summary =~ s/^\s*RFE\s*:\s*//; - $summary =~ s/^\s*\[\s*RFE\s*\]\s*:?\s*//; - $summary =~ s/^\s*Tracker\s*:\s*//; - - push @trackers, { - id => $tracker->{'bug_id'}, - summary => $summary, - features => [], - }; -} - -foreach my $tracker (@trackers) { - my $features = BZ::Client::Bug->search($client, {'product' => $product, - 'blocked' => $tracker->{id}}); - - foreach my $feature (@{$features}) { - next if $feature->{'bug_status'} eq "CLOSED"; - - my $summary = $feature->{'short_desc'}; - $summary =~ s/^\s*RFE\s*:\s*//; - $summary =~ s/^\s*\[\s*RFE\s*\]\s*:?\s*//; - - push @{$tracker->{features}}, { - id => $feature->{'bug_id'}, - summary => $summary, - }; - } -} - -sub escape { - my $txt = shift; - $txt =~ s/&/&/g; - $txt =~ s/</</g; - $txt =~ s/>/>/g; - return $txt; -}; - -print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; -print "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"; -print "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"; -print " <body>\n"; -if (defined $title) { - print " <h1>", &escape($title), "</h1>\n"; -} else { - print " <h1>", &escape($todosummary), "</h1>\n"; -} -if (defined $blurb) { - print " <p>\n"; - print $blurb; - print " </p>\n"; -} -foreach my $tracker (sort { $a->{summary} cmp $b->{summary} } @trackers) { - next unless $#{$tracker->{features}} >= 0; - - my $summary = &escape($tracker->{summary}); - my $id = $tracker->{id}; - print " <h2><a href=\"$server/$id\">$summary</a></h2>\n"; - print " <ul>\n"; - foreach my $feature (sort { $a->{summary} cmp $b->{summary} } @{$tracker->{features}}) { - $summary = &escape($feature->{summary}); - $summary =~ s,^([^:]+):,<strong>$1</strong>,; - - $id = $feature->{id}; - print " <li>$summary (<strong>rhbz <a href=\"$server/$id\">$id</a></strong>)</li>\n"; - } - print " </ul>\n"; -} - -print " <p>\n"; -print " This page is automatically generated from <a href=\"$server/$todoid\">", &escape($todosummary), "</a>\n"; -print " </p>\n"; -print " </body>\n"; -print "</html>\n"; -- 2.7.3

On 08/03/2016 12:30 PM, Ján Tomko wrote:
There is little information value in: Todo list unavailable: no config file
Drop the file completely along with the script generating it. ---
I had a similar patch before: http://www.redhat.com/archives/libvir-list/2016-May/msg01618.html The only real difference is that I changed the website to point to http://wiki.libvirt.org/page/Todo which grabs a list of RFE bugs from bugzilla. I'm fine with this approach of dropping the website sidebar 'todo' entry entirely though... I opted to keep it just to avoid a potential source of complaints for my patch - Cole

On Wed, 2016-08-03 at 18:30 +0200, Ján Tomko wrote:
There is little information value in: Todo list unavailable: no config file Drop the file completely along with the script generating it. --- .gitignore | 1 - docs/Makefile.am | 34 ++------------ docs/sitemap.html.in | 4 -- docs/todo.cfg-example | 26 ----------- docs/todo.pl | 125 -------------------------------------------------- 5 files changed, 4 insertions(+), 186 deletions(-) delete mode 100644 docs/todo.cfg-example delete mode 100755 docs/todo.pl
Yes please. Having a static list of items pulled from Bugzilla in the release archives would be quite pointless even if we actually managed to build it correctly; as it stands, it's just embarassing. Same for the website. You'll want to incorporate Cole's proposed changes to TODO, or at the very least rid that file of any reference to URLs you're removing with this commit ;) On the other hand, removing todo.html outright would result in a valid URL turning into a 404, which is not cool. ACK if you squash in the attached patch, or provide an alternative solution for these issues. -- Andrea Bolognani / Red Hat / Virtualization
participants (3)
-
Andrea Bolognani
-
Cole Robinson
-
Ján Tomko