Skip to content

packaging: Debian packaging is broken yet again #482

Closed

Description

@nekromant

Current debian install rules to not take care to install the correct version.h that pretty much make the whole -dev package unusable.

@texane Just to remember, I'll try to dive and fix it when I have a spare minute.

Activity

  1. xor-gate commented on Sep 22, 2016

    @xor-gate
    Contributor

    I quote:

    Do we really need to duplicate all the file installation rules in debian/rules? I suggest we do as much of the installation as possible with CMakeLists.txt, so that debian/rules would do as much as possible automatically.

    Is there any rationale for building both debug and release builds of stlink when packaging?

  2. xor-gate commented on Sep 22, 2016

    @xor-gate
    Contributor
    1. I agree. we need to use the install target of cmake.
    2. We building a package we should only build release.
  3. xor-gate commented on Sep 22, 2016

    @xor-gate
    Contributor

    Use of cmake install would be better in terms of maintenance.

    I am not sure how to tell cmake where to install
    adapt debian/*.install files to copy from cmake install dir, instead of from debian/tmp
    or you can manage to install to debain/tmp with cmake
    cmake should handle multiarch library paths
    Just that tests depends on debug build. The build stage calls make all and all depends on release. The tests stage calls make test and test depends on debug. This is why both where build. I think automated tests where a good thing and should run, but you can disable it by add override_dh_auto_tests: to debian/rules, if you want.

  4. xor-gate commented on Sep 22, 2016

    @xor-gate
    Contributor

    You can tell cmake to install into DESTDIR with make install. See https://cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_PREFIX.html (stackoverflow question)

  5. added this to the v1.3.0 milestone on Sep 22, 2016
  6. self-assigned this
    on Sep 22, 2016
  7. nekromant commented on Sep 22, 2016

    @nekromant
    ContributorAuthor

    @OsterlaD As @texane noted, you can just add DESTDIR= make install. In debian rules you don't have to mention this, as default debian stuff gets the job done already. Basically:

    override_dh_auto_configure:
            dh_auto_configure -- \
            -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
    

    Is the only thing required and the only thing that I keep around my cmake-based projects. dpkg does the rest automatically.

    @texane For my projects (See http://github.com/nekromant/aura) I add tests for production builds as well, but only those that don't require hardware connected by default. They are just not installed during the 'make install' phase. If dpkg-buildpackage won't find any tests it just won't run any, and since we have a CI I really think we can safely skip tests for packaging.

  8. xor-gate commented on Sep 22, 2016

    @xor-gate
    Contributor
  9. OsterlaD commented on Sep 22, 2016

    @OsterlaD
    Contributor

    I thought about this way too.
    dh_auto_build will call make all, which calls cmake at its own.
    This is why dh_auto_configure has no effect.
    So I removed code from dh_auto_configure.
    There is no make install.

  10. xor-gate commented on Sep 22, 2016

    @xor-gate
    Contributor

    We could add make install to the toplevel Makefile which just calls make install in the release build

  11. OsterlaD commented on Sep 22, 2016

    @OsterlaD
    Contributor

    Sounds good. Maybe I have some time to try it later on.

  12. nekromant commented on Sep 22, 2016

    @nekromant
    ContributorAuthor

    @xor-gate I'll give it a proper try tomorrow. And sorry for the typo. Tough day.

  13. OsterlaD commented on Sep 22, 2016

    @OsterlaD
    Contributor

    #484 use of make install

    Lintian has some suggestions

    • rename package to libstlink1, but that conflicts cmake libstlink look-up
    • move lib links to dev pkg

    I would like to add a postinst script to libstlink to reload udev rules.

  14. xor-gate commented on Oct 9, 2016

    @xor-gate
    Contributor

    I think this is now completely resolved?

  15. 13 remaining items

  16. changed the title [-]distribution: Debian packaging is broken yet again[/-] [+]packaging: Debian packaging is broken yet again[/+] on Mar 17, 2020
  17. linked a pull request that will close this issuefix-482 #484on Mar 17, 2020
  18. modified the milestones: v1.6.1, v1.3.0 on Mar 17, 2020
  19. linked a pull request that will close this issuepackaging: Fix debian packaging #485on Mar 17, 2020
  20. Nightwalker-87 commented on Mar 17, 2020

    @Nightwalker-87
    Member

    Finally closed by #485.

  21. locked as resolved and limited conversation to collaborators on Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions