Skip to content

Fix paths in man page#596

Merged
rofl0r merged 1 commit intotinyproxy:masterfrom
mohd-akram:fix-man8
Mar 8, 2026
Merged

Fix paths in man page#596
rofl0r merged 1 commit intotinyproxy:masterfrom
mohd-akram:fix-man8

Conversation

@mohd-akram
Copy link
Contributor

No description provided.

mohd-akram referenced this pull request Mar 8, 2026
if test -e docs/man5/tinyproxy.conf.5 ; then
touch docs/man5/tinyproxy.conf.5
fi
if test -e docs/man8/tinyproxy.8 ; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the intent of these lines was to ship pre-built manpages so the build doesn't break when pod2man isn't installed. the touching is necessary else make thinks the target needs to be rebuilt because of file timestamps.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because of this, maybe the best option is to do the path seds on the final manpage (or an intermediate thereof, after pod2man is applied). in that case we could ship the generated intermediate manpages and touch those.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I misunderstood the comment above them and thought they might not be needed for man8 since it was moved out of AC_CONFIG_FILES, but I tried now and it's required. I reverted to the earlier commit which is working fine for me when building from the dist with and without pod2man.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarified the comments a bit and removed one line which is not needed.

@mohd-akram mohd-akram force-pushed the fix-man8 branch 3 times, most recently from e58617f to 0acbdcc Compare March 8, 2026 16:49
configure.ac Outdated

if test -e docs/man8/tinyproxy.8 ; then
touch docs/man8/tinyproxy.8
# this isn't shipped, so touch it to avoid a rebuild of the manpage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment seems confusing. at least i dont get it. also why is the .8 input text touched but not the .5 input ?
the change of indentation is gratuitous.

Copy link
Contributor Author

@mohd-akram mohd-akram Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment seems confusing. at least i dont get it. also why is the .8 input text touched but not the .5 input

The .5 input is freshly generated already as part of the configure, so touching it doesn't do anything. We only need to touch the generated manpage to be newer than the input.

For .8 it's different, that file is not shipped at all in the release tarball, so make can't tell if the man page is updated or not. So we need to touch it and then touch the man page so make ignores it.

the change of indentation is gratuitous.

Do you mean the whitespace? I wanted to match the indentation above, but I can revert it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the whitespace?

yes. i'm a big fan of minimal diffs, trumping consistent indendation.

For .8 it's different

i suppose that's because the path transformation is only done on one of those? imo it would be preferable if both manpages get the exact same treatment, even if there are currently no paths to be replaced, but that might change in the future. having consistency here would avoid a lot of confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. i'm a big fan of minimal diffs, trumping consistent indendation.

Fair, I'll simplify the commit.

i suppose that's because the path transformation is only done on one of those?

The path transformation is done on both, but at different stages. For tinyproxy.conf.txt it shouldn't really be done in AC_CONFIG_FILES, because that's meant for Makefiles and doesn't do a full expansion, it only happens to work because there's only one variable being replaced in that file, TINYPROXY_STATHOST which is a simple value so this isn't a problem.

having consistency here would avoid a lot of confusion.

I agree. I'll do that change in this PR? Or I'll just keep the fix only here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted back to the ultra simple fix. I can do all the other changes in another PR since it will be more involved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do all the other changes in another PR since it will be more involved.

thanks, waiting for it to happen.

@rofl0r rofl0r merged commit 1c4af67 into tinyproxy:master Mar 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants