Compare commits

...

14 Commits

Author SHA1 Message Date
f63fbfb255 try again 2025-10-31 21:57:32 +01:00
0f06c62949 x 2025-10-31 21:50:09 +01:00
255f9fef71 github action test to build package 2025-10-31 21:31:01 +01:00
a542f6ff7e Strip on install, change compiler to cc so no change on BSD is needed 2025-10-30 23:00:02 +01:00
255f1d0773 rocky10 and trixie-publish 2025-09-17 20:13:05 +02:00
ce6e5ec9a8 clean gzipped man 2025-08-26 13:47:14 +02:00
66b45a06f2 static does not work 2025-08-25 22:26:02 +02:00
6ca07a3f6a additional libraries 2025-08-25 22:22:15 +02:00
316f792927 static build 2025-08-25 22:17:20 +02:00
65f3e923c1 fix pios 2025-08-25 21:57:40 +02:00
204b636727 fix 2025-08-25 21:52:58 +02:00
3f58677aa0 ubuntu builds 2025-08-25 21:51:18 +02:00
5dd567ee20 generic docker build 2025-08-25 20:27:13 +02:00
626b379a54 build all with the sam runner, but different image 2025-08-25 20:03:46 +02:00
4 changed files with 165 additions and 34 deletions

17
.github/workflows/docker-ci.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
on: push
jobs:
build-debs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: singingwolfboy/build-dpkg-buster@v1
id: build
with:
args: --unsigned-source --unsigned-changes
- uses: actions/upload-artifact@v1
with:
name: ${{ steps.build.outputs.filename }}
path: ${{ steps.build.outputs.filename }}

View File

@@ -1,4 +1,3 @@
stages: stages:
- build - build
- publish - publish
@@ -13,7 +12,8 @@ build-bookworm:
only: only:
- tags - tags
tags: tags:
- bookworm - docker-generic
image: debian-package-builder-bookworm:v1
script: script:
- tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian . - tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian .
- apt-get update && apt-get install -y libpcap-dev - apt-get update && apt-get install -y libpcap-dev
@@ -34,11 +34,11 @@ publish-bookworm:
only: only:
- tags - tags
tags: tags:
- bookworm - docker-generic
image: debian-package-builder-trixie:v1
script: script:
- apt-get update && apt-get install -y curl
- ls -la build - ls -la build
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror_$VERSION-1_amd64.deb ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/bookworm/pcapmirror_$VERSION-1_amd64.deb' - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror_$VERSION-1_amd64.deb ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/bookworm/pcapmirror_$VERSION-deb12_amd64.deb'
build-trixie: build-trixie:
stage: build stage: build
@@ -46,7 +46,7 @@ build-trixie:
only: only:
- tags - tags
tags: tags:
- bookworm - docker-generic
image: debian-package-builder-trixie:v1 image: debian-package-builder-trixie:v1
script: script:
- tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian . - tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian .
@@ -68,11 +68,11 @@ publish-trixie:
only: only:
- tags - tags
tags: tags:
- bookworm - docker-generic
image: debian-package-builder-trixie:v1
script: script:
- apt-get update && apt-get install -y curl
- ls -la build - ls -la build
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror_$VERSION-1_amd64.deb ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/trixie/pcapmirror_$VERSION-1_amd64.deb' - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror_$VERSION-1_amd64.deb ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/trixie/pcapmirror_$VERSION-deb13_amd64.deb'
build-sid: build-sid:
stage: build stage: build
@@ -80,7 +80,8 @@ build-sid:
only: only:
- tags - tags
tags: tags:
- sid - docker-generic
image: debian-package-builder-sid:v1
script: script:
- tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian . - tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian .
- apt-get update && apt-get install -y libpcap-dev - apt-get update && apt-get install -y libpcap-dev
@@ -101,11 +102,48 @@ publish-sid:
only: only:
- tags - tags
tags: tags:
- bookworm - docker-generic
image: debian-package-builder-trixie:v1
script: script:
- apt-get update && apt-get install -y curl
- ls -la build - ls -la build
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror_$VERSION-1_amd64.deb ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/sid/pcapmirror_$VERSION-1_amd64.deb' - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror_$VERSION-1_amd64.deb ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/sid/pcapmirror_$VERSION-sid_amd64.deb'
build-rocky10:
stage: build
needs: []
only:
- tags
tags:
- docker-generic
image: rockylinux-package-builder-10:v1
script:
- dnf install -y libpcap-devel
- mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
- tar -czf /root/rpmbuild/SOURCES/pcapmirror-v${VERSION}.tar.gz --exclude=debian --exclude=.git .
- cp -r * /root/rpmbuild/BUILD
- rpmbuild -ba pcapmirror.spec
- mkdir -p build
- mv /root/rpmbuild/RPMS/x86_64/pcapmirror*.* build/
- mv /root/rpmbuild/SRPMS/pcapmirror*.* build/
artifacts:
paths:
- build
publish-rocky10:
stage: publish
needs:
- build-rocky10
dependencies:
- build-rocky10
only:
- tags
tags:
- docker-generic
image: debian-package-builder-trixie:v1
script:
- ls -la build
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror-$VERSION-*.el10.x86_64.rpm ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/rockylinux10/pcapmirror-$VERSION-1.el10.x86_64.rpm'
build-rocky9: build-rocky9:
stage: build stage: build
@@ -113,7 +151,8 @@ build-rocky9:
only: only:
- tags - tags
tags: tags:
- rocky9 - docker-generic
image: rockylinux-package-builder-9:v1
script: script:
- dnf install -y libpcap-devel - dnf install -y libpcap-devel
- mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} - mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
@@ -137,11 +176,11 @@ publish-rocky9:
only: only:
- tags - tags
tags: tags:
- bookworm - docker-generic
image: debian-package-builder-trixie:v1
script: script:
- apt-get update && apt-get install -y curl
- ls -la build - ls -la build
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror-$VERSION-*.el9.x86_64.rpm ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/rockylinux9/pcapmirror-$VERSION-1.el8.x86_64.rpm' - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror-$VERSION-*.el9.x86_64.rpm ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/rockylinux9/pcapmirror-$VERSION-1.el9.x86_64.rpm'
build-rocky8: build-rocky8:
stage: build stage: build
@@ -149,7 +188,8 @@ build-rocky8:
only: only:
- tags - tags
tags: tags:
- rocky8 - docker-generic
image: rockylinux-package-builder-8:v1
script: script:
- dnf install -y libpcap-devel - dnf install -y libpcap-devel
- mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} - mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
@@ -173,9 +213,9 @@ publish-rocky8:
only: only:
- tags - tags
tags: tags:
- bookworm - docker-generic
image: debian-package-builder-trixie:v1
script: script:
- apt-get update && apt-get install -y curl
- ls -la build - ls -la build
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror-$VERSION-*.el8.x86_64.rpm ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/rockylinux8/pcapmirror-$VERSION-1.el8.x86_64.rpm' - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror-$VERSION-*.el8.x86_64.rpm ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/rockylinux8/pcapmirror-$VERSION-1.el8.x86_64.rpm'
@@ -185,7 +225,8 @@ build-pios12:
only: only:
- tags - tags
tags: tags:
- pios12 - docker-generic
image: pios-package-builder-bookworm:v1
script: script:
- tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian . - tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian .
- apt-get update && apt-get install -y libpcap-dev - apt-get update && apt-get install -y libpcap-dev
@@ -206,11 +247,11 @@ publish-pios12:
only: only:
- tags - tags
tags: tags:
- bookworm - docker-generic
image: debian-package-builder-trixie:v1
script: script:
- apt-get update && apt-get install -y curl
- ls -la build - ls -la build
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror_$VERSION-1_armhf.deb ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/bookworm/pcapmirror_$VERSION-1_armhf.deb' - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror_$VERSION-1_armhf.deb ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/bookworm/pcapmirror_$VERSION-piso12_armhf.deb'
build-pios12-64: build-pios12-64:
stage: build stage: build
@@ -218,7 +259,8 @@ build-pios12-64:
only: only:
- tags - tags
tags: tags:
- pios12-64 - docker-generic
image: pios-package-builder-bookworm:64-v1
script: script:
- tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian . - tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian .
- apt-get update && apt-get install -y libpcap-dev - apt-get update && apt-get install -y libpcap-dev
@@ -239,8 +281,77 @@ publish-pios12-64:
only: only:
- tags - tags
tags: tags:
- bookworm - docker-generic
image: debian-package-builder-trixie:v1
script: script:
- apt-get update && apt-get install -y curl
- ls -la build - ls -la build
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror_$VERSION-1_arm64.deb ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/bookworm/pcapmirror_$VERSION-1_arm64.deb' - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror_$VERSION-1_arm64.deb ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/bookworm/pcapmirror_$VERSION-pios12_arm64.deb'
build-plucky:
stage: build
needs: []
only:
- tags
tags:
- docker-generic
image: ubuntu-package-builder-plucky:v1
script:
- tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian .
- apt-get update && apt-get install -y libpcap-dev
- dpkg-buildpackage -uc -us
- mkdir -p build
- mv ../pcapmirror*.* build/
artifacts:
paths:
- build
publish-plucky:
stage: publish
needs:
- build-plucky
dependencies:
- build-plucky
only:
- tags
tags:
- docker-generic
image: debian-package-builder-trixie:v1
script:
- ls -la build
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror_$VERSION-1_amd64.deb ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/trixie/pcapmirror_$VERSION-ubu25.04_amd64.deb'
build-noble:
stage: build
needs: []
only:
- tags
tags:
- docker-generic
image: ubuntu-package-builder-noble:v1
script:
- tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian .
- apt-get update && apt-get install -y libpcap-dev
- dpkg-buildpackage -uc -us
- mkdir -p build
- mv ../pcapmirror*.* build/
artifacts:
paths:
- build
publish-noble:
stage: publish
needs:
- build-noble
dependencies:
- build-noble
only:
- tags
tags:
- docker-generic
image: debian-package-builder-trixie:v1
script:
- ls -la build
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file build/pcapmirror_$VERSION-1_amd64.deb ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/pcapmirror/trixie/pcapmirror_$VERSION-ubu24.04_amd64.deb'

View File

@@ -1,7 +1,7 @@
# Makefile for pcapmirror # Makefile for pcapmirror
# Compiler # Compiler
CC = gcc CC = cc
# Compiler flags # Compiler flags
CFLAGS = -Wall -g CFLAGS = -Wall -g
@@ -24,6 +24,9 @@ PREFIX = /usr
# Default rule # Default rule
all: $(TARGET) man all: $(TARGET) man
static: $(OBJS)
$(CC) $(CFLAGS) -static $(OBJS) -o $(TARGET) $(LIBS) -ldbus-1 -lsystemd -lcap
# Create executable # Create executable
$(TARGET): $(OBJS) $(TARGET): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $(TARGET) $(LIBS) $(CC) $(CFLAGS) $(OBJS) -o $(TARGET) $(LIBS)
@@ -37,12 +40,12 @@ man:
# Clean up object files and executable # Clean up object files and executable
clean: clean:
rm -f -f $(OBJS) $(TARGET) rm -f -f $(OBJS) $(TARGET) pcapmirror.8.gz
# Install the executable # Install the executable
install: $(TARGET) install: $(TARGET)
mkdir -p $(DESTDIR)$(PREFIX)/bin mkdir -p $(DESTDIR)$(PREFIX)/bin
install -D $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET) install -s -D $(TARGET) $(DESTDIR)$(PREFIX)/bin/$(TARGET)
install -D $(TARGET).8 $(DESTDIR)$(PREFIX)/share/man/man8/$(TARGET).8 install -D $(TARGET).8 $(DESTDIR)$(PREFIX)/share/man/man8/$(TARGET).8

View File

@@ -54,10 +54,10 @@ On the original download location you will also find several prebuilt packages.
### Supported Operating Systems ### Supported Operating Systems
Source is tested to build and function on the following operating systems Source is tested to build and function on the following operating systems
* Debian Linux 12 + unstable (sid) * Debian Linux 12, 13 + unstable (sid)
* Rocky Linux 8 + 9 * Rocky Linux 8, 9, 10
* PiOS 12 (bookworm) * PiOS 12 (bookworm)
* OpenBSD 7.6 * OpenBSD 7.6, 7.7
* MacOS 15 * MacOS 15
Compile the program: Compile the program: