Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: QXIP/stenographer
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.1
Choose a base ref
...
head repository: QXIP/stenographer
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 15 commits
  • 3 files changed
  • 1 contributor

Commits on Aug 26, 2024

  1. Update release.yml

    lmangani authored Aug 26, 2024
    Copy the full SHA
    9dc92a3 View commit details
  2. Update Dockerfile

    lmangani authored Aug 26, 2024
    Copy the full SHA
    10ce8eb View commit details

Commits on Dec 13, 2024

  1. NFPM Step

    lmangani authored Dec 13, 2024
    Copy the full SHA
    f5ab0f4 View commit details
  2. Update nfpm.yaml

    lmangani authored Dec 13, 2024
    Copy the full SHA
    4f2cc49 View commit details
  3. Fix Typo

    lmangani authored Dec 13, 2024
    Copy the full SHA
    502d66a View commit details
  4. Update nfpm.yaml

    lmangani authored Dec 13, 2024
    Copy the full SHA
    b4a71cc View commit details
  5. Update release.yml

    lmangani authored Dec 13, 2024
    Copy the full SHA
    c986230 View commit details
  6. Update release.yml

    lmangani authored Dec 13, 2024
    Copy the full SHA
    5254292 View commit details
  7. Update release.yml

    lmangani authored Dec 13, 2024
    Copy the full SHA
    2ccabf7 View commit details
  8. Fix nfpm

    lmangani authored Dec 13, 2024
    Copy the full SHA
    0ff9a15 View commit details
  9. Update release.yml

    lmangani authored Dec 13, 2024
    Copy the full SHA
    3dc6af3 View commit details
  10. Update release.yml

    lmangani authored Dec 13, 2024
    Copy the full SHA
    5f943c3 View commit details
  11. Update release.yml

    lmangani authored Dec 13, 2024
    Copy the full SHA
    330c30e View commit details
  12. Update release.yml

    lmangani authored Dec 13, 2024
    Copy the full SHA
    38c1e82 View commit details
  13. Update nfpm.yaml

    lmangani authored Dec 13, 2024
    Copy the full SHA
    88e9d2e View commit details
Showing with 82 additions and 50 deletions.
  1. +35 −8 .github/workflows/release.yml
  2. +1 −1 docker/Dockerfile
  3. +46 −41 nfpm.yaml
43 changes: 35 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -6,6 +6,12 @@ on:
ref_name:
description: Release Version
required: true
test:
required: true
type: boolean
release:
required: true
type: boolean
release:
types: [created]

@@ -36,37 +42,58 @@ jobs:
run: |
go test ./...
# - name: Integration Test
# run: bash integration_test/test.sh
- name: Integration Test
if: ${{ inputs.test }}
run: bash integration_test/test.sh

- run: |
echo "VERSION=${{ github.ref_name || github.event.inputs.ref_name }}" >> $GITHUB_ENV
echo "VERSION=${{ (github.ref_name == 'master' && github.event_name == 'workflow_dispatch') && github.event.inputs.ref_name || github.ref_name }}" >> $GITHUB_ENV
- name: get NFPM
if: ${{ inputs.release }}
run: |
wget -qO- https://github.com/goreleaser/nfpm/releases/download/v2.41.1/nfpm_2.41.1_Linux_x86_64.tar.gz | tar --directory ./ -xz nfpm
chmod +x nfpm
- name: Create Packages
if: ${{ inputs.release }}
env:
VERSION: ${{ env.VERSION }}
PACKAGE: "stenographer"
RELEASE: ${{ env.VERSION }}
ARCH: "amd64"
run: |
sed -i 's|v1.0.1|${{ env.VERSION }}|g' nfpm.yaml
./nfpm pkg --config nfpm.yaml --target "./$PACKAGE-$RELEASE-$ARCH.deb"
./nfpm pkg --config nfpm.yaml --target "./$PACKAGE-$RELEASE-$ARCH.rpm"
- name: Upload release
if: github.event_name != 'pull_request'
if: ${{ inputs.release }}
uses: boxpositron/upload-multiple-releases@1.0.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_config: |
stenographer
stenoread
stenographer*.deb
stenographer*.rpm
tag_name: ${{ env.VERSION }}
release_name: stenographer_${{ env.VERSION }}
release_name: ${{ env.VERSION }}
draft: false
prerelease: false
overwrite: true

- name: Log in to the Container registry
if: false
if: ${{ inputs.release }}
uses: docker/login-action@v2.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker Build and push (server)
if: false
if: ${{ inputs.release }}
uses: docker/build-push-action@v3.0.0
with:
context: ./docker
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ ENV GOPATH /stenographer
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"

RUN git clone github.com/qxip/stenographer /stenographer/src
RUN git clone https://github.com/QXIP/stenographer /stenographer/src
ENV BINDIR=/opt/stenographer/bin
RUN mkdir -p ${BINDIR} && \
cd /stenographer/src && \
87 changes: 46 additions & 41 deletions nfpm.yaml
Original file line number Diff line number Diff line change
@@ -1,66 +1,71 @@
# nfpm example config file
#
# check https://nfpm.goreleaser.com/configuration for detailed usage
#
name: "stenographer"
arch: "amd64"
platform: "linux"
version: "v1.0.1"
section: "default"
priority: "extra"
replaces:
- stenographer
- stenographer
provides:
- stenographer
- stenographer
recommends:
- tcpdump
- jq
- tcpdump
- jq
suggests:
- tshark
- tshark
maintainer: "QXIP BV <bot@qxip.net>"
description: |
Stenographer is a full-packet-capture utility for buffering packets
to disk for intrusion detection and incident response purposes.
vendor: "qxip"
homepage: "http://github.com/qxip/stenographer"
license: "Apache2"
empty_folders:
- /opt/stenographer
- /opt/stenographer/configs

# Updated contents block using new format
contents:
- src: ./stenocurl
dst: /usr/bin/stenocurl
file_info:
mode: 0755
- src: ./stenoread
dst: /usr/bin/stenoread
file_info:
mode: 0755
- src: ./stenokeys.sh
dst: /opt/stenographer/stenokeys.sh
file_info:
mode: 0755
- src: ./stenographer
dst: /usr/bin/stenographer
file_info:
mode: 0700
owner: stenographer
group: root
- src: ./stenotype/stenotype
dst: /usr/bin/stenotype
file_info:
mode: 0500
owner: stenographer
group: root
- src: ./configs/*
dst: /opt/stenographer/configs
- src: ./stenocurl
dst: /usr/bin/stenocurl
file_info:
mode: 0755

- src: ./stenoread
dst: /usr/bin/stenoread
file_info:
mode: 0755

- src: ./stenokeys.sh
dst: /opt/stenographer/stenokeys.sh
file_info:
mode: 0755

- src: ./stenographer
dst: /usr/bin/stenographer
file_info:
mode: 0700
owner: stenographer
group: root

- src: ./stenotype/stenotype
dst: /usr/bin/stenotype
file_info:
mode: 0500
owner: stenographer
group: root

# Config files
- dst: /opt/stenographer
type: dir

- dst: /opt/stenographer/configs
type: dir

- src: ./configs/*
dst: /opt/stenographer/configs/

overrides:
rpm:
scripts:
# preinstall: ./scripts/preinstall.sh
postinstall: ./scripts/postinstall.sh
# postremove: ./scripts/postremove.sh
deb:
scripts:
postinstall: ./scripts/postinstall.sh
# preremove: ./scripts/preremove.sh