Commit Graph

38 Commits

Author SHA1 Message Date
63c91175a2 release: version 1.1.12 - Architecture violations and test fixes
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 09:26:49 +01:00
bd45344d19 v1.1.11: Fix exclude_source_ips config loading and debug logging
Major fixes:
- Add exclude_source_ips to mergeConfigs() - config file values now properly loaded
- Add validation for exclude_source_ips (IP/CIDR format validation)
- Remove JA4SENTINEL_LOG_LEVEL env var from systemd service
- Config file log_level now respected without env override

Debug logging improvements:
- Log IP filter entries at startup (debug mode)
- Track filtered packet count with atomic counter
- Display filter statistics at shutdown via GetFilterStats()
- New debug logs in tlsparse component

Testing:
- Add 6 new unit tests for exclude_source_ips and log_level config loading
- Test mergeConfigs() behavior with empty/override values
- Test validation of invalid IPs and CIDR ranges

Documentation:
- Update architecture.yml with ipfilter module
- Document config loading priority and notes
- Update api.Config fields (LocalIPs, ExcludeSourceIPs, LogLevel)

Files changed:
- internal/config/loader.go (merge, validation, helpers)
- internal/config/loader_test.go (6 new tests)
- internal/tlsparse/parser.go (GetFilterStats, counter)
- cmd/ja4sentinel/main.go (debug logging)
- packaging/systemd/ja4sentinel.service (remove env var)
- architecture.yml (ipfilter module, config_loading section)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-04 15:55:00 +01:00
952701d4da release: version 1.1.9 - Source IP exclusion feature
FEATURE:
- Add exclude_source_ips configuration option
- Support single IPs and CIDR ranges (IPv4/IPv6)
- Filter packets before TLS processing
- New ipfilter package with unit tests
- Log exclusion configuration at startup

Packaging:
- Update RPM spec to version 1.1.9
- Update changelog with feature details

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-04 12:02:00 +01:00
bf93ee6c4a release: version 1.1.8 - Critical parser crash fix
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
CRITICAL FIX:
- Resolve crash in TLS parser with nil decode context
- Use gopacket.NewPacket with LinkTypeIPv4/IPv6
- Fixes panic: runtime error: invalid memory address or nil pointer dereference
- Properly handles raw IP packets after SLL header stripping

Packaging:
- Update RPM spec to version 1.1.8
- Update changelog with crash fix details

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-04 11:35:24 +01:00
49b8bfbf60 fix: restore full RPM changelog
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Restore all changelog entries from versions 1.0.0 to 1.1.7
- Keep single %changelog section (no duplicates)
- Preserves complete package history

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-04 11:16:00 +01:00
98a51eeb69 fix: remove duplicate %changelog in RPM spec
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Remove old %changelog section (lines 124-180)
- Keep consolidated %changelog with recent versions only
- Fixes rpmbuild error: 'line 181: second %changelog'

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-04 11:12:51 +01:00
4b072057e8 release: version 1.1.7 - Improve error logging
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Fix:
- Enhance error messages with src_ip, src_port, dst_ip, dst_port
- Add conn_id and payload_len to fingerprint errors
- Easier debugging of truncated ClientHello payloads

Packaging:
- Update RPM spec to version 1.1.7
- Update changelog with logging improvements

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-04 11:09:54 +01:00
027730b360 release: version 1.1.6 - Add local IP filtering and SLL support
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Features:
- Add local_ips configuration option for filtering traffic to local machine
- Auto-detection of local IP addresses (excludes loopback 127.x.x.x, ::1)
- Support interface 'any' for capturing on all network interfaces
- Add Linux SLL (cooked capture) support for interface 'any'
- Generate BPF filter with 'dst host' for local IP filtering
- Add LinkType field to RawPacket for proper packet parsing

