Bug 2381193

Summary: copyq: FTBFS with change proposal CMake drop non-standard variables
Product: [Fedora] Fedora Reporter: Cristian Le <fedora>
Component: copyqAssignee: Gerald Cox <gbcox>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: gbcox, kde-sig, lholecek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-07-17 11:05:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2376113    

Description Cristian Le 2025-07-16 15:38:41 UTC
Dear package maintainer,

This is an automated bug created due to a FTBFS when rebuilding this package for the change proposal CMake drop non-standard variables.

The rebuild is being tracked in https://copr.fedorainfracloud.org/coprs/lecris/cmake-drop_vars/package/copyq.

See https://fedoraproject.org/wiki/Changes/CMake_drop_install_vars for more information on how to make the package compatible.

Most likely the build failure is due to the project assuming the presence of `LIB_SUFFIX` as an input. You can provide
this variable as shown in the change proposal. If possible, please open an issue in upstream and ask them to use
`GNUInstallDirs` instead.

You can check the build locally following the instructions in the change proposal, or submit your build to the tracking
copr project.

Let me know if you encounter any issues, or need any other help.

Comment 1 Gerald Cox 2025-07-16 17:41:15 UTC
Lukas, are you going to handle all this upstream, i.e. GNUInstallDirs?

Comment 2 Lukas Holecek 2025-07-17 06:11:33 UTC
GNUInstallDirs is already used in CMakeLists.txt: https://github.com/hluk/CopyQ/blob/master/CMakeLists.txt#L28

    if (UNIX AND NOT APPLE)
        include(GNUInstallDirs)
        set(DATA_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}" CACHE PATH "Install path for data")
        set(PLUGIN_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/${CMAKE_SHARED_MODULE_PREFIX}/copyq/plugins" CACHE PATH "Install path for plugins")
        set(ICON_INSTALL_PREFIX "${DATA_INSTALL_PREFIX}/icons/hicolor/scalable/apps" CACHE PATH "Install path for icons")
        set(ICON_INSTALL_PREFIX_TEMPLATE "${DATA_INSTALL_PREFIX}/icons/hicolor/%SIZE%/apps" CACHE PATH "Install path for icons (%SIZE% is icon size)")
        set(THEME_INSTALL_PREFIX "${DATA_INSTALL_PREFIX}/copyq/themes" CACHE PATH "Install path for themes")
        set(DESKTOP_INSTALL_PREFIX "${DATA_INSTALL_PREFIX}/applications" CACHE PATH "Install path for desktop file")
        set(APPDATA_INSTALL_PREFIX "${DATA_INSTALL_PREFIX}/metainfo" CACHE PATH "Install path for AppData file")
        set(MANPAGE_INSTALL_PREFIX "${CMAKE_INSTALL_MANDIR}/man1" CACHE PATH "Install path for manual pages")
        set(TRANSLATION_INSTALL_PREFIX "${DATA_INSTALL_PREFIX}/copyq/translations" CACHE PATH "Install path for translations")
        set(BASH_COMPLETION_INSTALL_PREFIX "${DATA_INSTALL_PREFIX}/bash-completion/completions/" CACHE PATH "Install path for bash completions")
        set(ICON_NAME "copyq" CACHE STRING "Name for icon files")
        set(COPYQ_AUTOSTART_COMMAND "" CACHE STRING "Autostart command")
        OPTION(COPYQ_AUTOSTART "Enable autostart option" ON)
    endif()

Any ideas how to update it?

Where can I find the build failure? I found the latest failed build (https://copr.fedorainfracloud.org/coprs/lecris/cmake-drop_vars/build/9277131/), but I don't see the logs related to cmake.

Comment 3 Cristian Le 2025-07-17 10:27:22 UTC
The failure in the copr is because the patch is conditionalized resulting in different SRPMs depending on the version of the OS used. Please remove the `%if` conditional and instead use the following
```
Patch100:         rhbz-2357454.patch

%if 0%{?fedora} >= 43
%autosetup -p1 -n %{archivename} -m 100
%else
%autosetup -p1 -n %{archivename}
%endif 
```

(For sure there are cleaner ways to inline this, but I couldn't find a good reference)

PS: `%forgeautosetup` is also valid and will avoid having to define `%{archivename}`

I will reconstruct the srpm and submit the builds manually and re-confirm the status.

Comment 4 Cristian Le 2025-07-17 11:05:24 UTC
Ok, all rebuilds seems to work. But please fix the spec file.