9 Commits

Author SHA1 Message Date
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
2 changed files with 134 additions and 24 deletions

View File

@@ -1,4 +1,3 @@
stages: stages:
- build - build
- publish - publish
@@ -13,7 +12,7 @@ build-bookworm:
only: only:
- tags - tags
tags: tags:
- bookworm - docker-generic
image: debian-package-builder-bookworm:v1 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 .
@@ -35,9 +34,9 @@ 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-deb12_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'
@@ -47,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 .
@@ -69,9 +68,9 @@ 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-deb13_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'
@@ -81,7 +80,7 @@ build-sid:
only: only:
- tags - tags
tags: tags:
- bookworm - docker-generic
image: debian-package-builder-sid:v1 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 .
@@ -103,19 +102,56 @@ 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-sid_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
needs: [] needs: []
only: only:
- tags - tags
tags: tags:
- bookworm - docker-generic
image: rockylinux-package-builder-9:v1 image: rockylinux-package-builder-9:v1
script: script:
- dnf install -y libpcap-devel - dnf install -y libpcap-devel
@@ -140,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
@@ -152,7 +188,7 @@ build-rocky8:
only: only:
- tags - tags
tags: tags:
- bookworm - docker-generic
image: rockylinux-package-builder-8:v1 image: rockylinux-package-builder-8:v1
script: script:
- dnf install -y libpcap-devel - dnf install -y libpcap-devel
@@ -177,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'
@@ -189,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
@@ -210,9 +247,9 @@ 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-piso12_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'
@@ -222,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
@@ -243,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-pios12_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

@@ -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,7 +40,7 @@ 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)