public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] building pve-docs - Can't locate PVE/RESTHandler.pm
@ 2021-09-17 14:57 Sylvain Faivre
  2021-09-17 18:16 ` Georges Martin
  2021-09-18 11:06 ` Thomas Lamprecht
  0 siblings, 2 replies; 6+ messages in thread
From: Sylvain Faivre @ 2021-09-17 14:57 UTC (permalink / raw)
  To: pve-devel

Hello,

I am planning to submit patches for the Proxmox docs, following my post at
https://forum.proxmox.com/threads/some-notes-and-questions-about-proxmox-cluster-networking.96001/

I found the pve-docs git repo, and read through
https://pve.proxmox.com/wiki/Developer_Documentation

In order to see the results of my changes, I am trying to compile the docs
from the .adoc source files.
For this, I read the README.adoc file in the pve-docs repo, which says :

> To simplify the documentation task, we keep all Documentation within
> this repository. It is possible to generate the docs without installing
> any additional Proxmox packages with:
>
>  make pve-doc-generator.mk
>  make index

The first command seems to run fine :
$ make pve-doc-generator.mk
./scan-adoc-refs *.adoc --depends .pve-doc-depends.tmp > link-refs.json.tmp
cat pve-doc-generator.mk.in .pve-doc-depends > pve-doc-generator.mk.tmp
sed -i "s/@RELEASE@$/7.0/" pve-doc-generator.mk.tmp
mv pve-doc-generator.mk.tmp pve-doc-generator.mk
make: 'pve-doc-generator.mk' is up to date.

The second command fails with :
$ make index
./extractapi.pl >api-viewer/apidata.js
Can't locate PVE/RESTHandler.pm in @INC (you may need to install the
PVE::RESTHandler module) (@INC contains: /etc/perl
/usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1
/usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5
/usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32
/usr/share/perl/5.32 /usr/local/lib/site_perl) at ./extractapi.pl line 6.
BEGIN failed--compilation aborted at ./extractapi.pl line 6.
make: *** [Makefile:155: api-viewer/apidata.js] Error 2

I don't know where to find the PVE::RESTHandler module. What should I do
next ?

Thanks in advance.

Sylvain


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [pve-devel] building pve-docs - Can't locate PVE/RESTHandler.pm
  2021-09-17 14:57 [pve-devel] building pve-docs - Can't locate PVE/RESTHandler.pm Sylvain Faivre
@ 2021-09-17 18:16 ` Georges Martin
  2021-09-18 10:51   ` Sylvain Faivre
  2021-09-18 11:06 ` Thomas Lamprecht
  1 sibling, 1 reply; 6+ messages in thread
From: Georges Martin @ 2021-09-17 18:16 UTC (permalink / raw)
  To: Proxmox VE development discussion

Have you run this command on a PVE server ?

> Le 17 sept. 2021 à 16:58, Sylvain Faivre <sylvainfaivre@gmail.com> a écrit :
> 
> Hello,
> 
> I am planning to submit patches for the Proxmox docs, following my post at
> https://forum.proxmox.com/threads/some-notes-and-questions-about-proxmox-cluster-networking.96001/
> 
> I found the pve-docs git repo, and read through
> https://pve.proxmox.com/wiki/Developer_Documentation
> 
> In order to see the results of my changes, I am trying to compile the docs
> from the .adoc source files.
> For this, I read the README.adoc file in the pve-docs repo, which says :
> 
>> To simplify the documentation task, we keep all Documentation within
>> this repository. It is possible to generate the docs without installing
>> any additional Proxmox packages with:
>> 
>> make pve-doc-generator.mk
>> make index
> 
> The first command seems to run fine :
> $ make pve-doc-generator.mk
> ./scan-adoc-refs *.adoc --depends .pve-doc-depends.tmp > link-refs.json.tmp
> cat pve-doc-generator.mk.in .pve-doc-depends > pve-doc-generator.mk.tmp
> sed -i "s/@RELEASE@$/7.0/" pve-doc-generator.mk.tmp
> mv pve-doc-generator.mk.tmp pve-doc-generator.mk
> make: 'pve-doc-generator.mk' is up to date.
> 
> The second command fails with :
> $ make index
> ./extractapi.pl >api-viewer/apidata.js
> Can't locate PVE/RESTHandler.pm in @INC (you may need to install the
> PVE::RESTHandler module) (@INC contains: /etc/perl
> /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1
> /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5
> /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32
> /usr/share/perl/5.32 /usr/local/lib/site_perl) at ./extractapi.pl line 6.
> BEGIN failed--compilation aborted at ./extractapi.pl line 6.
> make: *** [Makefile:155: api-viewer/apidata.js] Error 2
> 
> I don't know where to find the PVE::RESTHandler module. What should I do
> next ?
> 
> Thanks in advance.
> 
> Sylvain
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [pve-devel] building pve-docs - Can't locate PVE/RESTHandler.pm
  2021-09-17 18:16 ` Georges Martin
