Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 955446 - app-backup/bareos: fails with "Unknown CMake command "get_target_output_dir"."
Summary: app-backup/bareos: fails with "Unknown CMake command "get_target_output_dir"."
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Marc Schiffbauer
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2025-05-05 08:54 UTC by Jan Sielemann
Modified: 2025-05-05 09:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch (patch1.patch,402 bytes, patch)
2025-05-05 08:57 UTC, Jan Sielemann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Sielemann 2025-05-05 08:54:46 UTC
# Problem:
Try to build Bareos-24.0.2-r1 with use flags as follows:
/tmp/Bareos ❯ emerge -av app-backup/bareos                                                                                            
                                                                                                                                                            
 * IMPORTANT: 23 news items need reading for repository 'gentoo'.                                                                                           
 * Use eselect news read to view new items.                                                                                                                 
                                                                                                                                                            
                                                                                                                                                            
These are the packages that would be merged, in order:                                                                                                      
                                                                                                                                                            
Calculating dependencies... done!                                                                                                                           
Dependency resolution took 5.76 s (backtrack: 0/20).                                                                                                        
                                                                                                                                                            
[ebuild     U ~] app-backup/bareos-24.0.2-r1::gentoo [22.1.2-r1::gentoo] USE="acl ipv6 readline storage-daemon vim-syntax xattr -X -ceph -clientonly -direct
or -glusterfs -lmdb -logwatch -ndmp -scsi-crypto (-split-usr*) -static -systemd -tcpd -test -vmware" CPU_FLAGS_X86="-avx%" 0 KiB                            
                                                                                                                                                            
Total: 1 package (1 upgrade), Size of downloads: 0 KiB


# Result:

Entering /var/tmp/portage/app-backup/bareos-24.0.2-r1/work/bareos-Release-24.0.2/contrib/misc/chunk_check
Entering /var/tmp/portage/app-backup/bareos-24.0.2-r1/work/bareos-Release-24.0.2/contrib/misc/triggerjob
Entering /var/tmp/portage/app-backup/bareos-24.0.2-r1/work/bareos-Release-24.0.2/contrib/misc/reschedule_job_as_full
Entering /var/tmp/portage/app-backup/bareos-24.0.2-r1/work/bareos-Release-24.0.2/contrib/dir-plugins
Entering /var/tmp/portage/app-backup/bareos-24.0.2-r1/work/bareos-Release-24.0.2/systemtests
   SYSTEMTESTS_S3_USE_HTTPS: ON
-- POSTGRES_BIN_PATH is /usr/bin
-- RUN_SYSTEMTESTS_ON_INSTALLED_FILES="OFF"
-- Looking for binaries and paths...
CMake Error at systemtests/cmake/BareosSystemtestFunctions.cmake:122 (get_target_output_dir):
  Unknown CMake command "get_target_output_dir".
Call Stack (most recent call first):
  systemtests/cmake/BareosSystemtestFunctions.cmake:190 (find_compiled_binary_and_set_binary_name_to_test_variable_for)
  systemtests/CMakeLists.txt:181 (find_systemtests_binary_paths)


-- Configuring incomplete, errors occurred!
 * ERROR: app-backup/bareos-24.0.2-r1::gentoo failed (configure phase):
 *   cmake failed
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_configure
 *   environment, line 2359:  Called cmake_src_configure
 *   environment, line 1353:  Called die
 * The specific snippet of code:
 *       "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
 * 
 * If you need support, post the output of `emerge --info '=app-backup/bareos-24.0.2-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-backup/bareos-24.0.2-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-backup/bareos-24.0.2-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-backup/bareos-24.0.2-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/app-backup/bareos-24.0.2-r1/work/bareos-Release-24.0.2_build'
 * S: '/var/tmp/portage/app-backup/bareos-24.0.2-r1/work/bareos-Release-24.0.2'

# Solution:
/tmp/Bareos ❯ cat /etc/portage/patches/app-backup/bareos-24.0.2-r1/patch1.patch                                              

diff -ur a/systemtests/CMakeLists.txt b/systemtests/CMakeLists.txt
--- a/systemtests/CMakeLists.txt        2025-03-27 10:03:40.000000000 +0100
+++ b/systemtests/CMakeLists.txt        2025-05-05 10:35:08.138512933 +0200
@@ -85,6 +85,7 @@
 endif()
 
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+include(BareosTargetTools)
 include(BareosSystemtestFunctions)
 
 # ps is required for systemtests
Comment 1 Jan Sielemann 2025-05-05 08:57:19 UTC
Created attachment 927696 [details, diff]
Patch

Create the patchfile at the following location:
/etc/portage/patches/app-backup/bareos-24.0.2-r1/patch1.patch
Comment 2 Jan Sielemann 2025-05-05 08:59:32 UTC
Bug can be closed, if nobody has something to add...
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-05-05 09:01:39 UTC
We generally keep the bug open so the patch can be applied, unless it's something obviously local to the user that nobody can reproduce & they found a workaround.