Skip to content

The doc pages link three text files the install puts out of their reach - #1477

Merged
xroche merged 4 commits into
masterfrom
htmldir-docdir-html
Aug 31, 2026
Merged

The doc pages link three text files the install puts out of their reach#1477
xroche merged 4 commits into
masterfrom
htmldir-docdir-html

Conversation

@xroche

@xroche xroche commented Aug 31, 2026

Copy link
Copy Markdown
Owner

The doc pages link ../license.txt, ../greetings.txt and ../history.txt. Those three files sit at the repo root and index.html sits in html/, so in the source tree the ../ is right. tools/doc-links.py has checked exactly that for years. The install put the same three files beside index.html instead, so there the ../ walked one level too high and all three dangled. #1474 recorded it as a known gap, because no static href satisfies both trees.

htmldir now defaults to $(docdir)/html rather than autoconf's $(docdir), and the three text files install into $(docdir) alone. The installed tree then has the shape the source tree has, so both checkers agree. Fedora already passes exactly this. Another --htmldir still works, and test 382 reports those links as a gap of that layout rather than as a failure.

Debian inverts the layout: debian/rules makes the pages real under /usr/share/httrack/html and turns /usr/share/doc/httrack/html into a symlink pointing at them. It did that by moving all of $(docdir). That now carries the three text files along and leaves the pages one level too deep, so dh_movefiles loses /usr/share/httrack/html/server and the deb build fails. It moves $(docdir)/html instead, and the step that moved httrack-doc.html back out is gone.

Two more things follow from $(docdir) being a real doc directory on Debian. dh_installchangelogs already ships history.txt there as changelog.gz, so the copy is a duplicate lintian rejects, and debian/rules drops it. dh_compress would gzip license.txt, so -X.txt keeps the two remaining files at the names the pages link. The Debian package therefore fixes two of the three links and leaves ../history.txt dead, where all three were dead before. Getting the third back means shipping the changelog twice.

Two more things fall out of the move. history.txt was in both HelpHtmlroot_DATA and HelpHtmlTxt_DATA, which were the same directory by default, so a parallel make install could send two rules at one path. That failed once in about 35 attempts and dates back to 3.30.1. And httrack-doc.html's link to html/index.html was broken for the mirror-image reason. Test 382 now walks $(docdir) as well as $(htmldir) to catch it.

Checked by staging installs. Master and this branch install the same 289 files and ship the same 997 in make dist. make uninstall leaves nothing behind, and the duplicate write of history.txt is gone. Four layouts pass for the right reason. The default resolves 605 links across 64 pages with nothing dangling. A flat --htmldir and one outside $(docdir) record their gaps, and $(docdir)/foo still scans all 64 pages. Three mutants die: a missing license.txt, a link to a page that is not installed, and a staged page from no source file. The Debian half was built for real, in a clean sid chroot holding only the declared Build-Depends. tools/mkdeb.sh --sbuild comes back Status: successful on this branch and on the merge base, 412 tests and no lintian hint.

Packagers get a new default path for the HTML documentation, noted in PACKAGING.md.

xroche and others added 4 commits August 31, 2026 07:49
html/index.html links ../license.txt, ../greetings.txt and ../history.txt.
Those sit at the repo root, one level above the pages, and the install put
them beside index.html instead, so all three dangled in the installed tree.
history.txt was also installed twice into one directory, which let two
install rules race onto the same path.

htmldir now defaults to $(docdir)/html, which is what Fedora already passes,
and the three text files install into $(docdir) alone. httrack-doc.html's
link to html/index.html resolves for the same reason.

Signed-off-by: Xavier Roche <roche@httrack.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…t 382

debian/rules moved the whole of $(docdir) into /usr/share/httrack/html, which
now takes the three text files with it and leaves the pages one level too
deep; dh_movefiles then loses /usr/share/httrack/html/server and the deb build
fails. It moves $(docdir)/html instead, and httrack-doc.html no longer has to
be moved back out.

Test 382 walked one staged directory. That skipped every page whose install
directory is not named html, so a --htmldir of $(docdir)/foo scanned 1 link of
605 and passed, and it never saw httrack-doc.html when --htmldir pointed
outside $(docdir), where the recorded gap then read as stale. It walks both
directories, names each page by the source file it came from, and fails on a
page that has none.

Signed-off-by: Xavier Roche <roche@httrack.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
…t too

