Overview

Request 1004899 accepted

- Enable parallel builds by slpitting clean and all at make time
(Thanks to Christopher Yeleighton)
- Do not copy more than 1 byte for \(aq becoming a "'" in
quotes-man2html.patch

- Small change in quotes-man2html.patch
* Use a simple "'" aka quote instead of "′" for "\(aq"

- Add patch quotes-man2html.patch
* Fix boo#1203091 -- BASH(1) Manual Page: Unprocessed macro aq

Loading...

Jan Engelhardt's avatar

Adding to what @yecril71pl said. Now it's strncpy(charb, "'", 1). Which is not much better than strncpy(charb, "'", 7). The last argument to strncpy is supposed to be size of the target buffer (fewer is possible - but raises eyebrows as it did). Since you are explicitly adding the \0 byte anyway at a fixed location without checking sizeof(charb), why even go to the hassle of using strncpy, just write strcpy(charb, "'") and strcpy(charb, """), since you seem to be fine assuming charb is 7 or larger anyway.


Dr. Werner Fink's avatar

Thew size of charb is well defined:

bash/bash> grep TINY_STR_MAX ./bash-5.1/support/man2html.c
#define TINY_STR_MAX  10
static char charb[TINY_STR_MAX];

and the code is choosen to look like the surrounding code as well. Otherwise I would simply memset the buffer charb with zeros and use charb[0] = (char)39


Dr. Werner Fink's avatar

An other approach would be to require groff-full at build time and use roff2html or groff -Thtml


Dr. Werner Fink's avatar

roff2html seems to have very similar result as man2html


Christopher Yeleighton's avatar
  • -Thtml is hopelessly broken and must be reimplemented from scratch; my proof of concept was completely ignored by upstream :-(

  • -Tdvi would be better for reliability and readability but it requires a graphic display to be read, which does not fly for a base package.

  • We could also just %exclude the result altogether and hope that man bash will do the right thing.



Christopher Yeleighton's avatar
  1. strncpy(charb, "'", 7): why 7? I mean, it does what you want but in an obfuscated way XD
  2. The reason why you cannot use a parallel build is probably this command make clean all. This is wrong not only in parallel context because make is free to rearrange the targets and make clean last, which is not what you want. make clean && make all is the way to go in this case.
Request History
Dr. Werner Fink's avatar

WernerFink created request

- Enable parallel builds by slpitting clean and all at make time
(Thanks to Christopher Yeleighton)
- Do not copy more than 1 byte for \(aq becoming a "'" in
quotes-man2html.patch

- Small change in quotes-man2html.patch
* Use a simple "'" aka quote instead of "′" for "\(aq"

- Add patch quotes-man2html.patch
* Fix boo#1203091 -- BASH(1) Manual Page: Unprocessed macro aq


Factory Auto's avatar

factory-auto added opensuse-review-team as a reviewer

Please review sources


Factory Auto's avatar

factory-auto accepted review

Check script succeeded


Saul Goodman's avatar

licensedigger accepted review

ok


Dominique Leuenberger's avatar

dimstar_suse set openSUSE:Factory:Staging:A as a staging project

Being evaluated by staging project "openSUSE:Factory:Staging:A"


Dominique Leuenberger's avatar

dimstar_suse accepted review

Picked "openSUSE:Factory:Staging:A"


Dominique Leuenberger's avatar

dimstar accepted review


Dominique Leuenberger's avatar

dimstar_suse accepted review

Staging Project openSUSE:Factory:Staging:A got accepted.


Dominique Leuenberger's avatar

dimstar_suse approved review

Staging Project openSUSE:Factory:Staging:A got accepted.


Dominique Leuenberger's avatar

dimstar_suse accepted request

Staging Project openSUSE:Factory:Staging:A got accepted.

openSUSE Build Service is sponsored by