push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
From dbd44fbdc580a83ce7fb67fe8d2c87acee087cb0 Mon Sep 17 00:00:00 2001
From: OPNA2608 <opna2608@protonmail.com>
Date: Mon, 20 Jan 2025 19:25:00 +0100
Subject: [PATCH] treewide: Switch to glog CMake module
---
CMakeLists.txt | 5 ++---
src/CMakeLists.txt | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6f03c1c..b58d8ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,8 +38,9 @@ IF(CMAKE_BUILD_TYPE MATCHES [cC][oO][vV][eE][rR][aA][gG][eE])
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -ftest-coverage -fprofile-arcs" )
ENDIF(CMAKE_BUILD_TYPE MATCHES [cC][oO][vV][eE][rR][aA][gG][eE])
-find_package(PkgConfig)
+find_package(PkgConfig REQUIRED)
find_package(Boost COMPONENTS filesystem program_options system REQUIRED)
+find_package(glog REQUIRED)
add_subdirectory(3rd_party/xdg)
@@ -56,7 +57,6 @@ if (TRUST_STORE_MIR_AGENT_ENABLED)
)
endif()
-pkg_check_modules(GLOG libglog REQUIRED)
pkg_check_modules(PROCESS_CPP process-cpp REQUIRED)
include(CTest)
@@ -66,7 +66,6 @@ include_directories(
3rd_party/xdg
${GFLAGS_INCLUDE_DIRS}
- ${GLOG_INCLUDE_DIRS}
${PROCESS_CPP_INCLUDE_DIRS}
)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ac87e7f..416549c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -211,7 +211,7 @@ target_link_libraries(
${Boost_LIBRARIES}
${DBUS_LIBRARIES}
${GFLAGS_LDFLAGS}
- ${GLOG_LDFLAGS}
+ glog::glog
${GLIB_LDFLAGS}
${GOBJECT_LDFLAGS}
${LIBAPPARMOR_LDFLAGS}
--
2.47.1

View File

@@ -0,0 +1,147 @@
{
stdenv,
lib,
fetchFromGitLab,
fetchpatch,
gitUpdater,
testers,
# dbus-cpp not compatible with Boost 1.87
# https://gitlab.com/ubports/development/core/lib-cpp/dbus-cpp/-/issues/8
boost186,
cmake,
cmake-extras,
dbus,
dbus-cpp,
doxygen,
gettext,
glog,
graphviz,
gtest,
libapparmor,
newt,
pkg-config,
process-cpp,
properties-cpp,
qtbase,
qtdeclarative,
validatePkgConfig,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "trust-store";
version = "2.0.2";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/trust-store";
rev = finalAttrs.version;
hash = "sha256-tVwqBu4py8kdydyKECZfLvcLijpZSQszeo8ytTDagy0=";
};
outputs = [
"out"
"dev"
"doc"
"bin"
];
patches = [
# Remove when version > 2.0.2
(fetchpatch {
name = "0001-trust-store-Fix-boost-184-compat.patch";
url = "https://gitlab.com/ubports/development/core/trust-store/-/commit/569f6b35d8bcdb2ae5ff84549cd92cfc0899675b.patch";
hash = "sha256-3lrdVIzscXGiLKwftC5oECICVv3sBoS4UedfRHx7uOs=";
})
# Fix compatibility with glog 0.7.x
# Remove when https://gitlab.com/ubports/development/core/trust-store/-/merge_requests/18 merged & in release
./1001-treewide-Switch-to-glog-CMake-module.patch
];
postPatch = ''
# pkg-config patching hook expects prefix variable
substituteInPlace data/trust-store.pc.in \
--replace-fail 'libdir=''${exec_prefix}' 'libdir=''${prefix}' \
--replace-fail 'includedir=''${exec_prefix}' 'includedir=''${prefix}'
substituteInPlace src/core/trust/terminal_agent.h \
--replace-fail '/bin/whiptail' '${lib.getExe' newt "whiptail"}'
''
+ lib.optionalString (!finalAttrs.finalPackage.doCheck) ''
substituteInPlace CMakeLists.txt \
--replace-fail 'add_subdirectory(tests)' ""
'';
strictDeps = true;
nativeBuildInputs = [
cmake
doxygen
gettext
graphviz
pkg-config
validatePkgConfig
];
buildInputs = [
boost186
cmake-extras
dbus-cpp
glog
libapparmor
newt
process-cpp
properties-cpp
qtbase
qtdeclarative
];
nativeCheckInputs = [
dbus
];
checkInputs = [
gtest
];
dontWrapQtApps = true;
cmakeFlags = [
# Requires mirclient API, unavailable in Mir 2.x
# https://gitlab.com/ubports/development/core/trust-store/-/issues/2
(lib.cmakeBool "TRUST_STORE_MIR_AGENT_ENABLED" false)
(lib.cmakeBool "TRUST_STORE_ENABLE_DOC_GENERATION" true)
# error: moving a temporary object prevents copy elision
(lib.cmakeBool "ENABLE_WERROR" false)
];
# Not working
# - remote_agent_test cases using unix domain socket fail to do *something*, with std::system_error "Invalid argument" + follow-up "No such file or directory".
# potentially something broken/missing on our end
# - dbus_test hangs indefinitely waiting for a std::future, not provicient enough to debug this.
# same hang on upstream CI
doCheck = false;
preCheck = ''
export XDG_DATA_HOME=$TMPDIR
'';
# Starts & talks to DBus
enableParallelChecking = false;
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
updateScript = gitUpdater { };
};
meta = with lib; {
description = "Common implementation of a trust store to be used by trusted helpers";
homepage = "https://gitlab.com/ubports/development/core/trust-store";
license = licenses.lgpl3Only;
teams = [ teams.lomiri ];
platforms = platforms.linux;
pkgConfigModules = [
"trust-store"
];
};
})