Moving the three text files into $(docdir) put them where dh_installchangelogs
already installs history.txt as changelog.gz, which lintian reports as
duplicate-changelog-files and the deb gate fails on. It also put them where
dh_compress gzips license.txt, so the manual's link to it would break at the
name the page uses.

debian/rules drops the history.txt copy, since Debian readers have the
changelog, and dh_compress leaves .txt alone so the other two keep the names
the pages link.

Signed-off-by: Xavier Roche <roche@httrack.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
@xroche
xroche enabled auto-merge (squash) August 31, 2026 07:46
@xroche
xroche merged commit 46d28c7 into master Aug 31, 2026
45 checks passed
@xroche
xroche deleted the htmldir-docdir-html branch August 31, 2026 07:59
xroche added a commit that referenced this pull request Aug 31, 2026
…ale ABI note

The #1469 line said "a hard-coded /usr", which hides the change with a
user-visible consequence: HTS_ETCPATH moved too, so a build with its own
--prefix now reads its own httrack.conf. The #1477 line described the Debian
package's outcome rather than the default install, which resolves all three
links. #1466 and #1467 are portability fixes a Termux packager sees, not
internal churn, and #1462 is documentation.

configure.ac's VERSION_INFO rationale carried the same retracted claim, that
the engine is untouched since 3.49.25. It now states what actually keeps the
soname: htsfeatures.h carries the same macro values config.h did.

Signed-off-by: Xavier Roche <roche@httrack.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
xroche added a commit that referenced this pull request Aug 31, 2026
`history.txt`'s `3.50-0` block said "the engine is unchanged since
3.49-25. This release moves the version string, not behaviour", and
`debian/changelog`'s `3.50.0-1` said the upload carries no functional
change. Both lines were written at the release commit `32265631`, and
the vendor-recipe sweep landed after it.

Five of those changes are visible to a user or a packager:

- `--disable-example-libs` (#1470)
- compiled-in paths follow the configure directories rather than a
hard-coded `/usr` (#1469)
- the installed headers drop autoconf's `config.h` for a generated
`htsfeatures.h` (#1473)
- the shipped text files carry LF (#1468)
- the manual moves under `$(docdir)/html` (#1477)

Two configure fixes go with them, #1472 and #1475, and the rest fold
into one internal line.

The `debian/changelog` stanza keeps its packaging audience. It names the
`debian/rules` changes #1477 needed, the installed-header change a
rebuilding consumer will notice, and the upstream release itself.

This has to land before the tag, because the tag freezes both files into
the `make dist` tarball the Debian upload is built from. Correcting them
afterwards would need a Debian revision the archive has no reason to
carry.

`configure.ac`'s `VERSION_INFO` rationale carried the same retracted
claim, so it is corrected here too. It now states what actually keeps
the soname at `3:19:0`, which is that `htsfeatures.h` carries the same
macro values `config.h` did.

The block's opening paragraph is untouched.

---------

Signed-off-by: Xavier Roche <roche@httrack.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
xroche added a commit that referenced this pull request Sep 1, 2026
… itself (#1488)

#1477 defaulted `htmldir` to `${docdir}/html`. A `--docdir` under
`$(datadir)/httrack` then makes the served-UI link point inside itself.
With `--docdir=/usr/share/httrack` the hook runs `ln -s ../httrack/html
/usr/share/httrack/html`, and that target resolves back to the link.
install-HelpHtmlDATA dies on the next rule with "Too many levels of
symbolic links", so `make install` fails outright.

3.50.0 ships this. Both `--docdir=$(datadir)/httrack` and Termux's
`--docdir=$(datadir)/httrack/html` reproduce it on the released tarball,
and both install cleanly with the fix.

The hook now skips when `htmldir` is at or under the link path. The
pages install there anyway in that layout, so no link could help. The
default layout keeps the link it had.

385 drives the hook alone across the three layouts. Its control asserts
the default still gets its relative link, so the test cannot pass on a
hook that stopped linking altogether. Both mutants die. Dropping the
guard fails on "htmldir=/usr/share/httrack/html got a link to
../httrack/html". An always-skipping hook fails on "the default layout
got no link".

Found by building termux/termux-packages' httrack recipe, where it is
the second of two things standing between them and 3.50.0.

---------

Signed-off-by: Xavier Roche <roche@httrack.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant