Go to file
RobCrowston 0155252823
Add in-kernel file copying for several platforms. (#1092)
* Add in-kernel copying support for Linux (sendfile64(2), copy_file_range(2)), FreeBSD 13 (copy_file_range(2)), MacOS (copyfile(2)), and Windows (CopyFileExA).

* Fix macro name USE_COPY_FILE_RANGE.

* Minor bugfixes for userspace fallback.

* Fix linux sendfile64 bugs.

* Remove some overzealous asserts.

* Allow transmission-test-copy to take an optional argument for an external reference file.

* Fix return value error of tr_sys_path_copy.

* Use COPYFILE_ALL for Macs without COPYFILE_CLONE.

* Add in-kernel file copying for several platforms.

Numerous operating systems now have support for copying files directly in the
kernel, which is generally more efficient than copying in a userspace read(2)/
write(2) loop. (This becomes particularly relevant for 4th gen PCI-E storage,
which approaches the latency of DRAM.) For Linux I use sendfile64(2), and, for
later kernels, copy_file_range(2). FreeBSD 13 will also support
copy_file_range(2). MacOS has copyfile(2), and Windows has CopyFileExA.
Operating systems lacking such a syscall continue to use the existing
read(2)/write(2) loop.

* Appease uncrustify.

* Appease uncrustify.

* copy-test: generate random content at run time.

* copy-test: Stylistic changes and more check()s.

* copy-test: files_are_identical should follow test idioms

* tr_sys_path_copy: numerous tweaks as requested by review.

* s/old file/source file; s/new file/destination file.

* tr_sys_path_copy: handle win32 wide characters in paths.

* Uncrustify.

* test-copy: Use non-string create_file_with_contents.

* tr_sys_path_copy: numerous fixes.

Per review: generate test file content at runtime; tidy use of check();
fix style; re-measure file sizes in the copy; define a macro when the
system does not provide it; use Unicode APIs on Windows; and fix
documentation.

* Updated as per comments.

* Rebase kernel-copy changes onto 3.0 with gtest.

* Undo irrelevant comment change.

* Fix syntax error.

* Use tr_malloc() instead of tr_valloc().

* Use EXPECT instead of TR_ASSERT in gtest.

* Add error handling.

* Acceptable coding style has changed again.

Now it's camelCase. Also use nullptr instead of NULL, etc.

* Fix east/west const.

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2021-08-07 12:04:03 +03:00
.tx Add Mac client translations to and downsync from Transifex 2017-01-28 13:44:15 +03:00
Transmission.xcodeproj Modern Objective-C syntax (#509) 2021-08-07 10:27:56 +03:00
cli chore: sonarcloud warnings 2 (#1496) 2020-11-01 15:47:57 -06:00
cmake Remove autotools-based build system (#1465) 2020-10-13 03:15:19 +03:00
daemon refactor: fix more sonarcloud warnings (#1508) 2020-11-05 16:46:21 -06:00
dist/msi feat: web client refresh (#1476) 2020-10-23 20:04:25 -05:00
docker/code_style chore: run uncrustify in parallel; add package.json to web directory (#1454) 2020-09-20 15:41:45 -05:00
extras feat: add torrent-get 'primary-mime-type' to RPC. (#1464) 2020-10-13 10:33:56 -05:00
gtk refactor: torrent-complete-sound-command is a list (#1710) 2021-05-25 11:21:41 -05:00
libtransmission Add in-kernel file copying for several platforms. (#1092) 2021-08-07 12:04:03 +03:00
macosx Modern Objective-C syntax (#509) 2021-08-07 10:27:56 +03:00
po Sync existing translations with Transifex 2020-11-03 20:26:30 +03:00
qt refactor: torrent-complete-sound-command is a list (#1710) 2021-05-25 11:21:41 -05:00
release/windows Appveyor CI is failing due to a 302 redirect. (#1697) 2021-05-18 09:41:17 -05:00
tests Add in-kernel file copying for several platforms. (#1092) 2021-08-07 12:04:03 +03:00
third-party Update libevent to 2.1.12-stable. (#1588) 2021-05-20 11:36:12 -05:00
utils sonarcloud warnings 9 (#1511) 2020-11-08 21:31:02 -06:00
web chore(deps): bump dns-packet from 1.3.1 to 1.3.4 in /web (#1715) 2021-06-13 21:51:54 -05:00
.gitignore feat: web client refresh (#1476) 2020-10-23 20:04:25 -05:00
.gitmodules refactor: use GTest for running tests (#1383) 2020-08-11 13:11:55 -05:00
AUTHORS macOS icon redesigned for Big Sur 2021-03-29 18:05:30 -04:00
CMakeLists.txt Add in-kernel file copying for several platforms. (#1092) 2021-08-07 12:04:03 +03:00
COPYING Bump copyright to 2020 (some more places) (#1206) 2020-05-02 12:26:42 -05:00
NEWS.md Update NEWS.md 2021-03-29 18:22:59 -04:00
README.md chore: run uncrustify in parallel; add package.json to web directory (#1454) 2020-09-20 15:41:45 -05:00
appveyor.yml fixup! chore: bump imagemagick version in choco install on appveyor (#1699) 2021-05-20 10:08:37 -05:00
code_style.sh feat: web client refresh (#1476) 2020-10-23 20:04:25 -05:00
docker-compose.yml chore: run uncrustify in parallel; add package.json to web directory (#1454) 2020-09-20 15:41:45 -05:00
uncrustify.cfg chore: run uncrustify in parallel; add package.json to web directory (#1454) 2020-09-20 15:41:45 -05:00
update-version-h.sh Extract version from CMakeLists.txt in update-version-h.sh 2020-12-17 16:04:29 +03:00

README.md

About

Transmission is a fast, easy, and free BitTorrent client. It comes in several flavors:

  • A native Mac OS X GUI application
  • GTK+ and Qt GUI applications for Linux, BSD, etc.
  • A headless daemon for servers and routers
  • A web UI for remote controlling any of the above

Visit https://transmissionbt.com/ for more information.

Command line interface notes

Transmission is fully supported in transmission-remote, the preferred cli client.

Three standalone tools to examine, create, and edit .torrent files exist: transmission-show, transmission-create, and transmission-edit, respectively.

Prior to development of transmission-remote, the standalone client transmission-cli was created. Limited to a single torrent at a time, transmission-cli is deprecated and exists primarily to support older hardware dependent upon it. In almost all instances, transmission-remote should be used instead.

Different distributions may choose to package any or all of these tools in one or more separate packages.

Building

Transmission has an Xcode project file (Transmission.xcodeproj) for building in Xcode.

For a more detailed description, and dependencies, visit: https://github.com/transmission/transmission/wiki

Building a Transmission release from the command line

$ tar xf transmission-2.92.tar.xz
$ cd transmission-2.92
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install

Building Transmission from the nightly builds

Download a tarball from https://build.transmissionbt.com/job/trunk-linux/ and follow the steps from the previous section.

If you're new to building programs from source code, this is typically easier than building from Git.

Building Transmission from Git (first time)

$ git clone https://github.com/transmission/transmission Transmission
$ cd Transmission
$ git submodule update --init
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install

Building Transmission from Git (updating)

$ cd Transmission/build
$ make clean
$ git pull --rebase --prune
$ git submodule update
$ cmake ..
$ make
$ sudo make install

Contributing

Code Style

You would want to setup your editor to make use of the uncrustify.cfg file located in the root of this repository and the eslint/prettier rules in web/package.json.

If for some reason you are unwilling or unable to do so, there is a shell script which you could run either directly or via docker-compose:

$ ./code_style.sh
or
$ docker-compose build --pull
$ docker-compose run --rm code_style