curlftpfs-ng
Build times (auto-updated)
- x86_64: 23s (2026-11-28 15:28 UTC, MAKEFLAGS=-j6)
- i486: 23s (2026-11-28 15:26 UTC, MAKEFLAGS=-j6)
- i686: 28s (2026-11-28 15:27 UTC, MAKEFLAGS=-j6)
- pentium4: 29s (2026-11-28 15:27 UTC, MAKEFLAGS=-j6)
- armv6h: 5m38s (2026-11-28 15:33 UTC, remote, serial)
- armv7h: 2m30s (2026-11-28 15:33 UTC, remote, MAKEFLAGS=-j4)
- aarch64: 52s (2026-11-28 15:33 UTC, remote, MAKEFLAGS=-j4)
Category: adapted – plain tracked files (never a submodule), because we
carry a real local diff on someone else’s AUR package: upstream is
arch=('x86_64') only and we build the full platform set. Per the taxonomy,
an arch=() deviation alone is sufficient for adapted/. AUR maintainer is
J4913; PKGBUILD # Maintainer: line is Joseph Lansdowne (upstream author)
and was deliberately left as-is – an arch-only fork of a package whose
upstream is still alive keeps the real maintainer credited.
“FUSE filesystem for FTP”, GPL-2.0-only, upstream ikn.org.uk.
2026-11-28: added, published 0.9.3-2.1 on all 7 archs
pkgrel 2 -> 2.1 (X.Y local scheme; X = upstream’s current pkgrel,
never above it). arch=() extended to
i486 i686 pentium4 x86_64 armv6h armv7h aarch64. Deps (curl, fuse2,
glib2) resolve on every one of those, including i486.
All three ARM archs built cleanly first try, so the arch expansion is
genuinely validated, not merely plausible. ARM produces no -debug package
(those chroots lack the debug tooling), so the repo holds 4 files per local
arch and 2 per ARM arch.
Upstream’s download host is dead – source is mirrored on our repo host
The first all-arch run failed on every arch, and not for any
architecture-related reason: the source download returned
curl: (22) The requested URL returned error: 522 from
http://ikn.org.uk/download/tool/curlftpfs-ng/curlftpfs-ng-0.9.3.tar.gz.
HTTP 522 is Cloudflare “origin connection timed out” and the whole site
returned it, root included, repeatedly – upstream’s host is down, not the
one file.
Recovered via the documented src/-mirror pattern (same as
[[makemkv]]/jdk6-sun): pulled the tarball from the Wayback Machine
(snapshot 20250807084537), verified its sha512 matches the hash
upstream itself published in the PKGBUILD byte for byte – so it is
provably the same tarball, not a substitute – then repo_src_upload.sh’d it
and repointed source=() at
https://archlinux32.andreasbaumann.cc/archlinuxaba/src/$pkgname-$pkgver.tar.gz.
sha512sums is therefore unchanged, which is the whole point. Upstream’s
original URL is preserved as a comment directly above source=() per that
script’s own convention, so the real origin isn’t lost.
User’s explicit choice between mirroring, waiting for upstream, or carrying both URLs. If ikn.org.uk ever comes back, the comment holds the original URL to restore or re-mirror from.
i486 hung mid-pacman the first time – transient, fixed by a plain retry
On the first successful-source run, i486 wedged for 25+ minutes with zero
CPU. Diagnosed rather than guessed: the chroot’s own pacman.log showed
transaction started / installed fuse-common / installed fuse2 at
15:02:33 and then nothing – so the install itself had succeeded and it
hung afterwards, inside pacman. Parent pacman sat in do_sys_poll on a
socket, its child in futex_do_wait (pacman’s sandboxed download helper);
the archlinux32 mirror answered fine from the host meanwhile (HTTP 200 in
0.08s). So: not a missing dependency, not a network outage, not an i486
incompatibility – a pacman-side wedge.
Killed only that arch’s systemd-nspawn container (not repo_build.sh),
which let the run record i486 as failed and carry straight on to i686 –
repo_build.sh then published the 6 archs that succeeded, exactly as
designed. Took care not to touch the unrelated archlinux32 core-staging-pentium4
builder daemon running on the same host.
The i486-only retry afterwards succeeded in under a minute. So treat this
class of hang as transient: a plain REPO_BUILD_ONLY_ARCH=i486
scripts/repo_release.sh adapted/curlftpfs-ng is the fix, no PKGBUILD change
needed. Don’t record i486 as unsupported for this package.
2026-11-28 (later): 2.1 -> 2.2, CURLOPT_KRB4LEVEL guard – 2.1 could not start at all
0.9.3-2.1, published earlier the same day, is completely non-functional:
curlftpfs ftp://... /mnt prints Error setting curl: and exit(1)s before
a single byte of FTP. Diagnosed in another session (on euroserver, ARM) via
ctypes + disassembly, reported to this one, and re-verified here from source
before patching.
Root cause, confirmed at ftpfs.c:1636:
curl_easy_setopt_or_die(easy, CURLOPT_INTERFACE, ftpfs.interface);
curl_easy_setopt_or_die(easy, CURLOPT_KRB4LEVEL, ftpfs.krb4); /* unguarded */
if (ftpfs.proxy) { /* guarded! */
curl_easy_setopt_or_die(easy, CURLOPT_PROXY, ftpfs.proxy);
curl_easy_setopt_or_die is a macro that exit(1)s on any non-CURLE_OK
(ftpfs.c:246-253), and libcurl returns rc=4 CURLE_NOT_BUILT_IN for
CURLOPT_KRBLEVEL (10063) even with a NULL value. 0.9.2 only tripped this
if you actually passed -o krb4=..., which is why it never surfaced before.
Correction to the incoming report, which matters if this is ever sent
upstream: it blamed “Arch’s curl is built without Kerberos/GSS-API”. That
is false here. euronuc’s curl 8.23.0 is built against mit-krb5 1.22.2,
depends on libgssapi_krb5.so, lists GSS-API Kerberos SPNEGO in its
Features: line, and ships curl --krb <level> in the CLI; all three ARM
boards report GSS-API: yes as well. CURLOPT_KRBLEVEL(NULL) is still
refused with rc=4, while CURLOPT_INTERFACE(NULL) and CURLOPT_PROXY(NULL)
both return 0 – verified by direct ctypes calls against the same
libcurl.so.4. So the option is compiled out of libcurl narrowly and
independently of Kerberos being present, and the bug hits x86_64 exactly as
hard as ARM. Don’t repeat the GSS-API explanation; it invites a “doesn’t
apply to my build” dismissal.
Also checked the immediately preceding unguarded
CURLOPT_INTERFACE call rather than fixing one landmine and leaving its
twin – it accepts NULL (rc=0), so the one-line guard is genuinely the whole
fix.
Fix lives in curlftpfs-ng-krb4level-guard.patch (standalone patch file
applied by patch -Np1 in a new prepare(), per
[[feedback_patch_files_not_inline]], so other distros can reuse it):
wraps the call in if (ftpfs.krb4). pkgrel 2.1 -> 2.2; tarball sha512
untouched.
Verified empirically, not assumed – built x86_64 without publishing first, extracted both binaries, and ran each against a nonexistent mountpoint (reaches the setopt block, mounts nothing):
| build | output |
|---|---|
| 2.1 | Error setting curl: |
| 2.2 | fuse: bad mount point '/nonexistent-...': No such file or directory |
i.e. 2.2 gets past the setopt block entirely. Only then published all 7
archs. Both binaries are byte-identical in size (65320 B) – the change
is just a conditional branch, so never use file size to tell the builds
apart; check pkgrel.
i486 built fine this time, no repeat of the earlier pacman wedge – further evidence that was transient.
Still unanswered and NOT verifiable from this host: whether ng fixes the empty-directory-listing problem against the user’s SFTPGo server. That needs a real FTP session from euroserver; the abort simply happened too early for the question to be reachable before. Worth upstreaming the guard to ikn.org.uk when that host is reachable again (it is currently down, see above).
2026-11-28 (third pass): 2.2 -> 2.3, the listing parser – %1023c discarded every entry
2.2 mounted but every directory appeared empty. Reported from the
euroserver session against SFTPGo/Hetzner; reproduced here on x86_64 against
plain ftp.gnu.org, so this is not server-specific.
Cause, in ftpfs-ls.c – all three listing format strings ended in %1023c:
"%11s%lu" SP "%32s" SP "%32s" SP "%llu" SP "%3s" SP "%2s" SP "%5s" "%*c" "%1023c"
%Nc matches exactly N characters, not “up to N”. With a filename of 23
characters and nothing following, glibc records a matching failure and
sscanf returns 8 instead of 9; parse_dir_unix requires >= 9, falls
through to the no-nlink variant (same %1023c, fails the same way), returns
0, and the entry is silently dropped. No error, getdir still reports
success, directory looks empty. It only ever returned 9 when >= 1023 bytes of
further listing happened to follow – which never happens parsing line by
line.
Fix: %1023c -> %1023[^\r\n] in all three (both unix variants + the DOS
one), as curlftpfs-ng-listing-scanset.patch. pkgrel 2.2 -> 2.3.
This is NOT a CR/LF bug – important if upstreaming
The incoming report framed it as CR/LF handling. It isn’t: the caller
already strips CR and LF before the parser ever sees a line
(ftpfs-ls.c:214-224 – strchr(start,'\n'), then
if (end > start && *(end-1) == '\r') end--;, then
start = *end == '\r' ? end + 2 : end + 1;). So the parser receives
CR/LF-free, NUL-terminated input already, and the scanset’s \r\n
exclusion is harmless belt-and-braces, not the cure. The cure is purely
the %Nc -> %N[...] width semantics. Describing it as a CRLF issue
invites a “my server sends LF, doesn’t apply to me” dismissal – it breaks
against every server, which is exactly what the ftp.gnu.org reproduction
shows.
Incidentally the memset(file, 0, 1024) at the top of each parse function is
what made %1023c usable at all (%Nc does not NUL-terminate); %N[...]
terminates itself, so that memset is now redundant but still harmless – left
alone to keep the patch minimal.
Verified end-to-end, not just at the sscanf level
Both fixes were built x86_64-only without publishing first, then the real
binaries were run against ftp.gnu.org (read-only FUSE mount in a scratch
dir, torn down immediately, no stale mounts):
| build | mounts? | entries listed |
|---|---|---|
| 2.1 | no – Error setting curl: |
- |
| 2.2 | yes | 0 |
| 2.3 | yes | 20, real filenames |
A self-inflicted trap worth remembering: the first ctypes check of the
new format appeared to truncate names to Hetz / some di / x.e. That was
the test harness, not the patch – a Python raw string passed \r\n as
literal backslash-r-backslash-n, so sscanf saw a scanset excluding the
characters \, r and n (hence stopping at the “n” of “Hetzner”). In real
C source those are single control bytes. When testing scanf formats through
ctypes, build the format with real control characters, never a raw string.
Still untested: the user’s own SFTPGo server. Same parser path and the Hetzner line parses correctly under the new format, so it should be fixed, but that confirmation needs a mount from euroserver.
Both patches are worth sending to ikn.org.uk (host still 522-ing).
Provenance of the mirrored tarball (recorded 2026-11-28, on request)
Exactly where ${REPOSITORY_URL}src/curlftpfs-ng-0.9.3.tar.gz came from, so
nobody has to reconstruct it later:
http://web.archive.org/web/20250807084537if_/http://ikn.org.uk/download/tool/curlftpfs-ng/curlftpfs-ng-0.9.3.tar.gz
That is the Internet Archive’s snapshot (2025-08-07) of upstream’s own
download URL, located via the archive.org/wayback/available API after
ikn.org.uk returned Cloudflare 522 on the tarball, the site root, and over
https alike. Note the if_ suffix in the timestamp – that is what makes
Wayback serve the raw original bytes rather than a rewritten page.
- size 3021690 bytes
- sha512
17ea2480f9f3e9756d0884db5b0326e66332970674965153f221904f4de93c0154b356c2848fd962f4b5b8e2d10554f5a5b854989b984786825279b6e5dbca28 - re-verified on the repo host after upload: same hash, same size.
Why it is trustworthy: that sha512 is byte-identical to the one in the
AUR PKGBUILD, and that hash was committed by Joseph Lansdowne – the
upstream author, who also maintains the AUR package – in commit
6aea868, dated 2019-04-08, the “curlftpfs-ng 0.9.3” release commit,
back when his own server was still serving it. It has never been modified
since: the only later commits touching that PKGBUILD (42c4c89 2020-09-05,
c3ed5b7 2025-02-15, f673ebf 2025-02-23) changed URLs and SPDX license
identifiers, not checksums.
The honest limit of that verification, stated plainly: this is a hash match against the packager’s recorded hash, not an independent signature. There is no GPG signature for this tarball anywhere, so the trust chain is only:
Wayback’s archived bytes <-> sha512 recorded by upstream’s author in 2019
If that 2019 commit had itself recorded a bad hash, a match would not reveal it. What the match does rule out is Wayback serving a corrupted or substituted file, and any tampering after 2019 – two independent sources would have to agree. No third-party cross-check was available (Gentoo/Debian/ Repology don’t appear to package curlftpfs-ng).
If a stronger chain is ever wanted: re-fetch from ikn.org.uk once that
host returns and compare; the original upstream URL is deliberately preserved
as a comment above source=() in the PKGBUILD precisely so re-mirroring is a
one-liner. See [[repo_src_mirror]] for the general mechanism.