We do not need libx11 to compile Qt with some very minor patches.
Removing this removes attack surface from dogecoin-qt and reduces
future maintenance cost.
- Removes packages:
- libX11
- libXext
- xextproto
- xtrans
- Patches Qt to not try to include X11 anywhere
- Removes x11-xcb check from bitcoin_qt.m4
- Remove permission to depend on libX11*so in release binaries
Backported-from: 1ec30b8f
aa53cb7a
92456991
0c55d8b5
689d3b4a
Co-Authored-By: Carl Dong <contact@carldong.me>
dbus is not used by qt in depends per documentation of the
-dbus-runtime configuration flag - it uses the packaged interface
and can be removed as a managed dependency.
Since dbus interfaces are only used on linux, remove it from the
windows and macOS configurations.
Backported-from: e8fabd92
6fdf5dab
Co-authored-by: fanquake <fanquake@gmail.com>
Remove functionality of Qt that we do not need, resulting in a
smaller dogecoin-qt binary and a reduced attack surface.
- removes all image support except png
(xpm is needed for qt binary build tools)
- no longer use Qt's built-in libjpeg
- disable all unused features
Items that cannot be removed vs Bitcoin Core:
For paper wallets:
- printer dialogs and pdf
- html rendering
For BIP70 payment requests:
- network configuration
- openssl
- socks5 support
Adds a lint job to the CI where we can do sanity analysis on
included files to help spot errors on non-cpp source files
that may cause problems during runtime.
This first job implements contrib/devtools/check-translations.py
that alerts the repository of errors in the translation files in
src/qt/locale. Errors in a translation file are otherwise only
becoming visible during runtime.
remove misinformation, this belongs in the dogecoin/docs/build-unix.md page, not under cross compilation for windows. Installing these linux libraries and interfere with libs cross-compiled from /dogecoin/depends/packages m4's. This line can be put in the build-unix.md, but it definitely doesnt belong here.
Reasons for the change:
1) Type Safety:
nullptr is a keyword introduced in modern C++. It's designed to be type-safe, meaning it can only represent a null pointer value.
NULL, on the other hand, is typically defined as 0. It's a macro and is not type-safe. This means you can unintentionally assign NULL to an integer variable without any compiler warnings.
2) Explicit Null Pointer Value:
nullptr is explicitly defined to represent a null pointer value. It's clear and unambiguous.
NULL is usually defined as 0, which can lead to ambiguity. For instance, when comparing a pointer to an integer, it's unclear whether you're checking for a null pointer or a zero integer value.
3) Consistency with C++:
nullptr is consistent with the principles of modern C++. C++ is a strongly typed language, and nullptr is designed to be a type-safe representation of a null pointer.
NULL is a legacy from C and is essentially a macro for 0. It doesn't align as well with the type-safe nature of C++.
Fixes the detection of bdb on brew enabled systems by using
dogecoin_find_bdb53.m4 parametrization and checking if the
brew-located files actually work.
Searches brew installed packages in the order: 5.x, 4.x, default.
The reason for this order is that 4.x is still fully readable by
5.3.27NC that is distributed by default, and therefore prefered
over newer-than 5.x versions.
This logs either positional arguments or named arguments if no
positional arguments exist when using --tracerpc to allow deep
examination of calls that use named arguments.
The __call__ function rejects any calls made using both positional
and named arguments, therefore we can print either in this
construction.
Throughout the codebase we use std::shared_ptr, except for some
instances in the miner code, where we use boost::shared_ptr for
sharing a wallet address with the miner and rpc across threads.
This patch removes all usage of boost::shared_ptr to instead use
std::shared_ptr, to reduce exposure to multiple shared pointer
implementations.
While the default server name is almost always what we want, given that
it is unique to main or testnet and the default data directory,
defaulting to this value during tests is not always what we want,
especially if there's production data or the path is not available
(think of a CI system).
Switch the test to provide a fixed server name at the point of
constructing the PaymentServer object.
Addresses GH #3285.
glibc absorbed clock_gettime in 2.17. To retain backward
compatibility with systems that package glibc < 2.17, we need to
include it anyway. Until gcc-7, librt still got included with all
relevant symbols, so there was no issue and we could just use
that instead of gcc-native clock_gettime.
Since gcc-9, we need to explicitly add lrt outside the scope of
"as-needed" packages, because ld finds no reason to add a
DT_NEEDED tag for it, despite our inclusion, as the function
gets pulled from libc.so.6. Therefore, we:
1. disable "as-needed"
2. add librt
3. re-enable "as-needed" again
This way, we both force include librt, but still not link any
other unneeded libraries.
Because this is only valid for backward compatible binaries where
our build system is newer than the oldest supported OS (i.e. when
cross-compiling, running CI or gitian built releases) the -lrt flag
is now part of COMPAT_LDFLAGS instead of global "LIBS" when
configuring with --with-glibc-back-compat.
This explicit link can be removed when we drop support for glibc
versions < 2.17 (i.e. in the next major version)
cause: msft/gha doesn't support the i386 winehq ppa, therefore we
have to use a workaround to download necessary i386 dependencies
for winehq-stable.
This adds winehq-focal.sources to and removes microsoft-prod.list
from the i686 build.
Implemented by the "add architecture" CI step into a script that
can now be customized per job.
Co-authored-by: Patrick Lodder <patricklodder@users.noreply.github.com>
Co-Authored-By: Cory Fields <cory-nospam-@coryfields.com>
Cherry-picked from: ca5055a
Cherry-pick notes: undid the removal of -mlinker-version, as this
was done erroneously upstream