Compare commits

..

10 Commits

Author SHA1 Message Date
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
3 changed files with 139 additions and 29 deletions

View File

@@ -1,4 +1,3 @@
stages:
- build
- publish
@@ -13,7 +12,7 @@ build-bookworm:
only:
- tags
tags:
- bookworm
- docker-generic
image: debian-package-builder-bookworm:v1
script:
- tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian .
@@ -35,9 +34,9 @@ publish-bookworm:
only:
- tags
tags:
- bookworm
- docker-generic
image: debian-package-builder-trixie:v1
script:
- apt-get update && apt-get install -y curl
- 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-deb12_amd64.deb'
@@ -47,7 +46,7 @@ build-trixie:
only:
- tags
tags:
- bookworm
- docker-generic
image: debian-package-builder-trixie:v1
script:
- tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian .
@@ -69,9 +68,9 @@ publish-trixie:
only:
- tags
tags:
- bookworm
- docker-generic
image: debian-package-builder-trixie:v1
script:
- apt-get update && apt-get install -y curl
- 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-deb13_amd64.deb'
@@ -81,7 +80,7 @@ build-sid:
only:
- tags
tags:
- bookworm
- docker-generic
image: debian-package-builder-sid:v1
script:
- tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian .
@@ -103,19 +102,56 @@ publish-sid:
only:
- tags
tags:
- bookworm
- docker-generic
image: debian-package-builder-trixie:v1
script:
- apt-get update && apt-get install -y curl
- 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-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:
stage: build
needs: []
only:
- tags
tags:
- bookworm
- docker-generic
image: rockylinux-package-builder-9:v1
script:
- dnf install -y libpcap-devel
@@ -140,11 +176,11 @@ publish-rocky9:
only:
- tags
tags:
- bookworm
- docker-generic
image: debian-package-builder-trixie:v1
script:
- apt-get update && apt-get install -y curl
- 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:
stage: build
@@ -152,7 +188,7 @@ build-rocky8:
only:
- tags
tags:
- bookworm
- docker-generic
image: rockylinux-package-builder-8:v1
script:
- dnf install -y libpcap-devel
@@ -177,9 +213,9 @@ publish-rocky8:
only:
- tags
tags:
- bookworm
- docker-generic
image: debian-package-builder-trixie:v1
script:
- apt-get update && apt-get install -y curl
- 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'
@@ -189,7 +225,8 @@ build-pios12:
only:
- tags
tags:
- pios12
- docker-generic
image: pios-package-builder-bookworm:v1
script:
- tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian .
- apt-get update && apt-get install -y libpcap-dev
@@ -210,9 +247,9 @@ publish-pios12:
only:
- tags
tags:
- bookworm
- docker-generic
image: debian-package-builder-trixie:v1
script:
- apt-get update && apt-get install -y curl
- 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-piso12_armhf.deb'
@@ -222,7 +259,8 @@ build-pios12-64:
only:
- tags
tags:
- pios12-64
- docker-generic
image: pios-package-builder-bookworm:64-v1
script:
- tar -czf ../pcapmirror_$VERSION.orig.tar.gz --exclude=debian .
- apt-get update && apt-get install -y libpcap-dev
@@ -243,8 +281,77 @@ publish-pios12-64:
only:
- tags
tags:
- bookworm
- docker-generic
image: debian-package-builder-trixie:v1
script:
- apt-get update && apt-get install -y curl
- 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-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
# Compiler
CC = gcc
CC = cc
# Compiler flags
CFLAGS = -Wall -g
@@ -24,6 +24,9 @@ PREFIX = /usr
# Default rule
all: $(TARGET) man
static: $(OBJS)
$(CC) $(CFLAGS) -static $(OBJS) -o $(TARGET) $(LIBS) -ldbus-1 -lsystemd -lcap
# Create executable
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $(TARGET) $(LIBS)
@@ -37,12 +40,12 @@ man:
# Clean up object files and executable
clean:
rm -f -f $(OBJS) $(TARGET)
rm -f -f $(OBJS) $(TARGET) pcapmirror.8.gz
# Install the executable
install: $(TARGET)
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

View File

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