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

The "apkg build" breaks due pam.de/netopeer2.conf path issue #1626

Open
qupfer opened this issue Aug 14, 2024 · 2 comments
Open

The "apkg build" breaks due pam.de/netopeer2.conf path issue #1626

qupfer opened this issue Aug 14, 2024 · 2 comments
Labels
is:bug Bug description. status:completed From the developer perspective, the issue was solved (bug fixed, question answered,...)

Comments

@qupfer
Copy link
Contributor

qupfer commented Aug 14, 2024

Hi,
running "apkg build" fails on a alma9 system due some issues with the path of "pam.d/netopeer2.conf" file

    File not found: /home/build/netopeer2/pkg/build/pkgs/almalinux-9.4/netopeer2-2.2.28-1.el9/rpmbuild/BUILDROOT/netopeer2-2.2.28-1.el9.x86_64/etc/pam.d/netopeer2.conf

FYI: the file is found in ../usr/etc/pam.d/netopeer2.conf

I found to possible solutions:

  • fix the path in the SPEC-File (change it it in the %files section to %{_prefix}/%{_sysconfdir}/pam.d/netopeer2.conf )
    • but then the file is put to /usr/etc/pam.d :-(
  • fix it in the make file and replace
    • install(FILES "${CMAKE_SOURCE_DIR}/pam/netopeer2.conf" DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/pam.d")
    • to install(FILES "${CMAKE_SOURCE_DIR}/pam/netopeer2.conf" DESTINATION "${SYSCONF_INSTALL_DIR}/pam.d")

But not sure if that breaks other/more genral setups

@michalvasko
Copy link
Member

You can add a condition for your system and the correct definition of CMAKE_INSTALL_SYSCONFDIR when building the package, for example, right?

@michalvasko michalvasko added the is:bug Bug description. label Aug 14, 2024
@qupfer
Copy link
Contributor Author

qupfer commented Aug 14, 2024

Sure, but "I think" that if apkg config/preset is part of that project, it should "work" out of the box for default cases.
I don't understand, where "CMAKE_INSTALL_SYSCONFDIR" is (re)defined. cmake doku say, its set to "etc", which would be correct. Howether, it looks like its somewhere redefined to /usr/etc (or %{_prefix}/etc)

Edit: looks like its related with this: https://cmake.org/cmake/help/v3.26/module/GNUInstallDirs.html

However, add an absolut path to the spec file seems working. I can prepare an PR if wanted.

Edit: create an PR

@michalvasko michalvasko added the status:completed From the developer perspective, the issue was solved (bug fixed, question answered,...) label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Bug description. status:completed From the developer perspective, the issue was solved (bug fixed, question answered,...)
Projects
None yet
Development

No branches or pull requests

2 participants