-
Notifications
You must be signed in to change notification settings - Fork 715
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
base: dev
Are you sure you want to change the base?
Providing DEB #1831
Changes from 2 commits
dc82f1d
1804ff2
7e4dcf9
e883d53
6820b0d
c2b3430
4481ae0
3114a34
5a53470
0f82bd7
b11297d
75225a4
356d6bc
3b6c2b3
38b3732
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -403,3 +403,54 @@ jobs: | |
allowUpdates: true | ||
updateOnlyUnreleased: true | ||
artifacts: "${{ env.PACKAGE_DIR }}.tar.gz" | ||
|
||
build-deb: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
attestations: write | ||
id-token: write | ||
env: | ||
BUILD_DIR: Dist | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
apt-get update | ||
apt-get install -y --no-install-recommends cmake make g++ libpcap-dev | ||
|
||
- name: Build project | ||
run: | | ||
mkdir -p "${{ env.BUILD_DIR }}" | ||
cd "${{ env.BUILD_DIR }}" | ||
cmake .. | ||
make -j$(nproc) | ||
make install DESTDIR=$PWD/install-root | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of installing PcapPlusPlus here, maybe we can build the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking into it |
||
|
||
- name: Create DEB control file | ||
run: | | ||
cd "${{ env.BUILD_DIR }}/install-root" | ||
mkdir -p DEBIAN | ||
cat <<EOF > DEBIAN/control | ||
Package: pcapplusplus | ||
Version: ${{ github.event.release.tag_name }} | ||
Section: libs | ||
Architecture: amd64 | ||
Maintainer: Bhaskar Bhar <bhaskarbhar007@yahoo.com> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes sir |
||
Description: PcapPlusPlus - C++ library for packet parsing and crafting | ||
EOF | ||
|
||
- name: Build DEB package | ||
run: | | ||
cd "${{ env.BUILD_DIR }}" | ||
dpkg-deb --build install-root pcapplusplus_${{ github.event.release.tag_name }}_amd64.deb | ||
|
||
- 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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this not have an |
There was a problem hiding this comment.
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 likeseladb/ubuntu2404
? This image should already have these dependencies pre-installed