Your message dated Sat, 16 Mar 2019 15:34:08 +0000
with message-id <[email protected]>
and subject line Bug#881189: fixed in dwww 1.13.4+nmu1
has caused the Debian Bug report #881189,
regarding dwww-index++: make sleep time after each file configurable
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
881189: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=881189
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dwww
Version: 1.13.3+b1
Severity: normal
Tags: patch
Hi,
presumably to keep a machine's load low during indexing, dwww-index++ sleeps
0.15s before feeding the next file to index to index++.
During the generation of live-images, a huge amount of time is just wasted when
running dwww-index++ from a hook script. The attached patch allows for
configuration of the sleep time via dwww.conf.
For my build system (the build root residing on a tmpfs) and live-image package
list, this reduces the execution time of dwww-index++ from ~40min to 20s. \o/
The second patch solves a problem I stumbled upon while I created the first
one: any config variable containing a value that evaluates to boolean false
in a ternary expression would get ignored, its hard-coded default value taking
effect instead.
The patch changes the check to rely on defined($var) instead of the variable's
specific content.
Cheers
Daniel
>From 3406a2866a209f2686bb123723c813e29fd3a3b9 Mon Sep 17 00:00:00 2001
From: Daniel Reichelt <[email protected]>
Date: Wed, 8 Nov 2017 18:25:20 +0100
Subject: [PATCH 2/2] Allow for config values which evaluate to boolean false
Setting e.g. DWWW_INDEX_FULL_SLEEP_TIME to 0 would be evaluated to false
and thus cause the corresponding default value from $cfgvars to be used.
This changes the check to not rely on the specific contents of variables
and to check whether they are defined instead.
---
perl/Debian/Dwww/Initialize.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/perl/Debian/Dwww/Initialize.pm b/perl/Debian/Dwww/Initialize.pm
index 9c633ed..114784e 100644
--- a/perl/Debian/Dwww/Initialize.pm
+++ b/perl/Debian/Dwww/Initialize.pm
@@ -18,7 +18,7 @@ sub DwwwInitialize($) {
my $cfgvars = ReadConfigFile($filename);
my $dwwwvars = {};
- map +{ $dwwwvars->{$_} = $cfgvars->{$_}->{'cfgval'} ?
$cfgvars->{$_}->{'cfgval'}
+ map +{ $dwwwvars->{$_} = defined($cfgvars->{$_}->{'cfgval'}) ?
$cfgvars->{$_}->{'cfgval'}
:
$cfgvars->{$_}->{'defval'} }, keys %$cfgvars;
umask (022);
--
2.14.2
>From 406a428249f71fed8ed1228360846373f2e4a76b Mon Sep 17 00:00:00 2001
From: Daniel Reichelt <[email protected]>
Date: Wed, 8 Nov 2017 18:25:20 +0100
Subject: [PATCH 1/2] dwww-index++: make sleep time after each file
configurable
---
man/dwww.7 | 8 ++++++++
perl/Debian/Dwww/ConfigFile.pm | 5 +++++
scripts/dwww-index++ | 6 +++---
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/man/dwww.7 b/man/dwww.7
index 68d066a..8b6962b 100644
--- a/man/dwww.7
+++ b/man/dwww.7
@@ -230,6 +230,14 @@ If this variable is set to
.BR dwww\-index++ (8)
will generate index of registered documentation.
.\"
+.IP DWWW_INDEX_FULL_SLEEP_TIME
+In order to not impede regular server operation,
+.BR dwww\-index++ (8)
+sleeps for the specified amount of time (in seconds) before feeding the next
file path to index to
+.BR index++ (1).
+The default value is
+.BR 0.15 .
+.\"
.IP DWWW_INDEX_FULL_TIME_INTERVAL
Specifies how often (in days)
.BR dwww\-index++ (8)
diff --git a/perl/Debian/Dwww/ConfigFile.pm b/perl/Debian/Dwww/ConfigFile.pm
index 664180f..c75cd51 100644
--- a/perl/Debian/Dwww/ConfigFile.pm
+++ b/perl/Debian/Dwww/ConfigFile.pm
@@ -96,6 +96,11 @@ sub ReadConfigFile($) {
defval => 28,
descr => 'How often (in days) dwww-index++(8) will generate full
index of documentation.'
},
+ 'DWWW_INDEX_FULL_SLEEP_TIME' => {
+ sort => 50,
+ defval => 0.15,
+ descr => 'How long (in seconds) dwww-index++ should sleep after
each file in order to not impact regular server operation.'
+ },
'DWWW_INDEX_INCREMENTAL_TIME_INTERVAL' => {
sort => 50,
defval => 7,
diff --git a/scripts/dwww-index++ b/scripts/dwww-index++
index 59e3ab1..1e49350 100755
--- a/scripts/dwww-index++
+++ b/scripts/dwww-index++
@@ -218,9 +218,9 @@ sub WriteListOfFilesToIndex($$ ) { # {{{
my $do_sleep = shift;
foreach my $f (sort keys %new_files_hash) {
- syswrite $FH, "$new_files_hash{$f}\n";
- # sleep 150 ms
- select(undef, undef, undef, 0.15) if $do_sleep;
+ syswrite $FH, "$new_files_hash{$f}\n";
+ # sleep the configured amount of time, if $do_sleep
+ select(undef, undef, undef, $dwwwconf->{'DWWW_INDEX_FULL_SLEEP_TIME'})
if $do_sleep;
}
} # }}}
--
2.14.2
--- End Message ---
--- Begin Message ---
Source: dwww
Source-Version: 1.13.4+nmu1
We believe that the bug you reported is fixed in the latest version of
dwww, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Osamu Aoki <[email protected]> (supplier of updated dwww package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sun, 17 Mar 2019 00:01:51 +0900
Source: dwww
Binary: dwww dwww-dbgsym
Architecture: source amd64
Version: 1.13.4+nmu1
Distribution: unstable
Urgency: medium
Maintainer: Robert Luberda <[email protected]>
Changed-By: Osamu Aoki <[email protected]>
Description:
dwww - Read all on-line documentation with a WWW browser
Closes: 781987 822323 881189 924709
Changes:
dwww (1.13.4+nmu1) unstable; urgency=medium
.
* NMU
.
[ Ondřej Nový ]
* d/control: Set Vcs-* to salsa.debian.org . Closes: #924709
.
[ Osamu Aoki ]
* Document properly to enable CGI script. Closes: #781987, #822323
* Apply patch from Daniel Reichelt to make sleep time after each file
configurable for dwww-index++. Closes: #881189
Checksums-Sha1:
87ff49e137224237b3e7e304c5c1818c0747bd50 1576 dwww_1.13.4+nmu1.dsc
ff628677473ae2153cbe046ba82cbbb72584135a 125280 dwww_1.13.4+nmu1.tar.xz
a08d624cca9a207d74061929e40785cf538038ed 47992
dwww-dbgsym_1.13.4+nmu1_amd64.deb
b7a71e3bec91577becba1bb9651fb27aff5528af 6840 dwww_1.13.4+nmu1_amd64.buildinfo
0c7df6c3872432cf719d810ced0c9c2e26bb5d01 125964 dwww_1.13.4+nmu1_amd64.deb
Checksums-Sha256:
0c66320382997e02da29b512c5285d0e89a86c6117971361dc3a52a8f075ff00 1576
dwww_1.13.4+nmu1.dsc
c9ab9d52f69d35c594849a861e0882afc9c3f969a5768babbe976aa9a47efa87 125280
dwww_1.13.4+nmu1.tar.xz
a072d847ca2cc48916c6c97e8d102612a8f07db6d764ebfa7de01af3dd6f0b53 47992
dwww-dbgsym_1.13.4+nmu1_amd64.deb
7355a38502bfa874ca49ace5ea9676836e02cf55a3a451c4bf6b53c4ad40ee68 6840
dwww_1.13.4+nmu1_amd64.buildinfo
5501f637793ebcbc405e9c599b0a142606127556c50ed0c61a8d42641b452a07 125964
dwww_1.13.4+nmu1_amd64.deb
Files:
4f399cd3d6caa1ffcc1fb198b1559c7b 1576 doc optional dwww_1.13.4+nmu1.dsc
07080892497e0d9997d72257bd7fa33b 125280 doc optional dwww_1.13.4+nmu1.tar.xz
5aa1ab4e3b55857360cb793425b1117f 47992 debug optional
dwww-dbgsym_1.13.4+nmu1_amd64.deb
1844e6486904947891abde51d6f4fccd 6840 doc optional
dwww_1.13.4+nmu1_amd64.buildinfo
d048004438891595b49bc8f5c9ca954a 125964 doc optional dwww_1.13.4+nmu1_amd64.deb
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEMTNyTWIHiBV56V1iHhNWiB3Y15EFAlyNFDkACgkQHhNWiB3Y
15HqlA/+OLQ51MIaWN8qw+U6MyGMee2vFJihByzBbyYE57yACYrKzKE1Xr05nBY7
UCsllb4M5rit5cVo0I03y6HUKzAK6tYnCUWTfjHW2He5sPCTjCjjyn2Bdtt3D/gn
gG10ZiBYRc1tks6s6PDIf0aaK6EG1uj8rQQLMx9mB+PenDDqZt9NK5TkF17dsSZv
U1TKleISayW7GnuYeBtTZtamo8SGzqMBWGb+OE7KBLIzLBBKZjngYwbWBgR9yvDM
208zZ+BivpbzKfHKp5MvlR55WeUdwAR1/g2+jDLtFdwsQCADaw5AGVd90JZBEA9s
Z3JvHUbJW/XCHmmLuMa+HMq4TujgkLHEAM3tr0btgyf+kkwyAA0nm0XGgggn1oDd
cVlqK3NsU3CFRAHX6B2iS5rs0gIrtaBKCWvOWdluR9/vq3kA6IEB5cZvdPMA2vWd
Fzpd197RSKDO0yOfylMQzzBoGPpyz1CTxogE7OrMtAlNebfV7uEaKvkfL0Byqnu2
9x9Prif/nLKItX0Ef+NVSgmS4Wk3DCraWkwkFdkncTKtzmZpGc7HZz65HL5ZdOUz
8S08rGfIVX3N5/1zq5Qzj8twPNt+ntP+sCdExHAwcDuVmf7ClhbdNRa6eX9ju+jw
IbQq3lAuQ63U3OihVi5Y1TjPFtqfS4oal3TXZid5LR6p39ntKUo=
=gvGc
-----END PGP SIGNATURE-----
--- End Message ---