@ 2021-09-18 10:51   ` Sylvain Faivre
  0 siblings, 0 replies; 6+ messages in thread
From: Sylvain Faivre @ 2021-09-18 10:51 UTC (permalink / raw)
  To: Proxmox VE development discussion

Well I develop on my desktop, not on a PVE server. I will try compiling the
docs on a server.
Thanks for the hint.

Le ven. 17 sept. 2021 à 20:17, Georges Martin <jrjsmrtn@gmail.com> a écrit :

> Have you run this command on a PVE server ?
>
> > Le 17 sept. 2021 à 16:58, Sylvain Faivre <sylvainfaivre@gmail.com> a
> écrit :
> >
> > Hello,
> >
> > I am planning to submit patches for the Proxmox docs, following my post
> at
> >
> https://forum.proxmox.com/threads/some-notes-and-questions-about-proxmox-cluster-networking.96001/
> >
> > I found the pve-docs git repo, and read through
> > https://pve.proxmox.com/wiki/Developer_Documentation
> >
> > In order to see the results of my changes, I am trying to compile the
> docs
> > from the .adoc source files.
> > For this, I read the README.adoc file in the pve-docs repo, which says :
> >
> >> To simplify the documentation task, we keep all Documentation within
> >> this repository. It is possible to generate the docs without installing
> >> any additional Proxmox packages with:
> >>
> >> make pve-doc-generator.mk
> >> make index
> >
> > The first command seems to run fine :
> > $ make pve-doc-generator.mk
> > ./scan-adoc-refs *.adoc --depends .pve-doc-depends.tmp >
> link-refs.json.tmp
> > cat pve-doc-generator.mk.in .pve-doc-depends > pve-doc-generator.mk.tmp
> > sed -i "s/@RELEASE@$/7.0/" pve-doc-generator.mk.tmp
> > mv pve-doc-generator.mk.tmp pve-doc-generator.mk
> > make: 'pve-doc-generator.mk' is up to date.
> >
> > The second command fails with :
> > $ make index
> > ./extractapi.pl >api-viewer/apidata.js
> > Can't locate PVE/RESTHandler.pm in @INC (you may need to install the
> > PVE::RESTHandler module) (@INC contains: /etc/perl
> > /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1
> > /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5
> > /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32
> > /usr/share/perl/5.32 /usr/local/lib/site_perl) at ./extractapi.pl line
> 6.
> > BEGIN failed--compilation aborted at ./extractapi.pl line 6.
> > make: *** [Makefile:155: api-viewer/apidata.js] Error 2
> >
> > I don't know where to find the PVE::RESTHandler module. What should I do
> > next ?
> >
> > Thanks in advance.
> >
> > Sylvain
> > _______________________________________________
> > pve-devel mailing list
> > pve-devel@lists.proxmox.com
> > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> >
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [pve-devel] building pve-docs - Can't locate PVE/RESTHandler.pm
  2021-09-17 14:57 [pve-devel] building pve-docs - Can't locate PVE/RESTHandler.pm Sylvain Faivre
  2021-09-17 18:16 ` Georges Martin
