Commit Graph

47 Commits

Author SHA1 Message Date
Richard W.M. Jones
e2c7bddf10 Update copyright dates for 2023
Run this command across the source:

  perl -pi.bak -e 's/(20[012][0-9])-20[12][012]/$1-2023/g' `git ls-files`

and remove changes to po{,-docs}/*.po{,t} (these will be regenerated
later when we run 'make dist').
2023-02-07 10:50:48 +00:00
Richard W.M. Jones
cb8c4d90e1 podwrapper: Use the tarball release date to calculate the stable date.
Fixes: commit eb53d74ba2
2021-03-29 18:29:15 +01:00
Richard W.M. Jones
0e17236d7d Update copyright dates to 2020. 2020-03-06 19:32:32 +00:00
Richard W.M. Jones
46e59e9535 podwrapper: __INCLUDE:file.pod__ and __VERBATIM:file.txt__ in POD files.
The current method of adding multiple --insert or --verbatim
parameters to the podwrapper command is not very easy to use because
it involves modifying the Makefile.am in every place where this is
used, plus under po-docs/$language/Makefile.am.  It's better if the
POD file itself can do the inclusion.

This enhances support so that the special sequences

  __INCLUDE:file.pod__

or

  __VERBATIM:file.txt__

are treated as file inclusion.

The filename must be a plain file and is searched along a path
(supplied by the optional podwrapper --path parameter).  The purpose
of the path is to allow translations to happen more easily.  For
example we can include a particular POD fragment from common/options/
for the English version, but copy the translated file to
po-docs/$language/ for every translated version.
2019-11-28 13:28:49 +00:00
Chris Lamb
d58c4e79d8 Make the build reproducible
Whilst working on the Reproducible Builds effort [0] we noticed
that libnbd could not be built reproducibly.

This is due to it shipping a pod generation wrapper that
does not use/respect SOURCE_DATE_EPOCH [1] and additionally
varies the output depending on the build user's current
timezone.

(This was originally filed in Debian as #939546 [2].)

 [0] https://reproducible-builds.org/
 [1] https://reproducible-builds.org/docs/source-date-epoch/
 [2] https://bugs.debian.org/939546

Signed-off-by: Chris Lamb <lamby@debian.org>
2019-09-06 09:42:35 +01:00
Richard W.M. Jones
a0f9553d21 html: Link within all libguestfs projects. 2019-09-05 15:11:40 +01:00
Richard W.M. Jones
05d4fcb64d Update copyright dates for 2019.
This command run over the source:

perl -pi.bak -e 's/(20[01][0-9])-2018/$1-2019/g' `git ls-files`
2019-01-08 11:58:30 +00:00
Richard W.M. Jones
212762c593 Update copyright dates for 2018.
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2017/$1-2018/g' `git ls-files`
2018-01-04 15:30:10 +00:00
Richard W.M. Jones
441fa82ee0 podwrapper: nbdkit-* man pages are libguestfs man pages.
Don't use the external link for these.

Thanks: Ming Xie.
2017-11-07 10:04:46 +00:00
Pino Toscano
55bf7de97c Update copyright dates for 2017
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2016/$1-2017/g' `git ls-files`

(Thanks Rich for the perl snippet, as used in past years.)
2017-01-03 16:48:21 +01:00
Richard W.M. Jones
76c0a67d30 build: Add common CLEANFILES and DISTCLEANFILES to common-rules.mk.
By adding common CLEANFILES and DISTCLEANFILES variables to
common-rules.mk, we can remove these from most other Makefiles, and
also clean files more consistently.

Note that bin_PROGRAMS are already cleaned by 'make clean', so I
removed cases where these were unnecessarily added to CLEANFILES.
2016-08-25 16:54:34 +01:00
Richard W.M. Jones
a11a7ebbc3 build: Add silent rules for podwrapper.
Also quietens the podwrapper script itself, as there is no reason to
print 'wrote <output>' for each output file.
2016-08-04 23:33:58 +01:00
Richard W.M. Jones
314c5795b0 podwrapper: Remove output file on failure.
Otherwise we end up generated a bad output file and (in some cases)
continuing the build.

Updates commit b23e149774.
2016-04-24 15:35:10 +01:00
Richard W.M. Jones
b23e149774 podwrapper: Send errors to stderr and die if any errors seen.
Enable a few POD options:

 - Don't generate an errata section in the output.

 - Send errors and warnings to stderr.

 - Die if any errors or warnings are seen while generating the outputs.
2016-04-22 09:09:10 +01:00
Richard W.M. Jones
bb27fc1c0a podwrapper: Generate consistent WARNING sections (RHBZ#1293527). 2016-01-11 13:42:49 +00:00
Richard W.M. Jones
6fa4d983a3 podwrapper: Enforce that every manual page must have a DESCRIPTION section.
For every user command line tool (eg. guestfish or virt-cat) require
that the manual page has a DESCRIPTION section.  This doesn't apply to
non-CLI man pages (eg. guestfs-perl, guestfs-faq).
2016-01-11 13:42:49 +00:00
Richard W.M. Jones
307c83177c Update copyright dates for 2016.
Run the following command over the source:

  perl -pi.bak -e 's/(20[01][0-9])-2015/$1-2016/g' `git ls-files`
2016-01-02 21:19:51 +00:00
Richard W.M. Jones
47b095b928 website: Put website into a separate directory.
Move the random set of HTML files we build from html/ into
the website/ directory.

Also in the website/ directory, put the index.html file from
http://libguestfs.org, which was previously not under version control.
It is generated from index.html.in so we can automatically add the
current version and release date.

Also in the website/ directory, put various CSS file, images, etc.
which are required by the website and were also previously not under
version control.

Change the 'make website' rule to 'make maintainer-upload-website'.
As the name suggests, it is only useful for the maintainer, and will
fail with an error for anyone else.
2015-10-31 17:09:29 +00:00
Pino Toscano
d98c9c0e0b Fix shebang in perl scripts
Instead of hardcoding the location of perl (assuming it is installed in
/usr), use /usr/bin/env to run it, and thus picking it from $PATH.
This makes it possible to run these scripts also on installations with
perl in a different prefix than /usr.

Also, given that we want enable warnings on scripts, turn the -w
previously in shebang to explicit "use warnings;" in scripts which
didn't have it before.
2015-10-05 15:43:35 +02:00
Pino Toscano
d8f1962bd2 podwrapper: simplify external references pointing to self
When convering a POD documentation, possibily combining various
sub-documents together, simplify the L<> links that explicitly point to
the very same documentation being generated.

For example, when generating the virt-builder documentation, links like
  L<virt-builder(1)/SECTION>
will be turned into
  L</SECTION>
thus not making Pod::Simple parse them as external reference.

While it is a slightly crude hack, it seems there's no easy way to
process the link parsing with Pod::Simple subclasses.
2015-06-09 10:54:13 +02:00
Richard W.M. Jones
762c0bdab9 docs: Remove some rogue references to 'febootstrap'. 2015-03-23 12:12:23 +00:00
Richard W.M. Jones
c5800dc97d Update copyright dates for 2015. 2015-01-17 09:08:15 +00:00
Richard W.M. Jones
31c07bc9d8 podwrapper: Put =encoding line before first POD directive.
=head isn't always the first POD directive.

This fixes commit 1148bd91ce.
2014-06-13 22:44:38 +01:00
Richard W.M. Jones
1148bd91ce podwrapper: Put the =encoding line at the correct place in the input (RHBZ#1109174).
Commit c4dc70f8c4 broke the man pages
for the Perl scripts in the tools/ directory.

It inserted the =encoding line at the top of the file, instead of in
front of the first =head1 entry, and this meant that the #!/usr/bin/perl
and the prologue became a part of the POD, which was not intended.
2014-06-13 19:59:22 +01:00
Richard W.M. Jones
c4dc70f8c4 podwrapper: Remove =encoding from input files and add it back in podwrapper.
This changes podwrapper so that the input (POD) files should not
contain an =encoding directive.  However they must be UTF-8.
Podwrapper then adds the '=encoding utf8' directive back during final
generation.

This in particular avoids problems with nested =encoding directives in
fragments.  These break POD, and are undesirable anyway.
2014-03-20 13:47:19 +00:00
Richard W.M. Jones
d4129988c1 podwrapper: Give an error if an --insert or --verbatim pattern is not found in the input. 2014-03-20 13:46:45 +00:00
Hilko Bengen
bbfb9f9480 podwrapper: Recognize git-style dates in ChangeLog 2014-02-14 15:09:42 +01:00
Richard W.M. Jones
6c971faecf Update copyright dates for 2014. 2014-01-02 16:53:34 +00:00
Richard W.M. Jones
edacd479fa podwrapper: virt-install is not a libguestfs page.
This now redirect to http://man.he.net/man1/virt-install, but this is
unfortunately a 404.

Incomplete fix for RHBZ#1029134.

Thanks: Paul Maunders.
2013-11-11 18:38:37 +00:00
Richard W.M. Jones
bd30d3a61c podwrapper: guestunmount is a libguestfs page, don't link it to he.net. 2013-08-15 09:12:44 +01:00
Richard W.M. Jones
aab882a3a6 podwrapper: Set Text::Wrap::huge property to "overflow".
This stops long URLs from being broken in the text output mode.

See:
https://www.redhat.com/archives/libguestfs/2013-May/thread.html#00088
2013-05-30 11:47:26 +01:00
Richard W.M. Jones
a3de6eddd4 pod: Fix "wide character in print" warnings by declaring encoding correctly. 2013-04-05 10:33:25 +01:00
Richard W.M. Jones
a0a4ee5245 Use 'supermin' and 'supermin-helper' in preference to febootstrap.
Febootstrap has been renamed upstream to 'supermin':
https://www.redhat.com/archives/libguestfs/2013-February/msg00004.html

This commit changes libguestfs so it can use either program to build
the supermin appliance.
2013-02-05 15:31:05 +00:00
Richard W.M. Jones
ce828c6afc podwrapper: Refresh podwrapper man page.
This also adds a rule so you can do:

 make podwrapper.1

if you want to read the documentation as a man page.
2013-01-15 18:40:17 +00:00
Richard W.M. Jones
4a4ca0c01d syntax: Use __PATTERNS__ instead of @PATTERNS@ in podwrapper man pages.
It is slightly dangerous to use @PATTERNS@, since these might
be substituted by autoconf when they appear in Makefile.am files.
2012-10-03 09:22:45 +01:00
Richard W.M. Jones
ddc67d94f3 po-docs: Fix podwrapper so it works on translated POD files.
These don't contain literal strings like "AUTHORS" (they have the
translated versions instead) and so checking for these English strings
is rather useless.

Also we don't usually have the '--license' parameter conveniently
around so don't enforce this section.
2012-08-28 13:18:47 +01:00
Richard W.M. Jones
23b7fe09e1 tools: Fix podwrapper errors in tools directory.
This also makes the test for license "code" less strict, so it should
only match POD, not Perl comments.

This fixes commit 2f97bf873b.
2012-08-28 13:18:40 +01:00
Richard W.M. Jones
d555a68ca6 podwrapper: Ignore $parser->html_charset if it fails (thanks Wulf C. Krueger).
This method was added in Pod::Simple 3.16 so earlier versions of Perl
won't have it.  It's not the end of the world if we don't set it.
2012-08-28 04:46:04 -04:00
Richard W.M. Jones
c638e1f03d docs: Use man page name as default title in HTML output. 2012-08-21 22:02:21 +01:00
Richard W.M. Jones
2f97bf873b podwrapper: Add --license parameter, which is required.
This adds standard LICENSE and BUGS sections to all of the man pages
that are processed by podwrapper.

Modify all the calls to $(PODWRAPPER) to add the right --license
parameter according to the content.  Note that this relaxes the
license on some code example pages, making them effectively BSD-style
licensed.
2012-08-21 20:33:21 +01:00
Richard W.M. Jones
e89e180d2b podwrapper: Ensure the input file is printed in some error messages. 2012-08-21 20:11:15 +01:00
Richard W.M. Jones
f514d462cd podwrapper: Fix setting of GIT_DIR in git subcommand.
This fixes commit 1e17a32060.
2012-07-19 16:10:48 +01:00
Richard W.M. Jones
8e75e21b23 podwrapper: Use UTF8 in output, send errors to stderr.
This fixes commit 1e17a32060.
2012-07-17 20:04:24 +01:00
Richard W.M. Jones
182b4a6660 podwrapper: Subclass Pod::Man so we can fix the way links are generated. 2012-07-17 13:18:34 +01:00
Richard W.M. Jones
9967ad3fa1 podwrapper: Define $VERSION in subclass.
The superclass sometimes uses this and will give an undefined
error if it's missing.
2012-07-17 13:18:34 +01:00
Richard W.M. Jones
60c42dd2a1 podwrapper: Tidy up the program name.
Messages now look like this:

  podwrapper.pl: wrote guestfs-examples.3
  podwrapper.pl: wrote ../html/guestfs-examples.3.html
2012-07-17 13:18:34 +01:00
Richard W.M. Jones
1e17a32060 Replace podwrapper shell script with custom Perl script.
This uses Pod::Simple so it properly parses the input POD and can
generate proper custom output as required specifically by libguestfs.

One immediate benefit is that links between and within manual pages
now work mostly correctly.
2012-07-16 22:53:01 +01:00