russkel / pcapplusplus_vendor

ROS2 package for Pcap++ library
1 stars 0 forks source link

Create a Debian package for the main PcapPlusPlus repo #1

Open seladb opened 2 years ago

seladb commented 2 years ago

Hi, PcapPlusPlus maintainer here! I really appreciate your work on creating this package. Unfortunately I don't know much about Debian packages. Would you consider creating a Debian package for the main repo?

russkel commented 2 years ago

Hello @seladb, thanks for your work on the project.

I usually make debian packages using CPack, which is a part of cmake. I noticed a while ago the work to move across to cmake wasn't adopted which makes this harder.

The debian package toolchain (which I have very little experience with) might rely on a standard autotools based compile/make install or cmake build/install.

Addressing the lack of cmake would make things quite a lot easier.

Russ

seladb commented 2 years ago

@russkel thank you for the quick answer!

CMake support for PcapPlusPlus is currently WIP, and hopefully will be ready soon. Until then - can you estimate how complex it is to create a Debian package for an existing release like the latest v21.11 release?

What is the process of creating such package? I'm sorry for all the questions, I'm not familiar with this domain...

russkel commented 2 years ago

CMake support for PcapPlusPlus is currently WIP, and hopefully will be ready soon.

Happy to hear this!

Until then - can you estimate how complex it is to create a Debian package for an existing release like the latest v21.11 release?

What is the process of creating such package? I'm sorry for all the questions, I'm not familiar with this domain...

I'd say an hour or two? I found this guide https://www.internalpointers.com/post/build-binary-deb-package-practical-guide which explains it quite clearly.

Out of interest, here is a commit to a project where I added CPack to an existing cmake file: https://github.com/russkel/moos-ivp/commit/087341a80697ff908ae7ad1847d54978097a163a#diff-40e74c54a7a7397363ff9cce40d52c47adb7cf6871d19e1a3e9de927a9a1c049

clementperon commented 2 years ago

Hi @seladb,

yes it's really easy with CPack to create a Deb packge, the only issue I see is to support the static libs that requires external dependency.

The actual build system pack all the "archive libs" together where CMake don't :(

russkel commented 2 years ago

Just as a FYI this repository is not a debian package, it is a "vendor package" for ROS2 so I could use the ROS2 dependency tools to install pcapplusplus.

seladb commented 2 years ago

@russkel thanks for the info! I read the guide you sent, it was really helpful! It seems pretty straightforward to create a Deb package for a PcapPlusPlus release. I'm not even sure we need CPack, we can write a simple python script that copies the relevant files, writes the control file and runs dpkg-deb to create the package (for amd64 which is the only architecture we currently support). We can put this script in PcapPlusPlus-Deploy which is the repo dedicated to creating PcapPlusPlus releases. Please let me know what you think.

@clementperon I'm not sure I understand what you mean by:

The actual build system pack all the "archive libs" together where CMake don't :(

Can you please elaborate?