mirror of
https://git.freestone.net/cramer/pcapmirror.git
synced 2025-12-31 12:00:40 +01:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f63fbfb255 | |||
| 0f06c62949 | |||
| 255f9fef71 | |||
| a542f6ff7e | |||
| 255f1d0773 | |||
| ce6e5ec9a8 | |||
| 66b45a06f2 | |||
| 6ca07a3f6a | |||
| 316f792927 | |||
| 65f3e923c1 | |||
| 204b636727 | |||
| 3f58677aa0 | |||
| 5dd567ee20 | |||
| 626b379a54 | |||
| 4d25135e58 | |||
| 0d41857e52 |
17
.github/workflows/docker-ci.yml
vendored
Normal file
17
.github/workflows/docker-ci.yml
vendored
Normal 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 }}
|
||||||
|
|
||||||
193
.gitlab-ci.yml
193
.gitlab-ci.yml
@@ -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,45 @@ 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:
|
||||||
|
stage: build
|
||||||
|
needs: []
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
tags:
|
||||||
|
- docker-generic
|
||||||
|
image: debian-package-builder-trixie: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-trixie:
|
||||||
|
stage: publish
|
||||||
|
needs:
|
||||||
|
- build-trixie
|
||||||
|
dependencies:
|
||||||
|
- build-trixie
|
||||||
|
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-deb13_amd64.deb'
|
||||||
|
|
||||||
build-sid:
|
build-sid:
|
||||||
stage: build
|
stage: build
|
||||||
@@ -46,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
|
||||||
@@ -67,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
|
||||||
@@ -79,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}
|
||||||
@@ -103,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
|
||||||
@@ -115,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}
|
||||||
@@ -139,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'
|
||||||
|
|
||||||
@@ -151,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
|
||||||
@@ -172,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
|
||||||
@@ -184,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
|
||||||
@@ -205,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'
|
||||||
|
|
||||||
|
|||||||
9
Makefile
9
Makefile
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user