@ 2021-09-18 11:06 ` Thomas Lamprecht
  2021-09-27 13:21   ` Sylvain Faivre
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Lamprecht @ 2021-09-18 11:06 UTC (permalink / raw)
  To: Proxmox VE development discussion, Sylvain Faivre

Hi,

On 17.09.21 16:57, Sylvain Faivre wrote:
> I am planning to submit patches for the Proxmox docs, following my post at
> https://forum.proxmox.com/threads/some-notes-and-questions-about-proxmox-cluster-networking.96001/
> 
> I found the pve-docs git repo, and read through
> https://pve.proxmox.com/wiki/Developer_Documentation
> 
> In order to see the results of my changes, I am trying to compile the docs
> from the .adoc source files.
> For this, I read the README.adoc file in the pve-docs repo, which says :
> 
>> To simplify the documentation task, we keep all Documentation within
>> this repository. It is possible to generate the docs without installing
>> any additional Proxmox packages with:
>>
>>  make pve-doc-generator.mk
>>  make index
> 
> The first command seems to run fine :
> $ make pve-doc-generator.mk
> ./scan-adoc-refs *.adoc --depends .pve-doc-depends.tmp > link-refs.json.tmp
> cat pve-doc-generator.mk.in .pve-doc-depends > pve-doc-generator.mk.tmp
> sed -i "s/@RELEASE@$/7.0/" pve-doc-generator.mk.tmp
> mv pve-doc-generator.mk.tmp pve-doc-generator.mk
> make: 'pve-doc-generator.mk' is up to date.
> 
> The second command fails with :
> $ make index
> ./extractapi.pl >api-viewer/apidata.js
> Can't locate PVE/RESTHandler.pm in @INC (you may need to install the
> PVE::RESTHandler module) (@INC contains: /etc/perl
> /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1
> /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5
> /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32
> /usr/share/perl/5.32 /usr/local/lib/site_perl) at ./extractapi.pl line 6.
> BEGIN failed--compilation aborted at ./extractapi.pl line 6.
> make: *** [Makefile:155: api-viewer/apidata.js] Error 2
> 
> I don't know where to find the PVE::RESTHandler module. What should I do
> next ?
> 

The Makefile target dependencies are not ideal for a minimal-build-dependency build,
but you should be able to workaround that by faking that the extracted api is already
up-to-date step doing something like:

touch api-viewer/apidata.js
make index

cheers,
Thomas




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [pve-devel] building pve-docs - Can't locate PVE/RESTHandler.pm
  2021-09-18 11:06 ` Thomas Lamprecht
@ 2021-09-27 13:21   ` Sylvain Faivre
  0 siblings, 0 replies; 6+ messages in thread
From: Sylvain Faivre @ 2021-09-27 13:21 UTC (permalink / raw)
  To: Thomas Lamprecht; +Cc: Proxmox VE development discussion

On Sat, Sep 18, 2021 at 1:07 PM Thomas Lamprecht <t.lamprecht@proxmox.com>
wrote:

