mirror of
https://github.com/xroche/httrack.git
synced 2026-08-12 02:32:21 +03:00
* A relocated install still cannot find libhttrack on macOS #964 gave httrack and htsserver a loader-relative rpath but opted Darwin out: dyld expands @rpath only for a load path spelled that way, and libtool stamps the dylib with the absolute libdir, so the entry would never be consulted. The id comes out of libtool's own archive_cmds template rather than from LDFLAGS, so configure rewrites that template when the gate is on, and the dylib links as @rpath/libhttrack.3.dylib from the start. The Darwin probe now builds a library carrying such an id and runs a program that needs it, so a dead LC_RPATH cannot pass for a live one; an unrecognised template leaves the whole thing off. Anything linked against libhttrack after this records the @rpath id and must supply an rpath of its own. That is not an soname break, so VERSION_INFO and the Debian package name are untouched. Closes #978 Signed-off-by: Xavier Roche <roche@httrack.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Tighten the Darwin rpath gate and what 219 proves Arm the install_name rewrite only when both libtool templates take it, so a future divergence between archive_cmds and archive_expsym_cmds disarms the gate rather than letting the -export-symbols path stamp an absolute id. 219 now reads the executables' LC_RPATH too, which catches an id moved to @rpath while the binaries carry no entry answering it, and counts the libhttrack dependency per binary instead of totalling across both. 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> * Ship a pkg-config file for libhttrack The @rpath install_name is consumer-visible: anything linking against libhttrack afterwards records @rpath/libhttrack.3.dylib and needs its own LC_RPATH. libhttrack.pc is the standard pairing, handing out the include path and, for a non-system libdir, -Wl,-rpath,${libdir}. The gate is configure's existing hts_origin_sysdir, so an rpath into /usr/lib stays out. 222_pkgconfig-consumer.test stages an install, queries the staged .pc, then builds and runs a consumer off it; the run is what proves the id and the rpath resolve. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com> * Keep the pkg-config file out of the macOS bundle An .app ships runtime, not development files, and the .pc names the staging prefix the bundle check rejects. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com> * Trim the comments added with libhttrack.pc Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com> * Let 222 run against a sanitized libhttrack The consumer is built from the .pc alone, so ASan's runtime is not first in its library list; the interposer tests already turn that check off. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com> * Make libhttrack.pc link statically, and 222 able to see it --static --libs handed out -lcrypto before -lssl, with -lz and -lzstd ahead of the libcrypto that needs them, so an archive link left 76 symbols undefined. Name the dependencies as pkg-config modules in Requires.private, which orders them and carries any -L an out-of-the-way prefix needs, falling back to the probed link line where a dependency ships no .pc. libhttrack-dev gains the matching -dev dependencies: pkg-config fails outright on a module whose own .pc is missing. Test 222 could not see any of this. --define-variable overrides an assignment the .pc already carries, so its relocation overwrote prefix, libdir and includedir before anything was asserted: a hard-coded libdir=${exec_prefix}/lib, which breaks Debian multiarch, passed unchanged. It also only grepped --static --libs and then linked with the dynamic ones. Assert the un-relocated values, and build and run a real static consumer. The rpath the .pc hands out now answers to the same gates the executables' own rpath respects, so --disable-origin-rpath and an archive-only build stay rpath-free; 196 covers all six cases. On Darwin 222 skips where configure left the dylib an absolute install name, and 219 skips on an unset abs_top_builddir rather than erroring, as 222 already did. Signed-off-by: Xavier Roche <xroche@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com> * Trim test 222 to the assertions that carry a mutant The pkg-config consumer test had grown to 225 lines, much of it belt and braces around checks that already fire elsewhere: the -I/-L extraction and its stage-relocation loop, the -lz grep on --static --libs, and the rpath gate check that test 196 now reads straight out of the generated .pc in all six of its configure cases. Each of the eight mutants the test was written for still dies: a wrong libdir, includedir or prefix in the .pc, a multiarch build hard-coding libdir=${exec_prefix}/lib, the rpath flag dropped from Libs:, the old Libs.private order with no Requires.private, Cflags one level too high, and a .pc generated but never installed. The dropped rpath is now caught by the run itself, since the consumer is launched with LD_LIBRARY_PATH unset wherever the .pc promises an rpath. Signed-off-by: Xavier Roche <xroche@gmail.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> Signed-off-by: Xavier Roche <xroche@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
6 lines
132 B
Plaintext
6 lines
132 B
Plaintext
usr/include/httrack
|
|
usr/lib/*/libhttrack.{so}
|
|
usr/lib/*/pkgconfig/libhttrack.pc
|
|
usr/share/httrack/libtest
|
|
usr/lib/*/httrack/libtest
|