Testing:
- Add unit tests for local IP detection (detectLocalIPs, extractIP)
- Add unit tests for SLL packet parsing (IPv4 and IPv6)
- Update capture tests for new packetToRawPacket method

Configuration:
- Update config.yml.example with local_ips documentation
- Update RPM spec to version 1.1.6 with changelog

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-04 11:02:53 +01:00
96372e6181 release: version 1.1.5 - Fix UNIX socket type (unixgram)
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Bugfix:
- Use unixgram (DGRAM) instead of unix (STREAM) for socket output
- Fixes "protocol wrong type for socket" error
- DGRAM sockets are connectionless, better suited for log shipping

Packaging:
- Update RPM spec to version 1.1.5
- Update changelog

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 00:05:14 +01:00
190ee5c964 release: version 1.1.4 - Add error callback for file output
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Features:
- Add error callback for file output writer
- File write errors (permission, disk space, rotation) now logged
- Same error reporting mechanism as UNIX socket writer

Packaging:
- Update RPM spec to version 1.1.4
- Update changelog

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 00:02:27 +01:00
babf254215 release: version 1.1.3 - Fix UNIX socket error reporting
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Bugfix:
- Add error callback for UNIX socket connection errors in main.go
- Connection failures now logged via appLogger.Error
- Helps diagnose missing socket or permission issues

Packaging:
- Update RPM spec to version 1.1.3
- Update changelog with fix details

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 23:57:12 +01:00
23f3012fb1 release: version 1.1.2 - Add error callback mechanism and comprehensive test suite
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Features:
- Add ErrorCallback type for UNIX socket connection error reporting
- Add WithErrorCallback option for UnixSocketWriter configuration
- Add BuilderImpl.WithErrorCallback() for propagating callbacks
- Add consecutive failure tracking in processQueue

Testing (50+ new tests):
- Add integration tests for full pipeline (capture → tlsparse → fingerprint → output)
- Add tests for FileWriter.rotate() and Reopen() log rotation
- Add tests for cleanupExpiredFlows() and cleanupLoop() in TLS parser
- Add tests for extractSNIFromPayload() and extractJA4Hash() helpers
- Add tests for config load error paths (invalid YAML, permission denied)
- Add tests for capture.Run() error conditions
- Add tests for signal handling documentation

Documentation:
- Update architecture.yml with new fields (LogLevel, TLSClientHello extensions)
- Update architecture.yml with Close() methods for Capture and Parser interfaces
- Update RPM spec changelog

Cleanup:
- Remove empty internal/api/ directory

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 23:24:56 +01:00
6e5addd6d4 Change default output to Unix socket
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- config.yml.example: Unix socket enabled by default, stdout commented out
- internal/output/writers.go: Remove all internal logging from UnixSocketWriter
  and FileWriter - only LogRecord JSON data is sent to outputs
- architecture.yml: Update description to mention 'socket UNIX par défaut'
- packaging/rpm/ja4sentinel.spec: Bump version to 1.1.1, update changelog

Diagnostic logs (error, debug, warning) now only go to stdout when enabled.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 21:19:57 +01:00
52c9f2f6f4 feat: add logrotate support with SIGHUP signal handling
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Add Reopenable interface in api/types.go for log rotation support
- Add FileWriter.Reopen() method to reopen log files after rotation
- Add MultiWriter.Reopen() method to propagate rotation to all writers
- Update main.go to handle SIGHUP signal for systemctl reload
- Add logrotate configuration file (packaging/logrotate/ja4sentinel)
- Update systemd service with ExecReload for graceful rotation
- Update architecture.yml with logrotate documentation
- Update RPM spec and Dockerfile.package to include logrotate files
- Bump version to 1.1.0

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 20:50:47 +01:00
965720a183 release: version 1.0.9 - Add SNI, ALPN, TLS version extraction and architecture.yml compliance
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
New features:
- Extract SNI (Server Name Indication) from TLS ClientHello
- Extract ALPN (Application-Layer Protocol Negotiation) protocols
- Detect TLS version from ClientHello using tlsfingerprint library
- Add ConnID field for TCP flow correlation
- Add SensorID field for multi-sensor deployments
- Add SynToCHMs timing field for behavioral detection
- Add AsyncBuffer configuration for output queue sizing

