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

ayatana-indicator-messages: fix PIE hardening #372768

Merged
merged 1 commit into from
Jan 31, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions pkgs/by-name/ay/ayatana-indicator-messages/fix-pie.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 316457cf70dd105905d5d4925f43de280f08ab10 Mon Sep 17 00:00:00 2001
From: OPNA2608 <[email protected]>
Date: Sat, 11 Jan 2025 20:55:29 +0100
Subject: [PATCH] tests/CMakeLists.txt: Drop hardcoded -no-pie linker flags

---
tests/CMakeLists.txt | 2 --
1 file changed, 2 deletions(-)

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 63beacb..5b0812c 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -32,7 +32,6 @@ add_dependencies("indicator-messages-service" "ayatana-indicator-messages-servic
# test-gactionmuxer

add_executable("test-gactionmuxer" test-gactionmuxer.cpp)
-target_link_options("test-gactionmuxer" PRIVATE -no-pie)
target_include_directories("test-gactionmuxer" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS} "${CMAKE_SOURCE_DIR}/src")
target_link_libraries("test-gactionmuxer" "indicator-messages-service" ${PROJECT_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIBRARIES})
add_test("test-gactionmuxer" "test-gactionmuxer")
@@ -59,7 +58,6 @@ add_custom_target("gschemas-compiled" ALL DEPENDS gschemas.compiled)

pkg_check_modules(DBUSTEST REQUIRED dbustest-1)
add_executable("indicator-test" indicator-test.cpp)
-target_link_options("indicator-test" PRIVATE -no-pie)
target_include_directories("indicator-test" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS} ${DBUSTEST_INCLUDE_DIRS} "${CMAKE_SOURCE_DIR}/libmessaging-menu")
target_link_libraries("indicator-test" "messaging-menu" ${PROJECT_DEPS_LIBRARIES} ${DBUSTEST_LIBRARIES} ${GTEST_LIBRARIES} ${GTEST_BOTH_LIBRARIES} ${GMOCK_LIBRARIES})
target_compile_definitions(
5 changes: 5 additions & 0 deletions pkgs/by-name/ay/ayatana-indicator-messages/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ stdenv.mkDerivation (finalAttrs: {
"dev"
] ++ lib.optionals withDocumentation [ "devdoc" ];

patches = [
# Remove when https://github.com/AyatanaIndicators/ayatana-indicator-messages/pull/39 merged & in release
./fix-pie.patch
OPNA2608 marked this conversation as resolved.
Show resolved Hide resolved
FliegendeWurst marked this conversation as resolved.
Show resolved Hide resolved
];

postPatch =
''
# Uses pkg_get_variable, cannot substitute prefix with that
Expand Down