Commit Graph

21 Commits

Author SHA1 Message Date
Eman Resu
9137068a86 build-support/fetchtorrent: remove assertMsg usage 2026-05-26 14:14:54 -04:00
Dyego Aurélio
28096cc5e3 treewide: apply nixfmt 1.2.0 2026-01-22 18:37:56 -03:00
Philip Taron
2b6ffb3b32 tests.fetchtorrent: don't run these tests on Hydra, take 2
As reported in https://github.com/NixOS/nixpkgs/pull/464999#issuecomment-3593574707, I landed this on the wrong attrset and didn't check it.

Now validated with `nix-instantiate --strict  --json --eval -A tests.fetchtorrent.http-link.meta.hydraPlatforms`
2025-12-03 12:17:15 -08:00
Philip Taron
898445631d tests.fetchtorrent: don't run these tests on Hydra 2025-11-25 09:33:59 -08:00
Adam Dinwoodie
081f217892 tests.fetchtorrent: avoid builtins.convertHash
This function wasn't added until Nix 2.19, so we shouldn't (yet) be
relying on it.
2025-11-12 17:54:55 +00:00
Robert Hensing
811730a9e0 tests.fetchtorrent: verify and delete in postFetch (#458193) 2025-11-09 16:57:16 +00:00
Adam Dinwoodie
92fe9345e5 tests.fetchtorrent: store torrent file locally
Avoid being unnecessarily dependent on webtorrent.io being available.
2025-11-08 17:21:39 +00:00
Adam Dinwoodie
b9464c6a20 tests.fetchtorrent: verify and delete in postFetch
The Sintel torrent used for testing fetchtorrent is about 124MB, which
is downloaded and cached for every test every time the test inputs
change.  Avoid that by instead validating the file hashes in the
postFetch stage, then deleting the downloaded files, so the only thing
that needs to be stored is an empty directory.
2025-11-03 18:43:15 +00:00
Emily
f8b2fc54c8 fetchtorrent: use Transmission 4
I don’t know why setting `--config-dir` breaks the finish script
with Transmission 4, but I don’t really feel like spending more
time investigating than I already did. It does still respect the
passed settings, since we were passing the default location anyway.
2025-10-28 18:14:05 +00:00
Adam Dinwoodie
588622a0e3 fetchtorrent: add flatten argument for rqbit
Currently, the output from fetchtorrent will be different depending on
whether the default "transmission" backend or the "rqbit" backend is
used, because "rqbit" changed its behaviour in v6.0.0 to create
subdirectories.

Restore the old behaviour for the rqbit backend of flattening the
directory structure, but add a "flatten" argument to allow users to
explicitly request the behaviour without this change.

Because fetchtorrent produces fixed-output derivations, it's possible
that people won't notice the changes in behaviour here, so add a warning
that the behaviour might be unexpected (in either direction!) if the
flatten argument isn't specified for the rqbit backend, and -- to avoid
needing to support it indefinitely -- a warning that `flatten = false`
will be deprecated in future.

Update the fetchtorrent tests to check all the relevant combinations,
and to mark all tests as now working.

Update the release notes to advertise this breaking change.

Fixes #432001.
2025-08-09 20:22:29 +01:00
Adam Dinwoodie
613a98461f fetchtorrent: check JSON config usage correctly
The arguments to `fetchtorrent` are supposed to throw an error if the
user attempts to specify JSON configuration when they're not using the
transmission backend, however a logic error means the error will never
be thrown.

Move the test to somewhere where the behaviour will actually be checked.
2025-08-09 19:24:34 +01:00
Adam Dinwoodie
f632635221 fetchtorrent: run hooks when using rqbit
The postFetch and postUnpack hooks ought to be run in fetchtorrent
regardless of the backend in use.  Ensure that's the case, rather than
only running them if the transmission backend is being used.
2025-08-09 19:24:34 +01:00
Adam Dinwoodie
bd13421b2b fetchtorrent: test using Sintel torrent
The current torrent used for testing fetchtorrent isn't free, which
prevents the tests running in a lot of environments.  Swap for a torrent
of the Sintel film, which has a free license.

This unfortunately increases the closure size of the tests: Sintel is
124MB, compared to 54MB for the Wired CD.  This was the smallest torrent
I could find that both had a free license and was sufficiently well
seeded to be useful for testing.
2025-08-08 21:30:25 +01:00
Adam Dinwoodie
306edac8db fetchtorrent: record rqbit tests as broken
See #432001
2025-08-08 21:15:27 +01:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Sigmanificient
6dd44107ac treewide: remove unused lib (and other) arguments 2024-07-26 11:18:09 +02:00
Doron Behar
7645dde059 transmission_3: rename from transmission 2024-06-21 12:33:37 +03:00
Peder Bergebakken Sundt
4fa591f807 tests.fetchtorrent: add watched-cd license
This marks the tests unfree, shuold be fixed in a follow up.
2023-12-02 02:04:50 +01:00
Peder Bergebakken Sundt
9a16042cc3 fetchtorrent: add meta support 2023-12-02 02:04:40 +01:00
Eirik Wittersø
2fd6af1929 fetchFromBittorrent: Rename to fetchtorrent 2023-10-28 11:32:10 +01:00