Architecture changes:
- Remove JA4Hash from LogRecord (JA4 format includes its own hash portions)
- Update api.TLSClientHello with new TLS metadata fields
- Update api.LogRecord with correlation, TLS, and timing fields
- Ensure 100% compliance with architecture.yml specification

Tests:
- Add unit tests for TLS extension extraction (SNI, ALPN, Version)
- Update tests for new LogRecord schema without JA4Hash
- Add tests for AsyncBuffer configuration

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 19:32:16 +01:00
fd162982d9 v1.0.8: Add configurable log level and immediate service stop
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Add log_level config option (debug, info, warn, error)
- Add JA4SENTINEL_LOG_LEVEL environment variable support
- Set TimeoutStopSec=2 for immediate stop on restart/stop
- Consolidate config files into single example (config.yml.example)
- Update RPM changelog

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 02:51:11 +01:00
d89c90dc03 release: version 1.0.7
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 02:28:00 +01:00
f0276b17ab release: version 1.0.6
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 01:49:43 +01:00
40c3fad90e fix: unix socket path to /var/run/logcorrelator/network.sock
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 01:44:55 +01:00
a69de782cb release: version 1.0.5 - fix TCP options detection (NOP/EOL/SACK)
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 01:27:27 +01:00
a3f5d9a50c fix(rpm): move version macro definition before Version field
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
The %{spec_version} macro was being referenced in the Version field
before it was defined, causing RPM packages to show literal '%{spec_version}'
instead of the actual version number.

Moving the macro definition to the top of the spec file ensures it's
expanded correctly during rpmbuild.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 01:15:24 +01:00
a4b691c0b3 release: version 1.0.4
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Bump version from 1.0.2 to 1.0.4
- Add changelog entry for sdnotify integration
- Author: Jacquin Antoine <rpm@arkel.fr>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 01:08:28 +01:00
dcd6bd0a94 feat: add systemd sdnotify support (ready, watchdog, stopping)
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Add github.com/coreos/go-systemd/v22/daemon dependency
- Signal SdNotifyReady after configuration is loaded
- Start watchdog goroutine that pings systemd every WatchdogSec/2
- Signal SdNotifyStopping during graceful shutdown
- Update systemd unit file:
  - Type=notify (instead of simple)
  - WatchdogSec=30 (auto-restart if service hangs)
  - NotifyAccess=main (only main process can notify)

Benefits:
- systemd knows when service is truly ready
- Automatic detection of hung/frozen service
- Better integration with systemd supervision
- More accurate service status reporting

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 01:06:20 +01:00
78c9102602 fix(packaging): use version from spec file for RPM builds
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Update Makefile to extract PKG_VERSION from spec file
  Reads '%define spec_version 1.0.2' as default version
- Update spec file with proper version macro logic
  Version field now uses %{spec_version}
  Supports override via --define 'build_version X.Y.Z'
  Falls back to 1.0.2 when build_version is not defined

This ensures RPM packages are built with the correct version
defined in the spec file (1.0.2) instead of hardcoded 1.0.0.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 00:38:21 +01:00
1bf0f46ce5 chore: remove unused files and code
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Delete obsolete RPM maintainer scripts (postinst, prerm, postrm)
  Scripts are now embedded in ja4sentinel.spec
- Delete unused RPM test script (test-rpm.sh)
  Referenced non-existent el7 builds, not integrated in CI
- Remove unused constants and functions from api/types.go:
  - DefaultInterface, DefaultPort, DefaultBPFFilter
  - DefaultFlowTimeout, DefaultPacketBuffer
  - LogLevelDebug, LogLevelInfo, LogLevelWarn, LogLevelError
  - DefaultConfig() function