> Hi,
>
> On 17.09.21 16:57, Sylvain Faivre wrote:
> > I am planning to submit patches for the Proxmox docs, following my post
> at
> >
> https://forum.proxmox.com/threads/some-notes-and-questions-about-proxmox-cluster-networking.96001/
> >
> > I found the pve-docs git repo, and read through
> > https://pve.proxmox.com/wiki/Developer_Documentation
> >
> > In order to see the results of my changes, I am trying to compile the
> docs
> > from the .adoc source files.
> > For this, I read the README.adoc file in the pve-docs repo, which says :
> >
> >> To simplify the documentation task, we keep all Documentation within
> >> this repository. It is possible to generate the docs without installing
> >> any additional Proxmox packages with:
> >>
> >>  make pve-doc-generator.mk
> >>  make index
> >
> > The first command seems to run fine :
> > $ make pve-doc-generator.mk
> > ./scan-adoc-refs *.adoc --depends .pve-doc-depends.tmp >
> link-refs.json.tmp
> > cat pve-doc-generator.mk.in .pve-doc-depends > pve-doc-generator.mk.tmp
> > sed -i "s/@RELEASE@$/7.0/" pve-doc-generator.mk.tmp
> > mv pve-doc-generator.mk.tmp pve-doc-generator.mk
> > make: 'pve-doc-generator.mk' is up to date.
> >
> > The second command fails with :
> > $ make index
> > ./extractapi.pl >api-viewer/apidata.js
> > Can't locate PVE/RESTHandler.pm in @INC (you may need to install the
> > PVE::RESTHandler module) (@INC contains: /etc/perl
> > /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1
> > /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5
> > /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32
> > /usr/share/perl/5.32 /usr/local/lib/site_perl) at ./extractapi.pl line
> 6.
> > BEGIN failed--compilation aborted at ./extractapi.pl line 6.
> > make: *** [Makefile:155: api-viewer/apidata.js] Error 2
> >
> > I don't know where to find the PVE::RESTHandler module. What should I do
> > next ?
> >
>
> The Makefile target dependencies are not ideal for a
> minimal-build-dependency build,
> but you should be able to workaround that by faking that the extracted api
> is already
> up-to-date step doing something like:
>
> touch api-viewer/apidata.js
> make index
>
> cheers,
> Thomas
>
>
Hello,

Here is an update on my process :

I always get this error when trying to "make index" :
make: *** No rule to make target
'/usr/share/javascript/proxmox-widget-toolkit-dev/APIViewer.js', needed by
'api-viewer/apidoc.js'.  Stop.

Following Thomas' suggestion, I tried to :
touch api-viewer/apidata.js
touch api-viewer/apiddoc.js

But it didn't change anything, so for the moment I edited the Makefile to
comment the "${API_VIEWER_SOURCES}" in the index.html entry, in order to
skip this part.

I then had errors for missing binaries :
rsvg-convert (provided by the librsvg2-bin Debian package)
a2x (provided by the asciidoc Debian package)

So I installed these packages on my desktop. I also wanted to install them
on my Proxmox server, but asciidoc depends on about 200 packages, and I
cannot install all this stuff on the production server. I guess I could
build a developement server, but it seems overkill for a small
documentation update.

On my desktop, I still get the PVE::RESTHandler error, but for a different
target now :

$ make index
./scan-adoc-refs *.adoc --depends .pve-doc-depends.tmp > link-refs.json.tmp
./scan-adoc-refs *.adoc --depends .pve-doc-depends.tmp > link-refs.json.tmp
PVE_GENERATING_DOCS=1 perl -I. ./gen-cpu-models.conf.5-opts.pl
>cpu-models.conf.5-opts.adoc.tmp
Can't locate PVE/RESTHandler.pm in @INC (you may need to install the
PVE::RESTHandler module) (@INC contains: . /etc/perl
/usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1
/usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5
/usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32
/usr/share/perl/5.32 /usr/local/lib/site_perl) at ./
gen-cpu-models.conf.5-opts.pl line 6.
BEGIN failed--compilation aborted at ./gen-cpu-models.conf.5-opts.pl line 6.
make: *** [pve-doc-generator.mk:23: cpu-models.conf.5-opts.adoc] Error 2

I think I'm going to write patches for the source files without checking
the compile output, it should be OK for small changes.

Best regards.

Sylvain


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [pve-devel] building pve-docs - Can't locate PVE/RESTHandler.pm
@ 2021-09-18  5:21 Dietmar Maurer
  0 siblings, 0 replies; 6+ messages in thread
From: Dietmar Maurer @ 2021-09-18  5:21 UTC (permalink / raw)
  To: Proxmox VE development discussion, Sylvain Faivre

> I don't know where to find the PVE::RESTHandler module.

Any (working) PVE installation should have that installed...




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-27 13:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17 14:57 [pve-devel] building pve-docs - Can't locate PVE/RESTHandler.pm Sylvain Faivre
2021-09-17 18:16 ` Georges Martin
2021-09-18 10:51   ` Sylvain Faivre
2021-09-18 11:06 ` Thomas Lamprecht
2021-09-27 13:21   ` Sylvain Faivre
2021-09-18  5:21 Dietmar Maurer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal