jhrozek / pam_hbac

A simple pam account module to process HBAC rules stored on an IPA server
GNU General Public License v3.0
10 stars 9 forks source link

Manpage generation issue on Solaris 10 #100

Closed igorvt77 closed 6 years ago

igorvt77 commented 7 years ago

Solaris 10 system using the packages found at https://www.opencsw.org/ I downloaded the pam_hbac-1.1.zip file from github, extracted the files and then ran "autoreconf -i" in the pam_hbac-1.1 directory. I then run make and it fails out with an error when building the two man pages in the "doc" sub directory, I see the following error: /opt/csw/bin/a2x -D . --doctype manpage --format manpage pam_hbac.8.txt a2x: WARNING: --destination-dir option is only applicable to HTML based outputs a2x: ERROR: "xmllint" --nonet --noout --valid "/export/home/sam/pam_hbac-1.1/doc/pam_hbac.8.xml" returned non-zero exit status 4 make: *** [Makefile:603: pam_hbac.8] Error 1

After looking at the Makefile.am file in the doc sub directory, I discovered that the issue is with these lines: .8.txt.8: $(A2X) -D . --doctype manpage --format manpage $< .5.txt.5: $(A2X) -D . --doctype manpage --format manpage $<

To resolve the issue, remove the "-D ." and replace it with "-L". So the code would look like this: .8.txt.8: $(A2X) -L --doctype manpage --format manpage $< .5.txt.5: $(A2X) -L --doctype manpage --format manpage $<

I'm not sure which upstream configuration file would need to be modified to do this automatically so I thought I would report it.

jhrozek commented 7 years ago

Hi, the -L and -D switches are quite unrelated. The -D just specifies where the output (=the manpages should be put). The -L says that no validation of the intermediate XML should be done.

IIUC the asciidoc to manpage conversion works by first converting asciidoc to XML, which is validated and then converted to manpage. So what I can do for the next release (which I should do anyway) is to add a configure time switch that would expand to -L. for a2x.

etc-fstab commented 7 years ago

Hi, I can provide another situation while compiling pam_hbac-1.1 on Solaris10. There is no error while running: 1) "autoconf -o configure"

2) "autoreconf -i"

3) "configure" ends with three warnings, these are last lines.

checking for a2x... /opt/csw/bin/a2x configure: WARNING: No libcmocka library found, cmocka tests will not be built checking for nss_wrapper... no configure: WARNING: cwrap library nss_wrapper not found, some tests will not run checking for pam_wrapper... no configure: WARNING: cwrap library pam_wrapper not found, some tests will not run checking whether to enable Valgrind on the unit tests... checking for valgrind... no no checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating doc/Makefile config.status: creating src/intgtests/Makefile config.status: creating src/intgtests/test_pam_services/ph_test_svc config.status: creating config.h config.status: executing depfiles commands config.status: executing libtool commands

4) "make" fails with :+1:

libtool: link: gcc -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -o pam_test_client src/tests/pam_test_client.o -lpam gmake[2]: Leaving directory '/tmp/pam_hbac-1.1' Making all in src/intgtests gmake[2]: Entering directory '/tmp/pam_hbac-1.1/src/intgtests' gmake[2]: Nothing to be done for 'all'. gmake[2]: Leaving directory '/tmp/pam_hbac-1.1/src/intgtests' Making all in doc gmake[2]: Entering directory '/tmp/pam_hbac-1.1/doc' /opt/csw/bin/a2x -D . --doctype manpage --format manpage pam_hbac.8.txt a2x: WARNING: --destination-dir option is only applicable to HTML based outputs a2x: ERROR: "xmllint" --nonet --noout --valid "/tmp/pam_hbac-1.1/doc/pam_hbac.8.xml" returned non-zero exit status 4 gmake[2]: [Makefile:603: pam_hbac.8] Error 1 gmake[2]: Leaving directory '/tmp/pam_hbac-1.1/doc' gmake[1]: [Makefile:2447: all-recursive] Error 1 gmake[1]: Leaving directory '/tmp/pam_hbac-1.1' gmake: *** [Makefile:1120: all] Error 2

jhrozek commented 7 years ago

Yes, this is exactly what the OP was complaining about.

jhrozek commented 6 years ago

This will be "fixed" by providing an option to disable man page generation.