- Update Makefile with RPM_DIR variable for consistency

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 00:26:48 +01:00
b137b3df85 fix(packaging): run service as root for packet capture
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Change systemd service to run as root instead of ja4sentinel user
- Remove user/group creation from RPM spec (%pre script)
- Update %post to set root:root ownership on directories
- Adjust security hardening for root execution (ProtectSystem=strict)
- Add ReadWritePaths for writable directories

Fixes: systemd error 'Failed at step USER spawning /usr/bin/ja4sentinel: No such process'

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 00:14:23 +01:00
0eff3a77c1 refactor(packaging): migrate from fpm to rpmbuild for RPM packaging
- Replace fpm with native rpmbuild in Dockerfile.package
- Setup proper rpmbuild directory structure (BUILD, RPMS, SOURCES, SPECS)
- Make spec file version dynamic via %{?build_version} macro
- Improve %post script with better systemd detection and error handling
- RPM now correctly uses VERSION build argument

Builds RPM packages for el8, el9, and el10 distributions.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 00:12:44 +01:00
64fc0db1d9 release: mise à jour spec RPM version 1.0.2
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Version: 1.0.1 → 1.0.2
- libpcap >= 1.9.0 (suppression support CentOS 7)
- Mise à jour du changelog RPM
- Description mise à jour (Rocky/Alma/RHEL 8+)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-28 21:29:52 +01:00
d14d6d6bf0 chore: bump version to 1.0.1 with changelog updates
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Update RPM spec version from 1.0.0 to 1.0.1
- Add comprehensive changelog entries for v1.0.1:
  - Configurable packet channel buffer size
  - Timestamp field in LogRecord
  - Race condition fix in packet capture
  - Strengthened TLS limits and socket timeouts
  - Improved configuration validation
  - Systemd service file inclusion in RPMs
  - Unified Docker-based packaging
  - Added unit tests and Godoc documentation

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-28 20:10:56 +01:00
0be3ea9220 refactor: packaging RPM uniquement avec builder Rocky Linux 9
Some checks failed
Build RPM Package / Build RPM Packages (CentOS 7, Rocky 8/9/10) (push) Has been cancelled
- Suppression complète du support DEB (Debian/Ubuntu)
- Builder Rocky Linux 9 pour compatibilité binaire maximale
- Compilation dynamique avec libpcap comme dépendance runtime
- Activation du dépôt CRB pour libpcap-devel
- RPM générés pour el7, el8, el9, el10
- Mise à jour documentation et workflows GitHub Actions

Fix: erreur 'libpcap.so.0.8: cannot open shared object file' sur Rocky Linux 9

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-28 18:15:46 +01:00
86649b1630 feat: generate RPM packages for CentOS 7, Rocky Linux 8/9/10
Some checks failed
Build RPM Package / Build RPM Package (Rocky Linux) (push) Has been cancelled
Build DEB Package / Build DEB Package (Debian/Ubuntu) (push) Has been cancelled
- Update Dockerfile.package to build RPMs for multiple distributions
  using a unified fpm-based approach
- Add RPM maintainer scripts (postinst, prerm, postrm) for proper
  installation and service management
- Update ja4sentinel.spec for CentOS 7+ compatibility
- Add packaging/systemd/config.yml as default configuration
- Update test-rpm.sh to test installation on all 4 target distributions
- Fix CentOS 7 repository configuration (EOL - vault.centos.org)

Generated RPMs:
- el7: CentOS 7 (libpcap >= 1.4.0)
- el8: Rocky Linux 8 (libpcap >= 1.9.0)
- el9: Rocky Linux 9 (libpcap >= 1.9.0)
- el10: AlmaLinux 10 / Rocky Linux 10 (libpcap >= 1.9.0)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-28 17:02:58 +01:00
27eaa8aa4c refactor: update packaging test scripts to use Docker directly
Some checks failed
Build DEB Package / Build DEB Package (Debian/Ubuntu) (push) Has been cancelled
Build RPM Package / Build RPM Package (Rocky Linux) (push) Has been cancelled
- Remove dependency on Dockerfile.deb and Dockerfile.rpm
- Use debian:latest and rockylinux:8 containers directly
- Simplify test scripts by removing intermediate image builds
- Remove obsolete test-install-deb.sh and test-install-rpm.sh

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-27 16:18:15 +01:00
9c91884b7f refactor: remove obsolete packaging files
Some checks failed
Build DEB Package / Build DEB Package (Debian/Ubuntu) (push) Has been cancelled
Build RPM Package / Build RPM Package (Rocky Linux) (push) Has been cancelled
- Remove Dockerfile.deb and Dockerfile.rpm (replaced by Dockerfile.package)
- Remove build-deb.sh and build-rpm.sh (replaced by fpm in Dockerfile.package)
- Remove test Dockerfiles and old test packages
- Keep only: deb/, rpm/, systemd/ directories with maintainer scripts

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-27 16:06:34 +01:00
9280cb545c feat: version 1.0.0 avec corrections critiques et nommage de packages
Ajout du point d'entrée principal :
- cmd/ja4sentinel/main.go : pipeline complet avec gestion des signaux
- Intégration des modules (capture, tlsparse, fingerprint, output)
- Shutdown propre avec context.Context

Corrections du parsing TLS :
- Flow key unidirectionnel (client → serveur uniquement)
- Timeout de flux configurable via FlowTimeoutSec
- Structure ConnectionFlow simplifiée

Améliorations de l'API :
- Champs TCPMSS et TCPWScale en pointeurs (omitempty correct)
- NewLogRecord mis à jour pour les champs optionnels

Mise à jour de l'architecture :
- architecture.yml : documentation des champs optionnels
- Règles de flux unidirectionnel documentées

Système de packages :
- Version par défaut : 1.0.0
- Nommage cohérent : ja4sentinel_1.0.0_amd64.deb
- Scripts build-deb.sh et build-rpm.sh simplifiés
- Extraction correcte des checksums

Tests :
- TestFlowKey mis à jour pour le format unidirectionnel
- Tous les tests passent (go test ./...)
- go vet clean

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-26 23:24:42 +01:00
410467f099 feat: ajouter pipeline CI complet (tests, build, packages)
Some checks failed
Build DEB Package / Build DEB Package (Debian/Ubuntu) (push) Has been cancelled
Build RPM Package / Build RPM Package (Rocky Linux) (push) Has been cancelled
- Ajout des cibles make ci, ci-test, ci-build, ci-package, ci-package-test
- Correction des chemins de sortie des packages (build/deb, build/rpm)
- Build RPM sur Rocky Linux 9 pour dépendances correctes (libpcap.so.1)
- Fix tests RPM (command -v au lieu de which, fallback libpcap)
- Tous les tests passent (11/11 DEB, 11/11 RPM)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-25 22:43:53 +01:00
c62101a08e fix: Support Debian Bookworm et Ubuntu pour le package .deb
Cible: Debian Bookworm (12) et Ubuntu 22.04+

Changes:
- packaging/Dockerfile.deb: Build via Docker avec Go 1.24
- packaging/build-deb.sh: Ajout paramètre distribution (debian/ubuntu)
- packaging/test/Dockerfile.deb: Test sur Debian Bookworm
- packaging/test/test-*.sh: Tests spécifiques Debian/Ubuntu
- .github/workflows/build-deb.yml:
  * Nom du job: 'Build DEB Package (Debian/Ubuntu)'
  * TARGET_DIST: debian:bookworm
  * Build simplifié via Docker
- Makefile: package-deb utilise Docker (cohérent avec RPM)

Compatibilité:
- Debian 11 (Bullseye)
- Debian 12 (Bookworm)
- Ubuntu 20.04 LTS
- Ubuntu 22.04 LTS
- Ubuntu 24.04 LTS

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-25 21:25:45 +01:00
6f7c5450f8 fix: Support Rocky Linux 9 pour le package RPM
Cible: Rocky Linux 9 (compatible RHEL/CentOS)

Changes:
- packaging/Dockerfile.rpm: Build pour Rocky Linux
- packaging/build-rpm.sh: Ajout paramètre distribution (rocky/rhel/centos)
- packaging/rpm/ja4sentinel.spec:
  * Condition %if 0%{?rhel} >= 8 pour compatibilité RHEL
  * Description mise à jour avec Rocky Linux
- packaging/test/Dockerfile.rpm: Test sur Rocky Linux 9
- packaging/test/test-*.sh: Tests spécifiques Rocky Linux
- .github/workflows/build-rpm.yml:
  * Nom du job: 'Build RPM Package (Rocky Linux)'
  * TARGET_DIST: rockylinux:9
  * Simplification du build via Docker

Documentation:
- README.md: Instructions d'installation pour .rpm (Rocky/RHEL) et .deb (Debian/Ubuntu)
- Remplacement des instructions de build par installation via packages

Compatibilité:
- Rocky Linux 8.x et 9.x
- RHEL 8.x et 9.x
- CentOS Stream 8 et 9
- AlmaLinux 8.x et 9.x

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-25 21:17:37 +01:00
61bf05454e feat: CI/CD pour packages .deb et .rpm + tests d'installation
Nouveaux workflows GitHub Actions:
- .github/workflows/build-deb.yml : Build et release DEB sur Ubuntu
- .github/workflows/build-rpm.yml : Build et release RPM sur Fedora
- Déclenchement sur tags v*, push main/master, workflow_dispatch
- Upload des artifacts et création automatique de release

Système de build de packages:
- packaging/build-deb.sh : Script de build .deb avec sanitization version
- packaging/build-rpm.sh : Script de build .rpm (via Docker)
- packaging/Dockerfile.deb : Container Ubuntu 22.04 pour build DEB
- packaging/Dockerfile.rpm : Container Go 1.24 + rpm pour build RPM

Fichiers de configuration systemd:
- packaging/systemd/ja4sentinel.service : Unit avec security hardening
  * NoNewPrivileges, ProtectSystem, ProtectHome
  * CAP_NET_RAW, CAP_NET_ADMIN pour packet capture
- packaging/systemd/config.yml : Configuration par défaut

Scripts mainteneur DEB:
- packaging/deb/postinst : Création user/group, dirs, config
- packaging/deb/prerm : Stop service avant upgrade/remove
- packaging/deb/postrm : Cleanup complet en purge

Spec file RPM:
- packaging/rpm/ja4sentinel.spec : Spec complet avec dependencies
  * Requires: systemd, libpcap
  * %pre/%post/%preun/%postun scripts

Tests d'installation dans containers:
- packaging/test/test-deb.sh : Build + test Docker Ubuntu
- packaging/test/test-rpm.sh : Build + test Docker Fedora
- packaging/test/test-install-deb.sh : 11 tests automatisés
- packaging/test/test-install-rpm.sh : 11 tests automatisés
- Dockerfile.deb/rpm : Containers de test dédiés

Makefile:
- package-deb : Build .deb
- package-rpm : Build .rpm via Docker (no-cache)
- package : Build les deux
- test-package-deb : Build + test installation DEB
- test-package-rpm : Build + test installation RPM
- test-package : Test les deux packages

Tests:
-  DEB: 11/11 tests passés (binaire, config, service, user, dirs)
-  RPM: Build réussi (3.3 MB)
- Version sanitization pour git tags (ex: efd4481-dirty → 0.0.0+efd4481-dirty)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-02-25 21:05:23 +01:00