Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove obsolete lightweight build option #4509

Merged
merged 1 commit into from
Jan 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ option(ENABLE_WEB "Build Web client" OFF)
option(ENABLE_UTILS "Build utils (create, edit, show)" ON)
option(ENABLE_CLI "Build command-line client" OFF)
option(ENABLE_TESTS "Build unit tests" ON)
option(ENABLE_LIGHTWEIGHT
"Optimize libtransmission for low-resource systems: smaller cache size, prefer unencrypted peer connections, etc."
OFF)
option(ENABLE_UTP "Build µTP support" ON)
option(ENABLE_WERROR "Treat warnings as errors" OFF)
option(ENABLE_NLS "Enable native language support" ON)
Expand Down
4 changes: 2 additions & 2 deletions docs/Editing-Configuration-Files.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ Here is a sample of the three basic types: respectively Boolean, Number and Stri
_Note: When **watch-dir-enabled** is true, only the transmission-daemon, transmission-gtk, and transmission-qt applications will monitor **watch-dir** for new .torrent files and automatically load them._

#### Misc
* **cache-size-mb:** Size (default = 4), in megabytes, to allocate for Transmission's memory cache. The cache is used to help batch disk IO together, so increasing the cache size can be used to reduce the number of disk reads and writes. Default is 2 if configured with --enable-lightweight.
* **cache-size-mb:** Size (default = 4), in megabytes, to allocate for Transmission's memory cache. The cache is used to help batch disk IO together, so increasing the cache size can be used to reduce the number of disk reads and writes.
* **dht-enabled:** Boolean (default = true) Enable [Distributed Hash Table (DHT)](https://wiki.theory.org/BitTorrentSpecification#Distributed_Hash_Table).
* **encryption:** Number (0 = Prefer unencrypted connections, 1 = Prefer encrypted connections, 2 = Require encrypted connections; default = 1) [Encryption](https://wiki.vuze.com/w/Message_Stream_Encryption) preference. Encryption may help get around some ISP filtering, but at the cost of slightly higher CPU use.
* **lazy-bitfield-enabled:** Boolean (default = true) May help get around some ISP filtering. [Vuze specification](https://wiki.vuze.com/w/Commandline_options#Network_Options).
* **lpd-enabled:** Boolean (default = false) Enable [Local Peer Discovery (LPD)](https://en.wikipedia.org/wiki/Local_Peer_Discovery).
* **message-level:** Number (0 = None, 1 = Error, 2 = Info, 3 = Debug, default = 2) Set verbosity of transmission messages.
* **pex-enabled:** Boolean (default = true) Enable [https://en.wikipedia.org/wiki/Peer_exchange Peer Exchange (PEX)].
* **prefetch-enabled:** Boolean (default = true). When enabled, Transmission will hint to the OS which piece data it's about to read from disk in order to satisfy requests from peers. On Linux, this is done by passing `POSIX_FADV_WILLNEED` to [posix_fadvise()](https://www.kernel.org/doc/man-pages/online/pages/man2/posix_fadvise.2.html). On macOS, this is done by passing `F_RDADVISE` to [fcntl()](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fcntl.2.html). This defaults to false if configured with --enable-lightweight.
* **prefetch-enabled:** Boolean (default = true). When enabled, Transmission will hint to the OS which piece data it's about to read from disk in order to satisfy requests from peers. On Linux, this is done by passing `POSIX_FADV_WILLNEED` to [posix_fadvise()](https://www.kernel.org/doc/man-pages/online/pages/man2/posix_fadvise.2.html). On macOS, this is done by passing `F_RDADVISE` to [fcntl()](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fcntl.2.html).
* **scrape-paused-torrents-enabled:** Boolean (default = true)
* **script-torrent-added-enabled:** Boolean (default = false) Run a script when a torrent is added to Transmission. Environmental variables are passed in as detailed on the [Scripts](./Scripts.md) page
* **script-torrent-added-filename:** String (default = "") Path to script.
Expand Down
1 change: 0 additions & 1 deletion libtransmission/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ target_compile_definitions(${TR_NAME}
PACKAGE_DATA_DIR="${CMAKE_INSTALL_FULL_DATAROOTDIR}"
$<$<BOOL:${WITH_INOTIFY}>:WITH_INOTIFY>
$<$<BOOL:${WITH_KQUEUE}>:WITH_KQUEUE>
$<$<BOOL:${ENABLE_LIGHTWEIGHT}>:TR_LIGHTWEIGHT>
$<$<BOOL:${ENABLE_UTP}>:WITH_UTP>
$<$<VERSION_LESS:${MINIUPNPC_VERSION},1.7>:MINIUPNPC_API_VERSION=${MINIUPNPC_API_VERSION}> # API version macro was only added in 1.7
$<$<BOOL:${USE_SYSTEM_B64}>:USE_SYSTEM_B64>
Expand Down
8 changes: 1 addition & 7 deletions libtransmission/crypto-utils-openssl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ static void log_openssl_error(char const* file, int line)

if (tr_logLevelIsActive(TR_LOG_ERROR))
{
#ifndef TR_LIGHTWEIGHT

static bool strings_loaded = false;

if (!strings_loaded)
if (static bool strings_loaded = false; !strings_loaded)
{
#if OPENSSL_VERSION_NUMBER < 0x10100000 || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000)
ERR_load_crypto_strings();
Expand All @@ -52,8 +48,6 @@ static void log_openssl_error(char const* file, int line)
strings_loaded = true;
}

#endif

auto buf = std::array<char, 512>{};
ERR_error_string_n(error_code, std::data(buf), std::size(buf));
tr_logAddMessage(
Expand Down
2 changes: 1 addition & 1 deletion libtransmission/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct tr_error;

/* #define DISABLE_GETTEXT */
#ifndef DISABLE_GETTEXT
#if defined(_WIN32) || defined(TR_LIGHTWEIGHT)
#if defined(_WIN32)
#define DISABLE_GETTEXT
#endif
#endif
Expand Down