Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

dh-cmake writing to /usr instead of fakeroot?

0 views
Skip to first unread message

Elliana May

unread,
Feb 19, 2024, 12:10:04 AMFeb 19
to
Hey folks,

I'm currently trying to package DuckDB for a PPA on launchpad, and though I've been able to get it building via buildsystem=cmake+ninja, the install steps fail with permission errors regardless of what I try.
Right now, it seems to try to install to /usr regardless of what settings I pass, and Launchpad seems to leave CMAKE_INSTALL_PREFIX set to /usr (as does fakeroot?).


I haven't done any packaging like this before, so any help is very appreciated

Many thanks,
Elliana

Sune Vuorela

unread,
Feb 19, 2024, 2:50:03 AMFeb 19
to
That build log is pointing to a missing debhelper build-dependency.

/Sune

Elliana May

unread,
Feb 19, 2024, 3:50:05 AMFeb 19
to
Sorry, I have a few tabs open, this is the correct one:


I've tried now overriding the override_dh_auto_configure rule in the debian/rules file, but even that seems to not be making a difference: 

[2/3] Install the project...
-- Install configuration: "Release"
CMake Error at cmake_install.cmake:66 (file):
  file cannot create directory: /usr/local/lib/cmake/DuckDB.  Maybe need
  administrative privileges.

Many thanks,
Elliana

Niels Thykier

unread,
Feb 19, 2024, 4:30:04 AMFeb 19
to
Elliana May:
The upstream code seems to be installing during the "build"
(dh_auto_build), whereas the Debian tooling expects this to happen in a
separate "install" step (dh_auto_install). This may be related since
dh_auto_build does not set any form of dest-dir but dh_auto_install does.

Consider it a possible hint for what to look for. That is what I can
give you from the 5 minutes I had to look at this.

Best regards,
Niels

Elliana May

unread,
Feb 19, 2024, 6:00:04 AMFeb 19
to
This did the trick, thank you!

Turns out using ExternalProject_Add in a CMakeLists.txt to build the binaries defaulted to running the installation as part of the build stage, which is obviously not what I wanted

Many thanks,
Elliana
0 new messages