Thread: Docs and examples deleted from package

Docs and examples deleted from package

From
Craig Ringer
Date:
Hi

The spec file seems to delete the docs, except for the HTML files, entirely.

Any idea why?

rm -rf %{buildroot}%{_docdir}/pgsql

I think it's an oversight, where the "important" docs were supposed to
be moved out of there. However, it removes all the extension docs and
sample files.

So it looks like %{buildroot}%{_docdir}/pgsql/extension should be
rescued before this gets done.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


Re: Docs and examples deleted from package

From
Devrim Gündüz
Date:
Hi,

On Wed, 2014-06-18 at 14:53 +0800, Craig Ringer wrote:
> The spec file seems to delete the docs, except for the HTML files,
> entirely.
>
> Any idea why?
>
> rm -rf %{buildroot}%{_docdir}/pgsql

See the lines prior to that. The directory that we remove is something
that is not used in PGDG RPMs -- since we have multiple version feature,
so we move docs under /usr/share/doc/postgresql94-docs (or whatever the
version is) directory.

I am not saying that we are deleting too much:

> I think it's an oversight, where the "important" docs were supposed to
> be moved out of there. However, it removes all the extension docs and
> sample files.
>
> So it looks like %{buildroot}%{_docdir}/pgsql/extension should be
> rescued before this gets done.

Can you please give me one of the file names that should not be deleted?
Also, can you please look at -docs subpackage?

Regards,

--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR


Attachment

Re: Docs and examples deleted from package

From
Craig Ringer
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/18/2014 09:50 PM, Devrim Gündüz wrote:
> Can you please give me one of the file names that should not be
> deleted?

The subtree usually installed as:

share/doc/postgresql/extension

so

share/doc/postgresql/extension/timetravel.example
share/doc/postgresql/extension/autoinc.example
share/doc/postgresql/extension/insert_username.example
share/doc/postgresql/extension/refint.example
share/doc/postgresql/extension/moddatetime.example


so I've appended the following to the %files contrib stanza:

%doc %{pgbaseinstdir}/share/doc/extension/autoinc.example
%doc %{pgbaseinstdir}/share/doc/extension/insert_username.example
%doc %{pgbaseinstdir}/share/doc/extension/moddatetime.example
%doc %{pgbaseinstdir}/share/doc/extension/refint.example
%doc %{pgbaseinstdir}/share/doc/extension/timetravel.example

and made the following change in %build:

- -rm -rf %{buildroot}%{_docdir}/pgsql
+mv %{buildroot}%{_docdir}/pgsql/extension
%{buildroot}%{pgbaseinstdir}/share/doc/extension
+# use rmdir so we fail if the docs dir is non-empty after we move
everything out
+rmdir %{buildroot}%{_docdir}/pgsql


My only reason for listing the files separately was that I wanted to
package another extension that's built as part of the main tree as a
separate extension. Once I fix that, I'd just be adding:

%docdir %{pgbaseinstdir}/share/doc/extension
%{pgbaseinstdir}/share/doc/extension

and that's all that it makes sense to do in PGDG.


> Also, can you please look at -docs subpackage?

They're not packaged there; as noted above, they get deleted from the
build.

- --
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJToZv2AAoJELBXNkqjr+S25aYH/AwJzG0CeMS4w5/7xoQqVE4f
43MUAq8HtTCwORw63kyoyH+gRAFjBn4wIVk1QNWi5qzYro+YXYy8JMEmzJ7mJXG3
BB3XczYfLbPvhOB7b/TW9mgWCLuEQ3HboVcjAn9hegRNSJZsSFmAQXxfSQ/1hzXB
xEQ9XHaEBAu7z+BlEoOI81E6Xa1u9QTKFcqCaK7vzUs261J+6/belPmc39Is4Dhl
z9CsII+ROHhjhcyplEQma137+7uHDUU2Yj6WX6i05ZgRmOVZPyrNLRK8iMn1zWGf
uTxTSBUS23+J3gwfPi1XTpmfb/t1bB0erkv6wCDc1gv2cnjVEdZemQxIPJ/8ztc=
=ayt6
-----END PGP SIGNATURE-----