Skip to content

Providing DEB #1831

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

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open

Providing DEB #1831

wants to merge 7 commits into from

Conversation

bhaskarbhar
Copy link

Added a new build-deb job to build a Debian package (.deb) for PcapPlusPlus on ubuntu-latest.

The job:

  • Checks out the source code.
  • Installs required dependencies (cmake, make, g++, libpcap-dev).
  • Builds and installs the project into a staged directory.
  • Creates a proper DEB control file using the release tag as version.
  • Builds the .deb package.

Issue: #1498

@bhaskarbhar bhaskarbhar requested a review from seladb as a code owner May 25, 2025 13:52
Copy link

codecov bot commented May 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.00%. Comparing base (a49a79e) to head (6820b0d).
Report is 15 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1831      +/-   ##
==========================================
- Coverage   83.08%   83.00%   -0.08%     
==========================================
  Files         284      284              
  Lines       48981    48877     -104     
  Branches    10324    10544     +220     
==========================================
- Hits        40695    40572     -123     
- Misses       7153     7163      +10     
- Partials     1133     1142       +9     
Flag Coverage Δ
alpine320 75.06% <ø> (+0.02%) ⬆️
fedora42 75.16% <ø> (+0.01%) ⬆️
macos-13 80.53% <ø> (-0.06%) ⬇️
macos-14 80.53% <ø> (-0.06%) ⬇️
macos-15 80.51% <ø> (-0.06%) ⬇️
mingw32 71.37% <ø> (+0.64%) ⬆️
mingw64 71.34% <ø> (+0.65%) ⬆️
npcap 85.02% <ø> (-0.06%) ⬇️
rhel94 74.93% <ø> (-0.01%) ⬇️
ubuntu2004 58.52% <ø> (-0.02%) ⬇️
ubuntu2004-zstd 58.66% <ø> (-0.01%) ⬇️
ubuntu2204 74.87% <ø> (+0.02%) ⬆️
ubuntu2204-icpx 61.53% <ø> (+0.03%) ⬆️
ubuntu2404 75.09% <ø> (-0.02%) ⬇️
ubuntu2404-arm64 75.08% <ø> (+<0.01%) ⬆️
unittest 83.00% <ø> (-0.08%) ⬇️
windows-2019 85.04% <ø> (-0.06%) ⬇️
windows-2022 85.06% <ø> (-0.06%) ⬇️
winpcap 85.20% <ø> (-0.05%) ⬇️
xdp 50.51% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines 421 to 422
apt-get update
apt-get install -y --no-install-recommends cmake make g++ libpcap-dev
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step fails because we don't run it as sudo, which made me notice that this runs directly on the GitHub runner VM. Why not run it inside one of our containers like seladb/ubuntu2404? This image should already have these dependencies pre-installed

cd "${{ env.BUILD_DIR }}"
cmake ..
make -j$(nproc)
make install DESTDIR=$PWD/install-root
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of installing PcapPlusPlus here, maybe we can build the deb file, install it, and add another step to test that it works?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking into it

Version: ${{ github.event.release.tag_name }}
Section: libs
Architecture: amd64
Maintainer: Bhaskar Bhar <[email protected]>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add [email protected] as a maintainer?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sir

Comment on lines 450 to 456
- name: Upload DEB to release
uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # v1.16.0
with:
draft: true
allowUpdates: true
updateOnlyUnreleased: true
artifacts: "${{ env.BUILD_DIR }}/pcapplusplus_${{ github.event.release.tag_name }}_amd64.deb"
Copy link
Collaborator

@Dimi1010 Dimi1010 May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not have an if clause? The rest of the package CI's have the upload steps under if: github.ref_type == 'tag' clause?

@bhaskarbhar
Copy link
Author

bhaskarbhar commented May 28, 2025

@seladb @Dimi1010 Extremely sorry. Looks like my code has flaws in it. As I am a beginner in open source, I am making many mistakes. I will, for sure resolve the issues and also work on your suggestions.

@Dimi1010
Copy link
Collaborator

@bhaskarbhar No worries about the flaws. That is why the reviews are for. Ty for the effort. :)

@seladb
Copy link
Owner

seladb commented May 30, 2025

@bhaskarbhar why did you close the PR? 🤔

@bhaskarbhar bhaskarbhar reopened this May 30, 2025
@bhaskarbhar
Copy link
Author

bhaskarbhar commented May 30, 2025

@bhaskarbhar why did you close the PR? 🤔

As there were many flaws I thought to go through the package.yml and correct it rather than commiting everytime. Wanted to do a fresh PR with no flaws

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants