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

packaging: Debian packaging is broken yet again #482

Closed
nekromant opened this issue Sep 22, 2016 · 15 comments · Fixed by #485
Closed

packaging: Debian packaging is broken yet again #482

nekromant opened this issue Sep 22, 2016 · 15 comments · Fixed by #485

Comments

@nekromant
Copy link
Contributor

nekromant commented Sep 22, 2016

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.

@xor-gate
Copy link
Member

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?

@xor-gate
Copy link
Member

  1. I agree. we need to use the install target of cmake.
  2. We building a package we should only build release.

@xor-gate
Copy link
Member

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.

@xor-gate
Copy link
Member

xor-gate commented Sep 22, 2016

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)

@xor-gate xor-gate added this to the v1.3.0 milestone Sep 22, 2016
@xor-gate xor-gate self-assigned this Sep 22, 2016
@nekromant
Copy link
Contributor Author

nekromant commented Sep 22, 2016

@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.

@xor-gate
Copy link
Member

@nekromant i'm @xor-gate :=) not @texane :D

@OsterlaD
Copy link
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.

@xor-gate
Copy link
Member

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

@OsterlaD
Copy link
Contributor

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

@nekromant
Copy link
Contributor Author

nekromant commented Sep 22, 2016

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

@OsterlaD
Copy link
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.

@xor-gate
Copy link
Member

xor-gate commented Oct 9, 2016

I think this is now completely resolved?

@nekromant
Copy link
Contributor Author

nekromant commented Oct 10, 2016

@xor-gate This is more like optional polishing. Postinst would be nice.
As for lib links, AFAIK I've done that already. @OsterlaD, are you planning to push it through to debian repositories?

@xor-gate
Copy link
Member

If you guys don't mind I will close this for now, as this topic was used mostly for discussion. When there specific are debian-related thinks need to be fixed we can open new issues. Thanks all for your effort!

@Nightwalker-87 Nightwalker-87 modified the milestones: v1.3.0, v1.6.1 Mar 17, 2020
@Nightwalker-87 Nightwalker-87 changed the title distribution: Debian packaging is broken yet again packaging: Debian packaging is broken yet again Mar 17, 2020
@Nightwalker-87 Nightwalker-87 linked a pull request Mar 17, 2020 that will close this issue
@Nightwalker-87 Nightwalker-87 modified the milestones: v1.6.1, v1.3.0 Mar 17, 2020
@Nightwalker-87 Nightwalker-87 linked a pull request Mar 17, 2020 that will close this issue
@Nightwalker-87
Copy link
Member

Finally closed by #485.

@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants