• dh-cmake writing to /usr instead of fakeroot?

    From Elliana May@21:1/5 to All on Mon Feb 19 06:10:02 2024
    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?).

    You can see a failure here: https://launchpadlibrarian.net/714820377/buildlog_ubuntu-jammy-arm64.duckdb_0.10.0_BUILDING.txt.gz

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

    Many thanks,
    Elliana

    <div dir="ltr"><div>Hey folks,</div><div><br></div><div>I&#39;m currently trying to package DuckDB for a PPA on launchpad, and though I&#39;ve been able to get it building via buildsystem=cmake+ninja, the install steps fail with permission errors
    regardless of what I try.</div><div>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?).</div><div><br></div><div>You can see a failure here: 
    <a href="https://launchpadlibrarian.net/714820377/buildlog_ubuntu-jammy-arm64.duckdb_0.10.0_BUILDING.txt.gz">https://launchpadlibrarian.net/714820377/buildlog_ubuntu-jammy-arm64.duckdb_0.10.0_BUILDING.txt.gz</a></div><div><br></div><div>I haven&#39;t
    done any packaging like this before, so any help is very appreciated</div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Many thanks,</div>Elliana<br></div></div></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sune Vuorela@21:1/5 to Elliana May on Mon Feb 19 08:50:01 2024
    On 2024-02-19, Elliana May <me@mause.me> wrote:
    You can see a failure here: https://launchpadlibrarian.net/714820377/buildlog_ubuntu-jammy-arm64.duckdb_0.10.0_BUILDING.txt.gz

    That build log is pointing to a missing debhelper build-dependency.

    /Sune

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Elliana May@21:1/5 to All on Mon Feb 19 09:50:01 2024
    Sorry, I have a few tabs open, this is the correct one:

    https://launchpadlibrarian.net/715071071/buildlog_ubuntu-jammy-amd64.duckdb_0.10.0-10_BUILDING.txt.gz

    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

    <div dir="ltr"><div>Sorry, I have a few tabs open, this is the correct one:</div><div><br></div><div><a href="https://launchpadlibrarian.net/715071071/buildlog_ubuntu-jammy-amd64.duckdb_0.10.0-10_BUILDING.txt.gz">https://launchpadlibrarian.net/715071071/
    buildlog_ubuntu-jammy-amd64.duckdb_0.10.0-10_BUILDING.txt.gz</a><br></div><div><br></div><div>I&#39;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: </div><div><br></
    <div>[2/3] Install the project...<br>-- Install configuration: &quot;Release&quot;<br>CMake Error at cmake_install.cmake:66 (file):<br>  file cannot create directory: /usr/local/lib/cmake/DuckDB.  Maybe need<br>  administrative privileges.<br></
    <br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Many thanks,</div>Elliana<br></div></div></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Niels Thykier@21:1/5 to All on Mon Feb 19 10:30:01 2024
    Elliana May:
    Sorry, I have a few tabs open, this is the correct one:

    https://launchpadlibrarian.net/715071071/buildlog_ubuntu-jammy-amd64.duckdb_0.10.0-10_BUILDING.txt.gz

    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


    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Elliana May@21:1/5 to All on Mon Feb 19 12:00:01 2024
    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

    <div dir="ltr">This did the trick, thank you!<div><br></div><div>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</div><
    <br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Many thanks,</div>Elliana<br></div></div></div></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)