1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +00:00
Commit graph

158 commits

Author SHA1 Message Date
Mike Gelfand
5edbcb3740
Add CommonCrypto-based crypto utils implementation (#2032)
* Add CommonCrypto-based crypto utils implementation

Ported and adapted from an old (circa 2014-2015) branch of mine.

DH helpers are based on CCBigNum since CCDH doesn't provide acceptable error
reporting, and SecDH interface is a bit weird and limiting. Given that all
mentioned APIs are private, it doesn't seem to matter which one we're using as
any of them could be changed/removed by Apple at any point.

* Switch Xcode project to CommonCrypto backend
2021-10-24 21:19:57 +03:00
Mike Gelfand
bf41e1487a
Switch from gtk to gtkmm (#1969)
* Gtk to gtkmm: main.cc

* Gtk to gtkmm: details.cc

* Gtk to gtkmm: tr-window.cc

* Gtk to gtkmm: tr-prefs.cc

* Gtk to gtkmm: open-dialog.cc

* Gtk to gtkmm: file-list.cc

* Gtk to gtkmm: filter.cc

* Gtk to gtkmm: torrent-cell-renderer.cc

* Gtk to gtkmm: msgwin.cc

* Gtk to gtkmm: makemeta-ui.cc

* Gtk to gtkmm: relocate.cc

* Gtk to gtkmm: stats.cc

* Gtk to gtkmm: dialogs.cc

* Gtk to gtkmm: hig.cc

* Gtk to gtkmm: favicon.cc

* Gtk to gtkmm: icons.cc

* Gtk to gtkmm: tr-icon.cc

* Gtk to gtkmm: actions.cc

* Gtk to gtkmm: notify.cc

* Gtk to gtkmm: util.cc

* Gtk to gtkmm: tr-core.cc

* Gtk to gtkmm: conf.cc

* Glibmm <2.62 compatibility (missing Glib::ustring::sprintf)

* Glibmm <2.56 compatibility (missing Glib::RefPtr<>::get)

* Bump glibmm to 2.50.1+ (C++17 fix in Glib::Variant)

* Fix empty timestamps on message log export (broken by #1444)

* Fix LGTM build issues

* Review fixes
2021-10-18 23:22:31 +03:00
Charles Kerr
90605d4bd3
build: skip clang-tidy on lgtm (#1792)
* build: skip clang-tidy on lgtm

* build: skip clang-tidy on appveyor

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2021-09-12 14:36:51 -05:00
Charles Kerr
4c1b627647
refactor: port libtransmission to C++ (#1787)
Port libtransmission to C++. This PR doesn't refactor everything to c++.
Its code changes are only what was necessary to compile and link as c++.
See libtransmission/README.md for details on how to submit modernization 
patches!

Co-authored-by: Mike Gelfand <mikedld@mikedld.com>
2021-09-12 12:41:49 -05:00
Mike Gelfand
a459e5e11b
Switch to a standalone ARC4 implementation (#1788)
* Switch to a standalone ARC4 implementation

This frees us from expecting it being provided by one of the crypto
libraries we support, all of which deprecated and/or removed it at this
point.

Fixes: #1103
Fixes: #1777

* Suppress lgtm warnings about RC4 being weak (we don't care)
2021-09-12 06:47:29 +03:00
Mike Gelfand
8c9faf1f71 Set default Mac target version in CMake to avoid extra warnings 2021-08-17 00:32:32 +03:00
Mike Gelfand
647c171636 Clean-up leftover mentions of uncrustify, fix custom format targets 2021-08-16 01:08:56 +03:00
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
Dzmitry Neviadomski
59cf023e57
Update libevent to 2.1.12-stable. (#1588)
* Update libevent to 2.1.12-stable.

Fixes `kq_init: detected broken kqueue; not using.: Undefined error: 0`
message on start on macOS.

* Do not build libevent samples.

* Explicitly set library type to static on MSVC for libevent.

Co-authored-by: Mitch Livingston <livings124@mac.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-05-20 11:36:12 -05:00
Charles Kerr
41f225df7b
Remove posix memalign (#1520)
* refactor: remove unnecessary func tr_valloc()

We're only using it in a handful of places, and none of them need the
kind of alignment that posix_memalign() provide. So we can drop a few
dozen lines by removing the portability wrapper.
2020-11-15 15:53:42 -06:00
Charles Kerr
cd453764b1
feat: web client refresh (#1476)
Give the web client a major overhaul.

User-visible highlights include:

* Mobile is now fully supported.
* Added fullscreen support on mobile.
* Better support for dark mode.
* Added mime icons to the torrent list.
* Improved theme consistency across the app.

Maintainer highlights include:

* Updated code to use ES6 APIs.
* No longer uses jQuery UI.
* No longer uses jQuery.
* Use Webpack to bundle the Javascript, CSS, and assets together -- the entire bundle size is now 68K gzipped.
* Added eslint / prettier / stylelint tooling.
* Uses torrent-get's 'table' mode for more efficient RPC calls.
2020-10-23 20:04:25 -05:00
Mike Gelfand
4c7153fa48
Remove autotools-based build system (#1465)
* Support .git files (e.g. for worktrees, submodules)
* Fix symlinks in source tarball, switch to TXZ, adjust non-release name
* Remove autotools stuff
2020-10-13 03:15:19 +03:00
Charles Kerr
54a7cac25a
chore: run uncrustify in parallel; add package.json to web directory (#1454)
* refactor: add package.json for web client

* refactor: call uncrustify in parallel
2020-09-20 15:41:45 -05:00
Charles Kerr
be219ddee0
chore: add precommit hook for testing code style (#1448)
* chore: add precommit hook for testing code style

* chore: use prettier + eslint for js code
2020-09-13 21:41:32 -05:00
Charles Kerr
efaa66a920
fix: resolve some lgtm warnings (#1444)
* fix: warnings found by LGTM static analyzer
2020-09-11 16:07:45 -05:00
Mike Gelfand
e61b49c2fe Disable openssl support when building bundled libevent 2020-08-26 04:09:15 +03:00
Mike Gelfand
077f4d8d2b Require C11, switch to standard static_assert 2020-08-18 14:19:55 +03:00
Mike Gelfand
5125feca5d Don't test warning flags inherently unsupported by compiler
MSVC does not support GNU-style compiler flags, and vice versa. Not only
does it make no sense to test for those flags, with MSVC it also takes
considerably longer to do so.

The only flag that MSVC does support is -Wall (/Wall), but since it's
equivalent to Clang's -Weverything and thus issues lots of warnings
nobody usually cares about, including from system header files, it's
preferred to use /W4.
2020-08-18 11:37:25 +03:00
Mike Gelfand
4e5ad7937a Don't add warning flags that don't apply to a specific language
Some compilers issue additional CLI-level warning, that cannot be
suppressed, when passed flags that are irrelevant for a particular
invocation. Temporarily treat warnings as errors when testing flags
support so that those warnings lead to flags being excluded.
2020-08-18 10:51:38 +03:00
Mike Gelfand
057b8a61d6 Use CURL::libcurl imported target when available
When built with CMake, CURL installation includes configuration package
that could be used instead of CMake-bundled find module. The former
doesn't define CURL_INCLUDE_DIRS and CURL_LIBRARIES variables, but only
imported targets.
2020-08-18 09:58:33 +03:00
Charles Kerr
68920f5fa6
refactor: remove exit-time destructors from transmission-qt (#1395)
* refactor: remove exit-time destructors from transmission-qt
2020-08-15 10:42:51 -05:00
Charles Kerr
677dc73eac
refactor: use GTest for running tests (#1383)
* refactor: use google-test on libtransmission tests
2020-08-11 13:11:55 -05:00
Vitaly Potyarkin
2da97b25fa
Lift 1024 open files limit (switch to curl polling API) (#893)
* Switch to new libcurl's polling interface

* Drop unused includes

* Use NOFILE limit value defined by operating system

* Avoid tight loops, ensure blocking for a small timeout

When there are no file descriptors to wait for, select() would work the
same as sleep(). But curl_multi_wait() returns immediately in this case,
so we need to add explicit wait to avoid tight loops.

Documentation: https://curl.haxx.se/libcurl/c/curl_multi_timeout.html
Discussion: https://curl.haxx.se/mail/lib-2018-03/0074.html

* Bump libcurl minimum version to 7.28.0
2020-07-28 21:38:27 -05:00
Charles Kerr
d43aeb6a5c
chore: add clang-tidy checks to Qt client (#1236)
* chore: add clang-tidy integration for Qt client
2020-05-19 20:32:51 -05:00
Charles Kerr
e7c099b8d8 chore: bump version to '3.00+' 2020-05-15 19:38:43 -05:00
Charles Kerr
bb6b5a062e chore: bump version to '3.00'
If at first you don't succeed, bang your fingers on the keyboard until something works
2020-05-15 19:36:16 -05:00
Charles Kerr
6925be34b5
docs: make 'news' a markdown file (#1208)
* chore: fix markdown headers in NEWS.md

* chore: turn closed pulls/issues into links

* chore: linkify the release headers

* chore: fill in the 3.00 release date

* chore: use 'NEWS.md' in build scripts

* chore: tweak date format to YYYY-MM-DD
2020-05-03 18:33:57 -05:00
Charles Kerr
2cc5cfe3e3
feat: smart caching of TorrentDelegate::sizeHint() (#1026)
* feat: smart caching of TorrentDelegate::sizeHint()

* chore: bump c++ requirement to c++17 / c++1z
2019-11-06 18:17:48 -06:00
Mike Gelfand
5a5fe7d7fe Bump version to 3.00 (nightly) 2019-07-21 15:11:49 +03:00
Mike Gelfand
ec79767e5f Support OFD locks and missing flock 2019-07-13 22:53:04 +03:00
LaserEyess
750589101a Parse session-id header case-insensitively (#765)
RFC 2616 defines headers as case-insensitive, so if rpc is behind a
reverse proxy that lowers the case of headers, transmission will not
parse them correctly.

A new wrapper function, `tr_strcasestr` is added to
libtransmission/utils.c to allow for comparisons of headers case
insensitively, and checks in cmake and autogen are included.
2019-03-17 17:37:52 +03:00
Mike Gelfand
dab4857f90
Merge branch 'master' into rmintltool 2019-02-24 21:52:09 +03:00
Mike Gelfand
c951848a5b Merge branch '2.9x' 2018-05-01 22:44:51 +03:00
Mike Gelfand
d8e60ee44f Bump version, update news 2018-05-01 20:18:29 +03:00
userwithuid
8c160aad2d cmake: replace intltool with gettext
requires gettext 0.19.7 or higher
2018-04-18 09:25:13 +00:00
Mike Gelfand
cefd8a3149 Bump version to 2.93+, fix NEWS date 2018-02-22 23:44:19 +03:00
Mike Gelfand
94be7dbd9b Merge branch '2.9x' 2018-01-25 03:07:52 +03:00
Mike Gelfand
7f008edab6 Improve version.h file generation
Store full revision hash in REVISION file. Write fixes 10 chars of revision
hash to version.h. Use `#pragma once` in version.h. Support getting revision
from TeamCity environment variable (similar to Jenkins).
2018-01-23 21:59:09 +03:00
Mike Gelfand
f6b23c02f0 Don't search for SVN revision when calculating version 2018-01-23 21:58:50 +03:00
Mike Gelfand
b875e79f3d Replace SVN and SCM with VCS everywhere 2018-01-23 21:58:33 +03:00
Mike Gelfand
b237a260c5 Try getting SVN revision from Jenkins environment when using CMake (copy logic from update-version-h.sh) 2018-01-23 21:57:52 +03:00
Mike Gelfand
0b047f7aa5 Update NEWS, bump to 2.93 2018-01-17 20:52:37 +03:00
Mike Gelfand
f27596238d Include stdbool.h unconditionally
All the compilers should provide the header file by now. Remove `tr_isBool`
sanity checks along the way as compiler should guarantee that bool (_Bool)
values are 0 or 1 and nothing else.
2017-05-24 22:53:06 +03:00
Mike Gelfand
fa6ad47f71 Use C++ linker for anything that depends on static libutp 2017-05-20 13:06:22 +03:00
Mike Gelfand
8fce4173dc Fix CMake check for missing crypto backend
Fixes: #191
2017-02-23 23:18:45 +03:00
Mike Gelfand
c6bfe9de15 Use QtWinExtras instead of importing private Qt function to get QPixmap from HICON 2017-02-11 20:48:13 +03:00
Mike Gelfand
8dc6fb48b1 Bump minimum required Qt version to 5.2 2017-02-11 13:24:42 +03:00
Mike Gelfand
fd93316466 Improve version.h file generation
Store full revision hash in REVISION file. Write fixes 10 chars of revision
hash to version.h. Use `#pragma once` in version.h. Support getting revision
from TeamCity environment variable (similar to Jenkins).
2017-01-15 00:54:56 +03:00
Mike Gelfand
b6d2649ddc Initial Mac support in CMake configuration 2017-01-11 23:43:53 +03:00
Mike Gilbert
b7a850b073 cmake: ignore .git when creating source tarball 2017-01-02 21:07:44 -05:00
Mike Gelfand
e83a062417 Adjust CMake files to use submodules instead of downloading archives 2017-01-02 02:26:02 +03:00
Mike Gelfand
448d8f39f6 CMake support for Solaris 2016-12-24 20:16:54 +03:00
Mike Gilbert
d8cb7b3e0c cmake: add FindSYSTEMD module
Fixes: https://github.com/transmission/transmission/issues/117
2016-12-18 22:06:37 -05:00
Mike Gelfand
9252f495af Remove CDash-related stuff from the project, not used now anyway 2016-12-18 23:41:40 +03:00
Mike Gilbert
147e31a32d cmake: Allow libappindicator to be toggled
This will allow libappindicator to become an optional dependency on
Gentoo Linux.

https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependencies
2016-11-27 14:18:59 -05:00
Mike Gelfand
b2c5a9ce63 Don't search for SVN revision when calculating version 2016-09-02 22:45:03 +03:00
Mike Gelfand
95e12a3a0a Package README.md instead of README 2016-09-02 22:34:29 +03:00
Mike Gelfand
1b81bb7682 Replace SVN and SCM with VCS everywhere 2016-09-02 22:21:00 +03:00
Mike Gelfand
682b11aac4 Bump minimum Qt version to 4.8
Earlier versions may continue to work, but we don't guarantee they will.
2016-04-24 07:41:06 +00:00
Mike Gelfand
0862099d0b #5921: Use libsystemd instead of libsystemd-daemon (original patches by Sandro Tosi and Mike Gilbert)
In systemd v209, released over two years ago, the various libsystemd-*
libraries (libsystemd-journal.so, libsystemd-login.so, libsystem-daemon.so,
libsystemd-id128.so) were merged into a single libsystemd.so library to
reduce code duplication and avoid cyclic dependencies.
2016-04-23 16:13:25 +00:00
Mike Gelfand
e04add39ad Fork 3rd-party libraries on GitHub 2016-04-09 08:52:41 +00:00
Mike Gelfand
1cb17447dc Try getting SVN revision from Jenkins environment when using CMake (copy logic from update-version-h.sh) 2016-04-03 05:53:32 +00:00
Mike Gelfand
caaca040bd Only include .msi-related CMake stuff when it makes sense 2016-04-02 20:01:59 +00:00
Mike Gelfand
db1553b113 Add files necessary for .msi packages creation on Windows 2016-04-02 18:01:01 +00:00
Mike Gelfand
0fd932eaa5 Bump to 2.92+ 2016-03-10 00:31:03 +00:00
Mike Gelfand
67ef7b888c Update NEWS, bump to 2.92 2016-03-06 19:51:54 +00:00
Mike Gelfand
4371c6e765 Bump to 2.91 2016-03-06 06:17:44 +00:00
Mike Gelfand
212093992d Bump to 2.90+ 2016-02-28 04:51:08 +00:00
Mike Gelfand
96a46c0f57 Bump version to 2.90 2016-02-27 23:41:26 +00:00
Mike Gelfand
86f231184b Fix warning for when 2nd iconv() argument is const 2016-02-23 05:07:43 +00:00
Mike Gelfand
c3d9e77c40 Define HAVE_ICONV instead of HAVE_ICONV_OPEN when CMake is used 2016-02-23 03:00:12 +00:00
Mike Gelfand
96ea2c82fd Check for iconv() instead of iconv_open(), adjust utils test 2016-02-07 11:54:01 +00:00
Mike Gelfand
10159208e1 Disable format warnings when building with MinGW 2016-01-09 18:24:43 +00:00
Mike Gelfand
7ea2b71ec8 Fix MinGW build (still produces lots of useless warnings though) 2015-12-31 12:41:17 +00:00
Mike Gelfand
d4213f09d5 On second thought, bring back stdbool.h check back
Might be useful for uClibc (which still doesn't provide it) and others.
2015-12-29 19:44:50 +00:00
Mike Gelfand
eb8fc35ac6 Remove useless checks and definitions (C99)
Now that MSVC support for C99 is quite good, remove previously needed but
now unused checks and definitions, like PRI* format macros (including
PRIdMAX and TR_PRIuSIZE, replaced with %jd and %zu) and inline macro.
Also, remove ssize_t typedef and replace few occurences with ev_ssize_t.
Also, remove check for stdbool.h availability (guaranteed by C99) and
include it unconditionally (except when in C++ mode).
2015-12-29 19:37:31 +00:00
Mike Gelfand
34ebe520a1 Move DBus/COM checks up to where Qt is being searched for 2015-12-17 18:10:43 +00:00
Mike Gelfand
e92449d91f Add ActiveQt-based COM interop helper 2015-12-16 20:01:03 +00:00
Mike Gelfand
7c951671bd Bump CMake to 2.8.12, rework Qt use a little 2015-12-16 18:46:06 +00:00
Mike Gelfand
3f86b77068 Add the rest of current Windows-related third-party patches 2015-11-06 20:47:52 +00:00
Mike Gelfand
7502dcc439 Don't install Makefile.in files for web UI when using CMake 2015-11-05 22:48:27 +00:00
Mike Gelfand
69687544d7 #6005: Bump minimum OpenSSL version to 0.9.7, fix build for versions less than 0.9.8b 2015-10-13 21:24:31 +00:00
Mike Gelfand
0f9bdc6ac2 Use CMake-provided C/C++ standard selection capabilities; fix build (qtr.pro) 2015-08-01 16:05:02 +00:00
Mike Gelfand
088c5c6ab9 Bump DHT version used in CMake scripts (includes latest Win32 fixes) 2015-06-08 19:54:51 +00:00
Mike Gelfand
5d48c2d3e9 #5851: Don't use _configthreadlocale if not provided by CRT (even if declaration is present) 2015-06-01 18:52:14 +00:00
Mike Gelfand
ae5755dc1e #5851: Use per-thread locale setup if possible
This prevents crashes on concurrent tr_variantFromBuf, tr_variantToBuf
and tr_variantGetReal use.
2015-06-01 05:25:14 +00:00
Mike Gelfand
a1393e7b35 #5934: Generate REVISION file and use it in case of missing reliable source 2015-04-24 19:14:56 +00:00
Mike Gelfand
b5eee9b0fc Bump natpmp revision to include latest Win32 fixes 2015-04-23 22:03:29 +00:00
Mike Gelfand
123a8decc2 Define WIN32_LEAN_AND_MEAN and NOMINMAX for our own code only 2015-04-23 21:32:00 +00:00
Mike Gelfand
68339d6933 Bump miniupnpc revision to fix MINIUPNP_STATICLIB macro definition 2015-04-21 13:56:17 +00:00
Mike Gelfand
829cbffaf7 Add version info to executables (on Windows). Group projects into folders (CMake). 2015-04-14 22:46:40 +00:00
Mike Gelfand
5578d616a8 Add patch from #5002 (r13646) to fix crash in libutp for CMake-based builds 2015-03-29 20:48:06 +00:00
Mike Gelfand
4072ff2a21 Fix libb64 unsigned char issues while waiting for upstream to accept the patch 2015-03-14 06:59:44 +00:00
Mike Gelfand
a2037bdbbd Define one of LFS macros instead of using xxx64 functions directly.
There're too many functions and types to consider, and benefits of not
using LFS macros aren't that big (I was thinking of using fts(3) but
that may not happen soon or at all).
2015-03-10 22:31:09 +00:00
Mike Gelfand
8c511dc590 Use lseek64 instead of lseek, if available (large files on 32-bit systems) 2015-03-08 19:14:24 +00:00
Mike Gelfand
bdcd69537e Bump libevent version used by CMake to 2.0.22-stable 2015-01-13 21:27:31 +00:00
Mike Gelfand
30690fcf99 Lower minimum PolarSSL version required down to 1.2 2015-01-07 13:41:22 +00:00
Mike Gelfand
d877fb9cde Add PolarSSL support 2015-01-07 13:19:00 +00:00
Mike Gelfand
3dcc53f4f5 #4400: Do not require OpenSSL anymore 2015-01-07 02:16:24 +00:00
Mike Gelfand
c7d2a7f959 #4400: Add CyaSSL support 2015-01-07 02:04:08 +00:00