diff --git a/.github/ISSUE_TEMPLATE/10-bug-report.md b/.github/ISSUE_TEMPLATE/10-bug-report.md index f867342eec..0f4deb8ca3 100644 --- a/.github/ISSUE_TEMPLATE/10-bug-report.md +++ b/.github/ISSUE_TEMPLATE/10-bug-report.md @@ -6,8 +6,8 @@ labels: bug assignees: '' --- -# syslog-ng -## Version of syslog-ng +# AxoSyslog +## Version of AxoSyslog ## Platform diff --git a/.github/ISSUE_TEMPLATE/20-documentation-issue.md b/.github/ISSUE_TEMPLATE/20-documentation-issue.md index 66650675d9..d146b9ec92 100644 --- a/.github/ISSUE_TEMPLATE/20-documentation-issue.md +++ b/.github/ISSUE_TEMPLATE/20-documentation-issue.md @@ -8,7 +8,7 @@ assignees: '' --- ## Documentation version - + ## Incorrect section diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0e8275b8a4..6b32b7285b 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,13 +1,13 @@ diff --git a/.github/workflows/axosyslog-create-packages.yml b/.github/workflows/axosyslog-create-packages.yml index ad93b1ca4a..68e371f8e2 100644 --- a/.github/workflows/axosyslog-create-packages.yml +++ b/.github/workflows/axosyslog-create-packages.yml @@ -37,7 +37,7 @@ jobs: - name: Extract source tarball run: | mkdir axosyslog - tar --strip-components=1 -xvf syslog-ng*.tar.gz -C axosyslog + tar --strip-components=1 -xvf axosyslog*.tar.gz -C axosyslog - name: Prepare docker image working-directory: axosyslog diff --git a/.github/workflows/axosyslog-docker.yml b/.github/workflows/axosyslog-docker.yml index b6c22aa505..ce074fdb0d 100644 --- a/.github/workflows/axosyslog-docker.yml +++ b/.github/workflows/axosyslog-docker.yml @@ -60,7 +60,7 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.DOCKER_IMAGE_NAME }} - tags: type=match,pattern=syslog-ng-(.*),group=1 + tags: type=match,pattern=axosyslog-(.*),group=1 sep-tags: ',' - name: Compose Docker image tags diff --git a/.github/workflows/axosyslog-packages.yml b/.github/workflows/axosyslog-packages.yml index 61a88563df..ea8377af43 100644 --- a/.github/workflows/axosyslog-packages.yml +++ b/.github/workflows/axosyslog-packages.yml @@ -1,26 +1,27 @@ +# TODO rewrite rpm and deb packaging for AxoSyslog and remove this job (use "create-packages" instead) name: AxoSyslog packages on: workflow_call: inputs: repo: - description: 'syslog-ng repository' + description: 'AxoSyslog repository' required: true - default: 'syslog-ng/syslog-ng' + default: 'axoflow/axosyslog' type: string version: - description: 'syslog-ng version' + description: 'AxoSyslog version' required: true type: string workflow_dispatch: inputs: repo: - description: 'syslog-ng repository' + description: 'AxoSyslog repository' required: true - default: 'syslog-ng/syslog-ng' + default: 'axoflow/axosyslog' type: string version: - description: 'syslog-ng version' + description: 'AxoSyslog version' required: true type: string @@ -28,20 +29,20 @@ jobs: create-source-tarball: runs-on: ubuntu-latest steps: - - name: Get syslog-ng tarball + - name: Get AxoSyslog tarball env: GH_TOKEN: ${{ github.token }} run: | - gh release download --repo '${{ inputs.repo }}' -p 'syslog-ng-${{ inputs.version }}.tar.gz' 'syslog-ng-${{ inputs.version }}' + gh release download --repo '${{ inputs.repo }}' -p 'axosyslog-${{ inputs.version }}.tar.gz' 'axosyslog-${{ inputs.version }}' - name: Extract source tarball run: | - mkdir syslog-ng - tar --strip-components=1 -xvf syslog-ng*.tar.gz -C syslog-ng - rm syslog-ng*.tar.gz + mkdir axosyslog + tar --strip-components=1 -xvf axosyslog*.tar.gz -C axosyslog + rm axosyslog*.tar.gz - name: AxoSyslog patches - working-directory: syslog-ng + working-directory: axosyslog run: | sed -i 's/Name: syslog-ng/Name: axosyslog/' packaging/rhel/syslog-ng.spec sed -i 's|%{name}-%{version}.tar.gz|syslog-ng-%{version}.tar.gz|' packaging/rhel/syslog-ng.spec @@ -58,18 +59,18 @@ jobs: cat packaging/rhel/syslog-ng.spec - name: Prepare docker image - working-directory: syslog-ng + working-directory: axosyslog run: ./dbld/rules cache-image-tarball - name: Create source tarball - working-directory: syslog-ng + working-directory: axosyslog run: ./dbld/rules pkg-tarball - name: Store source tarball as artifact uses: actions/upload-artifact@v4 with: name: source-tarball - path: syslog-ng/dbld/build/*.tar.* + path: axosyslog/dbld/build/*.tar.* if-no-files-found: error create-packages: diff --git a/.github/workflows/axosyslog-snapshot-image.yml b/.github/workflows/axosyslog-snapshot-image.yml deleted file mode 100644 index a03db7b970..0000000000 --- a/.github/workflows/axosyslog-snapshot-image.yml +++ /dev/null @@ -1,198 +0,0 @@ -name: AxoSyslog snapshot image - -on: - workflow_dispatch: - inputs: - repo: - description: 'syslog-ng repository' - required: true - default: 'syslog-ng/syslog-ng' - type: string - ref: - description: 'syslog-ng ref (branch, tag, commit id)' - required: true - default: 'master' - type: string - pull_request: - paths: - - 'docker/**' - - '.github/workflows/**' - push: - paths: - - 'docker/**' - - '.github/workflows/**' - schedule: - - cron: '00 23 * * *' - -jobs: - tarball: - name: create-source-tarball - runs-on: ubuntu-latest - outputs: - snapshot-version: ${{ steps.snapshot-version.outputs.SNAPSHOT_VERSION }} - steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v4 - with: - repository: ${{ inputs.repo || 'syslog-ng/syslog-ng' }} - ref: ${{ inputs.ref || 'master' }} - fetch-depth: 0 - - - name: Prepare docker image - run: ./dbld/rules cache-image-tarball - - - name: Create source tarball - run: ./dbld/rules pkg-tarball - - - name: Determine snapshot version - id: snapshot-version - run: | - tarball_filename="$(find dbld/build -name '*.tar.*' -printf '%f\n')" - tarball_name="${tarball_filename/\.tar.*}" - tarball_version="${tarball_name/syslog-ng-}" - pkg_version="$(echo $tarball_version | sed -E 's|(([0-9]+\.){2}[0-9]+).*|\1|')_git$(date +%Y%m%d)" - echo "SNAPSHOT_VERSION=${pkg_version}" >> $GITHUB_OUTPUT - - - name: Store source tarball as artifact - uses: actions/upload-artifact@v4 - with: - name: source-tarball - path: dbld/build/*.tar.* - - axosyslog-modules: - name: axosyslog-modules - runs-on: ubuntu-latest - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Create AxoSyslog modules tarball - working-directory: docker - run: | - tar -czvf python-modules.tar.gz python-modules/ - - - name: Store axosyslog-modules tarball as artifact - uses: actions/upload-artifact@v4 - with: - name: axosyslog-modules-tarball - path: docker/python-modules.tar.gz - - build-and-test: - runs-on: ubuntu-latest - needs: - - tarball - - axosyslog-modules - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Download source tarball artifact - uses: actions/download-artifact@v4 - with: - name: source-tarball - path: docker/apkbuild/axoflow/axosyslog - - - name: Download axosyslog-modules tarball artifact - uses: actions/download-artifact@v4 - with: - name: axosyslog-modules-tarball - path: docker/apkbuild/axoflow/axosyslog - - - name: Build Docker image - uses: docker/build-push-action@v5 - with: - context: docker - file: docker/alpine.dockerfile - load: true - tags: axosyslog:test - build-args: | - PKG_TYPE=nightly - SNAPSHOT_VERSION=${{ needs.tarball.outputs.snapshot-version }} - - - name: Smoke test - run: | - export SYSLOG_NG_IMAGE="axosyslog:test" - export SYSLOG_NG_VERSION="${{ needs.tarball.outputs.snapshot-version }}" - docker/tests/smoke.sh - - - publish-image: - if: github.ref == 'refs/heads/main' - uses: ./.github/workflows/axosyslog-docker.yml - needs: [tarball, build-and-test, axosyslog-modules] - with: - pkg-type: nightly - tarball-artifact: source-tarball - axosyslog-modules-artifact: axosyslog-modules-tarball - snapshot-version: ${{ needs.tarball.outputs.snapshot-version }} - - # https://github.com/actions/delete-package-versions/issues/90 - cleanup-old-images: - if: github.ref == 'refs/heads/main' - needs: publish-image - runs-on: ubuntu-latest - steps: - - name: Clean up old images - uses: actions/github-script@v7 - with: - script: | - const daysToKeep = 30 - const snapshotTagPattern = /_git[0-9]+/ - - const package_name = "axosyslog" - const org = "axoflow" - const image = `${org}/${package_name}` - - const allPackageVersions = await github.paginate( - github.rest.packages.getAllPackageVersionsForPackageOwnedByOrg, - { package_type: "container", package_name: package_name, org: org } - ) - - const oldPackageDate = new Date() - oldPackageDate.setDate(oldPackageDate.getDate() - daysToKeep) - - const oldSnapshotVersions = allPackageVersions.filter((p) => { - return new Date(p.updated_at) < oldPackageDate && p.metadata.container && p.metadata.container.tags.length != 0 && p.metadata.container.tags.every((t) => snapshotTagPattern.test(t)) - }) - - if (oldSnapshotVersions.length === 0) { - console.log("Nothing to remove") - return - } - - const oldSnapshotTags = oldSnapshotVersions.flatMap(({ metadata }) => metadata.container.tags) - - console.log(`Removing the following images: ${oldSnapshotTags}`) - - const manifestsRequests = oldSnapshotTags.map((t) => { - const manifest = fetch(`https://ghcr.io/v2/${image}/manifests/${t}`, { - method: "GET", - headers: { - "Authorization": "Bearer ${{ secrets.GITHUB_TOKEN }}", - "Accept": "application/vnd.docker.distribution.manifest.list.v2+json", - "Accept": "application/vnd.docker.distribution.manifest.v2+json", - "Accept": "application/vnd.oci.image.manifest.v1+json", - "Accept": "application/vnd.oci.image.index.v1+json", - }, - }).then((d) => d.json()) - - return manifest - }) - - const manifestsResponse = await Promise.all(manifestsRequests) - - const manifestsToDelete = manifestsResponse.filter((m) => m.manifests).flatMap((m) => m.manifests) - - await Promise.all(manifestsToDelete.map((m) => { - const version = allPackageVersions.find((p) => p.name === m.digest) - if (!version) { - return; - } - - return github.rest.packages.deletePackageVersionForOrg({ package_type: "container", package_name: package_name, org: org, package_version_id: version.id}) - })) - - - await Promise.all(oldSnapshotVersions.map((v) => { - return github.rest.packages.deletePackageVersionForOrg({ package_type: "container", package_name: package_name, org: org, package_version_id: v.id}) - })) diff --git a/.github/workflows/axosyslog-stable-image.yml b/.github/workflows/axosyslog-stable-image.yml deleted file mode 100644 index 97eb3a04ae..0000000000 --- a/.github/workflows/axosyslog-stable-image.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: AxoSyslog stable image - -on: - workflow_dispatch: - push: - tags: - - 'axosyslog-[0-9]+*' - -jobs: - prepare: - name: Prepare Workflow - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Regex matching - uses: kaisugi/action-regex-match@v1.0.0 - id: unpack_tag - with: - text: ${{ github.ref }} - regex: 'refs/tags/axosyslog-(.*)' - outputs: - version: ${{ steps.unpack_tag.outputs.group1 }} - - axosyslog-modules: - name: axosyslog-modules - runs-on: ubuntu-latest - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Create AxoSyslog modules tarball - working-directory: docker - run: | - tar -czvf python-modules.tar.gz python-modules/ - - - name: Store axosyslog-modules tarball as artifact - uses: actions/upload-artifact@v4 - with: - name: axosyslog-modules-tarball - path: docker/python-modules.tar.gz - - publish-packages: - uses: ./.github/workflows/axosyslog-packages.yml - needs: - - prepare - with: - repo: syslog-ng/syslog-ng - version: ${{ needs.prepare.outputs.version }} - - publish-image: - uses: ./.github/workflows/axosyslog-docker.yml - needs: - - prepare - - axosyslog-modules - with: - pkg-type: stable - axosyslog-modules-artifact: axosyslog-modules-tarball diff --git a/.github/workflows/check-cfg-grammar-changes.yml b/.github/workflows/check-cfg-grammar-changes.yml index df1fa03138..9e0d7df6a6 100644 --- a/.github/workflows/check-cfg-grammar-changes.yml +++ b/.github/workflows/check-cfg-grammar-changes.yml @@ -9,5 +9,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: syslog-ng/syslog-ng-cfg-diff-pr@v2 + - uses: axoflow/axosyslog-cfg-diff-pr@v3 continue-on-error: true diff --git a/.github/workflows/comment-on-version-bump-pr.yml b/.github/workflows/comment-on-version-bump-pr.yml index 1941033284..22bed75416 100644 --- a/.github/workflows/comment-on-version-bump-pr.yml +++ b/.github/workflows/comment-on-version-bump-pr.yml @@ -1,6 +1,6 @@ ########################################################################### # -# If there are new commits on master, while we have a version bump PR open, +# If there are new commits on main, while we have a version bump PR open, # this job automatically comments on the PR, mentioning the new commits, # so we will not forget to follow-up the changes. # @@ -11,17 +11,17 @@ name: Comment on version bump PR on: push: branches: - - master + - main jobs: comment-on-version-bump-pr: runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COMMIT_URL: https://github.com/${{ github.repository_owner }}/syslog-ng/commit/${{ github.sha }} + COMMIT_URL: https://github.com/${{ github.repository_owner }}/axosyslog/commit/${{ github.sha }} steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v3 + - name: Checkout AxoSyslog source + uses: actions/checkout@v4 - name: Check if version bump PR is open run: | @@ -35,7 +35,7 @@ jobs: - name: Comment if: env.PR_NUMBER != '' run: | - COMMENT="There are new commits (${COMMIT_URL}) on master. Please follow-up any necessary changes." + COMMENT="There are new commits (${COMMIT_URL}) on main. Please follow-up any necessary changes." gh pr comment \ "${PR_NUMBER}" \ diff --git a/.github/workflows/create-packages.yml b/.github/workflows/create-packages.yml index 7a2553e6a4..1bbe29d25f 100644 --- a/.github/workflows/create-packages.yml +++ b/.github/workflows/create-packages.yml @@ -47,11 +47,11 @@ jobs: - name: Extract source tarball run: | - mkdir syslog-ng - tar --strip-components=1 -xvf syslog-ng*.tar.gz -C syslog-ng + mkdir axosyslog + tar --strip-components=1 -xvf axosyslog*.tar.gz -C axosyslog - name: Prepare docker image - working-directory: syslog-ng + working-directory: axosyslog run: | if [[ "${{ inputs.dbld-image-mode }}" = "build" ]] then @@ -65,7 +65,7 @@ jobs: fi - name: Create package - working-directory: syslog-ng + working-directory: axosyslog run: | ./dbld/rules package-${{ matrix.distro }} @@ -76,7 +76,7 @@ jobs: # so let's make a temporary directory and move the ${{ matrix.distro }} directory there. run: | mkdir package - cp -r syslog-ng/dbld/build/${{ matrix.distro }} package/ + cp -r axosyslog/dbld/build/${{ matrix.distro }} package/ - name: Store package as artifact uses: actions/upload-artifact@v3 diff --git a/.github/workflows/dbld-images.yml b/.github/workflows/dbld-images.yml index 552c49b977..ec3b976d45 100644 --- a/.github/workflows/dbld-images.yml +++ b/.github/workflows/dbld-images.yml @@ -41,7 +41,6 @@ jobs: - ubuntu-lunar - ubuntu-mantic - devshell - - kira - tarball fail-fast: false steps: diff --git a/.github/workflows/devshell.yml b/.github/workflows/devshell.yml index 5c464e03ce..00b6e6318f 100644 --- a/.github/workflows/devshell.yml +++ b/.github/workflows/devshell.yml @@ -10,7 +10,7 @@ jobs: general: runs-on: ubuntu-latest container: - image: ghcr.io/syslog-ng/dbld-devshell:latest + image: ghcr.io/axoflow/axosyslog-dbld-devshell:latest options: --privileged --ulimit core=-1 strategy: @@ -20,8 +20,8 @@ jobs: fail-fast: false steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v3 + - name: Checkout AxoSyslog source + uses: actions/checkout@v4 - name: Setup Git safedir run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" @@ -118,8 +118,8 @@ jobs: run: | REPORTS_DIR=tests/light/reports cp -r ${REPORTS_DIR} /tmp/light-reports - find /tmp/light-reports -type p,s -print0 | xargs -0 rm -f - tar -cz -f /tmp/light-reports.tar.gz /tmp/light-reports + find /tmp/light-reports -type p,s -print0 | xargs -0 rm -f + tar -cz -f /tmp/light-reports.tar.gz /tmp/light-reports - name: "Artifact: light-reports" uses: actions/upload-artifact@v3 @@ -145,12 +145,12 @@ jobs: distcheck: runs-on: ubuntu-latest container: - image: ghcr.io/syslog-ng/dbld-devshell:latest + image: ghcr.io/axoflow/axosyslog-dbld-devshell:latest options: --security-opt seccomp=unconfined --ulimit core=-1 steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v3 + - name: Checkout AxoSyslog source + uses: actions/checkout@v4 - name: Setup Git safedir run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" @@ -190,11 +190,11 @@ jobs: style-check: runs-on: ubuntu-latest container: - image: ghcr.io/syslog-ng/dbld-devshell:latest + image: ghcr.io/axoflow/axosyslog-dbld-devshell:latest steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v3 + - name: Checkout AxoSyslog source + uses: actions/checkout@v4 - name: Setup Git safedir run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" @@ -244,13 +244,13 @@ jobs: copyright-check: runs-on: ubuntu-latest container: - image: ghcr.io/syslog-ng/dbld-devshell:latest + image: ghcr.io/axoflow/axosyslog-dbld-devshell:latest env: COPYRIGHTVERBOSITY: 1 steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v3 + - name: Checkout AxoSyslog source + uses: actions/checkout@v4 - name: Setup Git safedir run: git config --global --add safe.directory "${GITHUB_WORKSPACE}" @@ -268,11 +268,11 @@ jobs: commits-check: runs-on: ubuntu-latest container: - image: ghcr.io/syslog-ng/dbld-devshell:latest + image: ghcr.io/axoflow/axosyslog-dbld-devshell:latest steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v3 + - name: Checkout AxoSyslog source + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index fd74c64ef7..25452ca801 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -7,7 +7,7 @@ # # The workflow can also be started manually, if necessary. # -# When the workflow is finished, one must visit https://github.com/syslog-ng/syslog-ng/releases, +# When the workflow is finished, one must visit https://github.com/axoflow/axosyslog/releases, # double check the generated draft release, and manually release it. # ########################################################################################################### @@ -24,8 +24,8 @@ on: env: GITHUB_TOKEN: ${{ secrets.PAT_FOR_ACTIONS }} WORKFLOW_NAME: "**Draft release** workflow" - CURRENT_WORKFLOW_RUN_URL: https://github.com/${{ github.repository_owner }}/syslog-ng/actions/runs/${{ github.run_id }} - RELEASES_URL: https://github.com/${{ github.repository_owner }}/syslog-ng/releases + CURRENT_WORKFLOW_RUN_URL: https://github.com/${{ github.repository_owner }}/axosyslog/actions/runs/${{ github.run_id }} + RELEASES_URL: https://github.com/${{ github.repository_owner }}/axosyslog/releases jobs: @@ -38,8 +38,8 @@ jobs: RELEASE_NAME: ${{ steps.setup-environment.outputs.RELEASE_NAME }} TARBALL_NAME: ${{ steps.setup-environment.outputs.TARBALL_NAME }} steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v3 + - name: Checkout AxoSyslog source + uses: actions/checkout@v4 - name: "Comment: job started" if: github.event_name == 'pull_request' @@ -56,7 +56,7 @@ jobs: . .github/workflows/gh-tools.sh VERSION=`cat VERSION.txt` - RELEASE_TAG=syslog-ng-$VERSION + RELEASE_TAG=axosyslog-$VERSION RELEASE_NAME=${RELEASE_TAG} TARBALL_NAME=${RELEASE_NAME}.tar.gz TARBALL_PATH=dbld/release/${VERSION}/${TARBALL_NAME} @@ -75,27 +75,27 @@ jobs: path: ${{ env.TARBALL_PATH }} if-no-files-found: error - create-packages: - needs: create-release-tarball - uses: ./.github/workflows/create-packages.yml - with: - source-tarball-artifact-name: release-tarball - dbld-image-mode: build - - upload-packages: - needs: create-packages - uses: ./.github/workflows/upload-packages.yml - with: - pkg-type: stable - secrets: - azure-sas-token: ${{ secrets.AZURE_SAS_TOKEN }} + # create-packages: + # needs: create-release-tarball + # uses: ./.github/workflows/create-packages.yml + # with: + # source-tarball-artifact-name: release-tarball + # dbld-image-mode: build + + # upload-packages: + # needs: create-packages + # uses: ./.github/workflows/upload-packages.yml + # with: + # pkg-type: stable + # secrets: + # azure-sas-token: ${{ secrets.AZURE_SAS_TOKEN }} create-draft-release: runs-on: ubuntu-latest - needs: [create-release-tarball, upload-packages] + needs: [create-release-tarball] steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v3 + - name: Checkout AxoSyslog source + uses: actions/checkout@v4 - name: Download release tarball artifact uses: actions/download-artifact@v3 diff --git a/.github/workflows/index-packages.yml b/.github/workflows/index-packages.yml index fd5b9384cf..16b62da607 100644 --- a/.github/workflows/index-packages.yml +++ b/.github/workflows/index-packages.yml @@ -36,11 +36,11 @@ jobs: VERBOSE_LOG_PATH: index-packages-verbose.log GPG_KEY_PATH: syslog_ng_ose_signing_key.sub.priv.asc - if: github.repository_owner == 'syslog-ng' + if: github.repository_owner == 'axoflow' steps: - name: Checkout source code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare environment run: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e9ad4cf5b8..00f1430c7a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -17,8 +17,8 @@ jobs: runs-on: macOS-${{ matrix.version }} steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v3 + - name: Checkout AxoSyslog source + uses: actions/checkout@v4 - name: Set xcode version if: matrix.version == 14 diff --git a/.github/workflows/nightly-release.yml b/.github/workflows/nightly-release.yml index 03263d7c05..923154b639 100644 --- a/.github/workflows/nightly-release.yml +++ b/.github/workflows/nightly-release.yml @@ -9,9 +9,11 @@ on: jobs: create-source-tarball: runs-on: ubuntu-latest + outputs: + snapshot-version: ${{ steps.snapshot-version.outputs.SNAPSHOT_VERSION }} steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v3 + - name: Checkout AxoSyslog source + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -21,48 +23,186 @@ jobs: - name: Create source tarball run: ./dbld/rules pkg-tarball + - name: Determine snapshot version + id: snapshot-version + run: | + tarball_filename="$(find dbld/build -name '*.tar.*' -printf '%f\n')" + tarball_name="${tarball_filename/\.tar.*}" + tarball_version="${tarball_name/axosyslog-}" + pkg_version="$(echo $tarball_version | sed -E 's|(([0-9]+\.){2}[0-9]+).*|\1|')_git$(date +%Y%m%d)" + echo "SNAPSHOT_VERSION=${pkg_version}" >> $GITHUB_OUTPUT + - name: Store source tarball as artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: source-tarball - path: dbld/build/*.tar.gz + path: dbld/build/*.tar.* - create-packages: - needs: create-source-tarball - uses: ./.github/workflows/create-packages.yml - with: - source-tarball-artifact-name: source-tarball - dbld-image-mode: cache + # create-packages: + # needs: create-source-tarball + # uses: ./.github/workflows/create-packages.yml + # with: + # source-tarball-artifact-name: source-tarball + # dbld-image-mode: cache - upload-packages: - needs: create-packages - uses: ./.github/workflows/upload-packages.yml - with: - pkg-type: nightly - secrets: - azure-sas-token: ${{ secrets.AZURE_SAS_TOKEN }} + # upload-packages: + # needs: create-packages + # uses: ./.github/workflows/upload-packages.yml + # with: + # pkg-type: nightly + # secrets: + # azure-sas-token: ${{ secrets.AZURE_SAS_TOKEN }} - index-packages: - needs: upload-packages - uses: ./.github/workflows/index-packages.yml - with: - pkg-type: nightly - secrets: - config-base64: ${{ secrets.PACKAGE_INDEXER_CONFIG_BASE64 }} - gpg-key-base64: ${{ secrets.PACKAGE_INDEXER_GPG_KEY_BASE64 }} - gpg-key-passphrase: ${{ secrets.PACKAGE_INDEXER_GPG_KEY_PASSPHRASE }} - - test-packages: - needs: index-packages - uses: ./.github/workflows/test-apt-packages.yml - with: - pkg-type: nightly + # index-packages: + # needs: upload-packages + # uses: ./.github/workflows/index-packages.yml + # with: + # pkg-type: nightly + # secrets: + # config-base64: ${{ secrets.PACKAGE_INDEXER_CONFIG_BASE64 }} + # gpg-key-base64: ${{ secrets.PACKAGE_INDEXER_GPG_KEY_BASE64 }} + # gpg-key-passphrase: ${{ secrets.PACKAGE_INDEXER_GPG_KEY_PASSPHRASE }} + + # test-packages: + # needs: index-packages + # uses: ./.github/workflows/test-apt-packages.yml + # with: + # pkg-type: nightly + + axosyslog-modules: + name: axosyslog-modules + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Create AxoSyslog modules tarball + working-directory: docker + run: | + tar -czvf python-modules.tar.gz python-modules/ + + - name: Store axosyslog-modules tarball as artifact + uses: actions/upload-artifact@v4 + with: + name: axosyslog-modules-tarball + path: docker/python-modules.tar.gz + + build-and-test: + runs-on: ubuntu-latest + needs: + - create-source-tarball + - axosyslog-modules + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Download source tarball artifact + uses: actions/download-artifact@v4 + with: + name: source-tarball + path: docker/apkbuild/axoflow/axosyslog + + - name: Download axosyslog-modules tarball artifact + uses: actions/download-artifact@v4 + with: + name: axosyslog-modules-tarball + path: docker/apkbuild/axoflow/axosyslog - publish-docker-image: - needs: test-packages - uses: ./.github/workflows/publish-docker-image.yml + - name: Build Docker image + uses: docker/build-push-action@v5 + with: + context: docker + file: docker/alpine.dockerfile + load: true + tags: axosyslog:test + build-args: | + PKG_TYPE=nightly + SNAPSHOT_VERSION=${{ needs.tarball.outputs.snapshot-version }} + + - name: Smoke test + run: | + export SYSLOG_NG_IMAGE="axosyslog:test" + export SYSLOG_NG_VERSION="${{ needs.tarball.outputs.snapshot-version }}" + docker/tests/smoke.sh + + + publish-image: + if: github.ref == 'refs/heads/main' + uses: ./.github/workflows/axosyslog-docker.yml + needs: [create-source-tarball, build-and-test, axosyslog-modules] with: pkg-type: nightly - secrets: - dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }} - dockerhub-password: ${{ secrets.DOCKERHUB_PASSWORD }} + tarball-artifact: source-tarball + axosyslog-modules-artifact: axosyslog-modules-tarball + snapshot-version: ${{ needs.tarball.outputs.snapshot-version }} + + # https://github.com/actions/delete-package-versions/issues/90 + cleanup-old-images: + if: github.ref == 'refs/heads/main' + needs: publish-image + runs-on: ubuntu-latest + steps: + - name: Clean up old images + uses: actions/github-script@v7 + with: + script: | + const daysToKeep = 30 + const snapshotTagPattern = /_git[0-9]+/ + + const package_name = "axosyslog" + const org = "axoflow" + const image = `${org}/${package_name}` + + const allPackageVersions = await github.paginate( + github.rest.packages.getAllPackageVersionsForPackageOwnedByOrg, + { package_type: "container", package_name: package_name, org: org } + ) + + const oldPackageDate = new Date() + oldPackageDate.setDate(oldPackageDate.getDate() - daysToKeep) + + const oldSnapshotVersions = allPackageVersions.filter((p) => { + return new Date(p.updated_at) < oldPackageDate && p.metadata.container && p.metadata.container.tags.length != 0 && p.metadata.container.tags.every((t) => snapshotTagPattern.test(t)) + }) + + if (oldSnapshotVersions.length === 0) { + console.log("Nothing to remove") + return + } + + const oldSnapshotTags = oldSnapshotVersions.flatMap(({ metadata }) => metadata.container.tags) + + console.log(`Removing the following images: ${oldSnapshotTags}`) + + const manifestsRequests = oldSnapshotTags.map((t) => { + const manifest = fetch(`https://ghcr.io/v2/${image}/manifests/${t}`, { + method: "GET", + headers: { + "Authorization": "Bearer ${{ secrets.GITHUB_TOKEN }}", + "Accept": "application/vnd.docker.distribution.manifest.list.v2+json", + "Accept": "application/vnd.docker.distribution.manifest.v2+json", + "Accept": "application/vnd.oci.image.manifest.v1+json", + "Accept": "application/vnd.oci.image.index.v1+json", + }, + }).then((d) => d.json()) + + return manifest + }) + + const manifestsResponse = await Promise.all(manifestsRequests) + + const manifestsToDelete = manifestsResponse.filter((m) => m.manifests).flatMap((m) => m.manifests) + + await Promise.all(manifestsToDelete.map((m) => { + const version = allPackageVersions.find((p) => p.name === m.digest) + if (!version) { + return; + } + + return github.rest.packages.deletePackageVersionForOrg({ package_type: "container", package_name: package_name, org: org, package_version_id: version.id}) + })) + + + await Promise.all(oldSnapshotVersions.map((v) => { + return github.rest.packages.deletePackageVersionForOrg({ package_type: "container", package_name: package_name, org: org, package_version_id: v.id}) + })) diff --git a/.github/workflows/package-indexer-checks.yml b/.github/workflows/package-indexer-checks.yml index 2d1aeb6099..18aa2cf017 100644 --- a/.github/workflows/package-indexer-checks.yml +++ b/.github/workflows/package-indexer-checks.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout source code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build docker image run: | diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 6b82cf5e0f..2c3d701473 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -10,8 +10,8 @@ jobs: create-source-tarball: runs-on: ubuntu-latest steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v3 + - name: Checkout AxoSyslog source + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/publish-docker-image.yml b/.github/workflows/publish-docker-image.yml deleted file mode 100644 index 523e2faa3e..0000000000 --- a/.github/workflows/publish-docker-image.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Publish Docker image - - -on: - workflow_call: - inputs: - pkg-type: - required: true - type: string # stable / nightly - secrets: - dockerhub-username: - required: true - dockerhub-password: - required: true - - -env: - DOCKER_IMAGE_NAME: balabit/syslog-ng - - -jobs: - publish-docker-image: - name: Publish syslog-ng Docker image - if: github.repository_owner == 'syslog-ng' - runs-on: ubuntu-latest - steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v3 - - - name: Log in to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.dockerhub-username }} - password: ${{ secrets.dockerhub-password }} - - - name: Extract metadata (syslog-ng version) for Docker - if: inputs.pkg-type == 'stable' - id: stable-tags - uses: docker/metadata-action@v3 - with: - images: ${{ env.DOCKER_IMAGE_NAME }} - tags: type=match,pattern=syslog-ng-(.*),group=1 - sep-tags: ',' - - - name: Compose Docker image tags - id: tags - run: | - if [[ '${{ inputs.pkg-type }}' = 'stable' ]]; then - TAGS='${{ steps.stable-tags.outputs.tags }}' - elif [[ '${{ inputs.pkg-type }}' = 'nightly' ]]; then - TAGS="${DOCKER_IMAGE_NAME}:nightly" - else - echo Unexpected input: pkg-type=${{ inputs.pkg-type }} - false - fi - - . .github/workflows/gh-tools.sh - gh_output TAGS - - - name: Build and push Docker image - uses: docker/build-push-action@v2 - with: - context: docker/ - push: true - tags: ${{ steps.tags.outputs.TAGS }} - build-args: PKG_TYPE=${{ inputs.pkg-type }} diff --git a/.github/workflows/stable-release.yml b/.github/workflows/stable-release.yml index fea127da35..2a82705bc0 100644 --- a/.github/workflows/stable-release.yml +++ b/.github/workflows/stable-release.yml @@ -1,25 +1,25 @@ -# Please note that the syslog-ng git repository is not available in this workflow. +# Please note that the AxoSyslog git repository is not available in this workflow. # It means that certain convenience/helper functions are not available (e.g. gh_output). -# This is intentional as syslog-ng will be acquired from the tarball. +# This is intentional as AxoSyslog will be acquired from the tarball. -name: Stable release +name: AxoSyslog stable on: workflow_dispatch: push: tags: - - 'syslog-ng-*' + - 'axosyslog-[0-9]+*' jobs: pre-check: runs-on: ubuntu-latest - if: github.repository_owner == 'syslog-ng' + if: github.repository_owner == 'axoflow' steps: - name: Validate tag run: | - if [[ "${{ github.ref }}" != refs/tags/syslog-ng-* ]]; then - echo "Please start the workflow on a 'syslog-ng-*' tag" + if [[ "${{ github.ref }}" != refs/tags/axosyslog-[0-9]+* ]]; then + echo "Please start the workflow on a 'axosyslog-[0-9]+*' tag" false fi @@ -35,7 +35,7 @@ jobs: id: find-and-export-run-id run: | DRAFT_RELEASE_RUN_ID=$(gh run list \ - --repo "${{ github.repository_owner }}/syslog-ng" \ + --repo "${{ github.repository_owner }}/axosyslog" \ --workflow "Draft release" \ --json "status,conclusion,updatedAt,databaseId" \ --jq '[ .[] | select(.status=="completed") | select(.conclusion=="success") ] | max_by(.updatedAt) | .databaseId') @@ -47,28 +47,62 @@ jobs: echo "DRAFT_RELEASE_RUN_ID=${DRAFT_RELEASE_RUN_ID}" >> $GITHUB_OUTPUT - index-packages: + # index-packages: + # needs: find-draft-release-run + # uses: ./.github/workflows/index-packages.yml + # with: + # pkg-type: stable + # run-id: ${{ needs.find-draft-release-run.outputs.DRAFT_RELEASE_RUN_ID }} + # secrets: + # config-base64: ${{ secrets.PACKAGE_INDEXER_CONFIG_BASE64 }} + # gpg-key-base64: ${{ secrets.PACKAGE_INDEXER_GPG_KEY_BASE64 }} + # gpg-key-passphrase: ${{ secrets.PACKAGE_INDEXER_GPG_KEY_PASSPHRASE }} + + # test-packages: + # needs: index-packages + # uses: ./.github/workflows/test-apt-packages.yml + # with: + # pkg-type: stable + + # TODO integrate axosyslog-modules with the source tree and remove this + axosyslog-modules: + name: axosyslog-modules needs: find-draft-release-run - uses: ./.github/workflows/index-packages.yml - with: - pkg-type: stable - run-id: ${{ needs.find-draft-release-run.outputs.DRAFT_RELEASE_RUN_ID }} - secrets: - config-base64: ${{ secrets.PACKAGE_INDEXER_CONFIG_BASE64 }} - gpg-key-base64: ${{ secrets.PACKAGE_INDEXER_GPG_KEY_BASE64 }} - gpg-key-passphrase: ${{ secrets.PACKAGE_INDEXER_GPG_KEY_PASSPHRASE }} + runs-on: ubuntu-latest + outputs: + version: ${{ steps.unpack_tag.outputs.group1 }} + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Regex matching + uses: kaisugi/action-regex-match@v1.0.0 + id: unpack_tag + with: + text: ${{ github.ref }} + regex: 'refs/tags/axosyslog-(.*)' + + - name: Create AxoSyslog modules tarball + working-directory: docker + run: | + tar -czvf python-modules.tar.gz python-modules/ + + - name: Store axosyslog-modules tarball as artifact + uses: actions/upload-artifact@v4 + with: + name: axosyslog-modules-tarball + path: docker/python-modules.tar.gz - test-packages: - needs: index-packages - uses: ./.github/workflows/test-apt-packages.yml + publish-packages: + uses: ./.github/workflows/axosyslog-packages.yml + needs: axosyslog-modules with: - pkg-type: stable + repo: axoflow/axosyslog + version: ${{ needs.axosyslog-modules.outputs.version }} - publish-docker-image: - needs: test-packages - uses: ./.github/workflows/publish-docker-image.yml + publish-image: + uses: ./.github/workflows/axosyslog-docker.yml + needs: axosyslog-modules with: pkg-type: stable - secrets: - dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }} - dockerhub-password: ${{ secrets.DOCKERHUB_PASSWORD }} + axosyslog-modules-artifact: axosyslog-modules-tarball diff --git a/.github/workflows/trigger-publish-docker-image.yml b/.github/workflows/trigger-publish-docker-image.yml deleted file mode 100644 index ebc814e7a3..0000000000 --- a/.github/workflows/trigger-publish-docker-image.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Trigger Publish Docker image - - -on: - workflow_call: - - -jobs: - pre-check: - runs-on: ubuntu-latest - steps: - - name: Validate tag - run: | - if [[ "${{ github.ref }}" != refs/tags/syslog-ng-* ]]; then - echo "Please start the workflow on a 'syslog-ng-*' tag" - false - fi - - publish-docker-image: - needs: pre-check - uses: ./.github/workflows/publish-docker-image.yml - secrets: - dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }} - dockerhub-password: ${{ secrets.DOCKERHUB_PASSWORD }} diff --git a/.github/workflows/upload-packages.yml b/.github/workflows/upload-packages.yml index 78b857fd7c..43ce084c74 100644 --- a/.github/workflows/upload-packages.yml +++ b/.github/workflows/upload-packages.yml @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest - if: github.repository_owner == 'syslog-ng' + if: github.repository_owner == 'axoflow' strategy: matrix: diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 967c869a2d..107a5effad 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -1,6 +1,6 @@ ########################################################################################################### # -# This job creates a version bump branch based on master, and opens a PR from it. +# This job creates a version bump branch based on main, and opens a PR from it. # # The branch will have the version bumped in all necessary parts of the code, # and it will generate the NEWS.md content from the NEWS snippets. @@ -12,7 +12,7 @@ # The job cannot be started, if there is an open PR with the version given. # # Manual steps: -# 1. Navigate to https://github.com/syslog-ng/syslog-ng/actions. +# 1. Navigate to https://github.com/axoflow/axosyslog/actions. # 2. Choose the "Version bump" job. # 3. Click "Run workflow". # 4. Fill the new release version, and click "Run workflow". @@ -37,10 +37,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.PAT_FOR_ACTIONS }} RELEASE_VERSION: ${{ github.event.inputs.release_version }} VERSION_BUMP_BRANCH: version/${{ github.event.inputs.release_version }} - CURRENT_RUN_URL: https://github.com/${{ github.repository_owner }}/syslog-ng/actions/runs/${{ github.run_id }} + CURRENT_RUN_URL: https://github.com/${{ github.repository_owner }}/axosyslog/actions/runs/${{ github.run_id }} steps: - - name: Checkout syslog-ng source - uses: actions/checkout@v3 + - name: Checkout AxoSyslog source + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -80,8 +80,8 @@ jobs: - name: Upload tarball uses: actions/upload-artifact@v3 with: - name: syslog-ng-${{ env.RELEASE_VERSION }} - path: dbld/release/${{ env.RELEASE_VERSION }}/syslog-ng-${{ env.RELEASE_VERSION }}.tar.gz + name: axosyslog-${{ env.RELEASE_VERSION }} + path: dbld/release/${{ env.RELEASE_VERSION }}/axosyslog-${{ env.RELEASE_VERSION }}.tar.gz - name: Open Pull Request run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a0fa66b5b..409a316f45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ set(CMAKE_MACOSX_RPATH 1) # which point to directories outside the build tree to the install RPATH set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) -project(syslog-ng C) +project(axosyslog C) option(ENABLE_CPP "Enable C++" ON) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index faa4e70672..fb318d0a95 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ -# Contributing to syslog-ng +# Contributing to AxoSyslog -syslog-ng is developed as a community project, and relies on -volunteers to produce syslog-ng. Reporting bugs, testing changes, +AxoSyslog is developed as a community project, and relies on +volunteers to produce AxoSyslog. Reporting bugs, testing changes, writing code, or simply providing feedback are all important contributions. This guide provides guidelines to make contributing easier. @@ -17,7 +17,7 @@ easier. ## Issues -One of the easiest ways to contribute to the development of syslog-ng +One of the easiest ways to contribute to the development of AxoSyslog is to participate in the discussions about features, bugs and design. Some of these discussions started on the [mailing list][ar:mailing-list], some in the @@ -29,7 +29,7 @@ feedback - but pretty much any open issue can be a good start! When you report a bug, it is important to share as much relevant information as you can, including: - * version number of syslog-ng used; + * version number of AxoSyslog used; * the platform (operating system and its version, architecture, etc); * a backtrace from the core file if the issue is a crash (this can be invaluable); @@ -45,7 +45,7 @@ around them. We use the same [issue tracker][ar:issue-tracker] to handle features requests (they're all tagged with the -[`enhancement`](https://github.com/syslog-ng/syslog-ng/labels/enhancement) +[`enhancement`](https://github.com/axoflow/axosyslog/labels/enhancement) label. You are welcome to share your ideas on existing requests, or to submit your own. @@ -62,10 +62,10 @@ If you plan to open a pull request, please follow the guideline below. ### Branch -You need to fork syslog-ng in github, and create a working branch from master in your fork. +You need to fork AxoSyslog on GitHub, and create a working branch from main in your fork. After writing the code, just before opening the pull request, -make sure your working branch is rebased against master. +make sure your working branch is rebased against main. ### PR description In the description, please explain (if applicable): @@ -105,14 +105,14 @@ you can use `some-id+yourgithubusername@users.noreply.github.com`, which is automatically generated and tracked by github. You can check the exact address in your github settings->email->primary email address, if you enabled email privacy. -`module` refers to the part of syslog-ng that the patch intends to change. For example +`module` refers to the part of AxoSyslog that the patch intends to change. For example python, redis, persist, scratch-buffers, etc. #### Patches We are using a coding style very similar to [GNU Coding Standards](https://www.gnu.org/prep/standards/standards.html#Writing-C) -for syslog-ng. +for AxoSyslog. You can use `make style-check` or `make style-format` to check or format automatically your code. These commands are executed by our CI as well. @@ -152,7 +152,7 @@ See news/README.md for more information. ### Testing -If possible please add tests for your change. You can add unit tests in c (tests directory in most of syslog-ng modules), +If possible please add tests for your change. You can add unit tests in c (tests directory in most of AxoSyslog modules), or there is an initiative so that contributors write tests in python (for now the feature set is limited). You can check `tests/light/functional_tests/source_drivers/generator_source/` as an example. @@ -193,22 +193,15 @@ You should observe some of the existing files for reference. ## Additional resources -For additional information, have a look at the -[syslog-ng.org](http://www.syslog-ng.org/) website, which is a -recommended starting point for finding out more about syslog-ng. - -To contact us, visit the [mailing list][ar:mailing-list] where you can +To contact us, visit our [Discord server][ar:discord] where you can ask questions, and discuss your feature requests with a wider audience. -We also have a [Gitter channel][ar:gitter], where developers hang out. - We use [GitHub issues][ar:issue-tracker] to track issues, feature requests and patches. We are also using [GitHub Actions][ar:github-actions] for automatic testing. - [ar:gitter]: https://gitter.im/syslog-ng/syslog-ng - [ar:mailing-list]: http://lists.balabit.com/mailman/listinfo/syslog-ng - [ar:issue-tracker]: https://github.com/syslog-ng/syslog-ng/issues - [ar:issues:good-first-issue]: https://github.com/syslog-ng/syslog-ng/labels/good%20first%20issue - [ar:github-actions]: https://github.com/syslog-ng/syslog-ng/actions + [ar:discord]: https://discord.gg/E65kP9aZGm + [ar:issue-tracker]: https://github.com/axoflow/axosyslog/issues + [ar:issues:good-first-issue]: https://github.com/axoflow/axosyslog/labels/good%20first%20issue + [ar:github-actions]: https://github.com/axoflow/axosyslog/actions diff --git a/COPYING b/COPYING index 302147a750..92630933ab 100644 --- a/COPYING +++ b/COPYING @@ -1,5 +1,6 @@ Copyright (c) 2002-2015 Balabit Copyright (c) 1996-2015 Balázs Scheidler +Copyright (c) 2023-2024 Axoflow syslog-ng is licensed under the combination of the GPL and LGPL licenses. @@ -33,13 +34,12 @@ syslog-ng/ syslog-ng-ctl/ persist-tool/ tests/loggen/ -docker/ -The syslog-ng modules (modules/ and scl/ subdirectories, except the ones that -declare LGPL-2.1-or-later in their license notices) is free software; you can -redistribute it and/or modify it under the terms of the GNU General Public -License version 2 as published by the Free Software Foundation, -or (at your option) any later version +The syslog-ng modules (modules/, docker/, charts/, and scl/ subdirectories, +except the ones that declare LGPL-2.1-or-later in their license notices) +is free software; you can redistribute it and/or modify it under the terms of +the GNU General Public License version 2 as published by the +Free Software Foundation, or (at your option) any later version (please refer to the file GPL.txt for more details). FAQ: diff --git a/Makefile.am b/Makefile.am index f11fe623a7..e75c135c1b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -250,6 +250,8 @@ if ENABLE_TESTING include libtest/Makefile.am endif include lib/Makefile.am +include charts/Makefile.am +include docker/Makefile.am include modules/Makefile.am include syslog-ng/Makefile.am include syslog-ng-ctl/Makefile.am diff --git a/README.md b/README.md index bfa1e32d60..124005a898 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,13 @@ # AxoSyslog - a cloud-native distribution of syslog-ng by Axoflow -This repository contains the cloud-ready syslog-ng images and Helm charts + +[![Discord](https://img.shields.io/discord/1082023686028148877?label=Discord&logo=discord&logoColor=white)](https://discord.gg/qmq53uBm2c) +[![Build Status](https://github.com/axoflow/axosyslog/actions/workflows/devshell.yml/badge.svg)](https://github.com/axoflow/axosyslog/actions/workflows/devshell.yml) +[![Nightly](https://github.com/axoflow/axosyslog/actions/workflows/nightly-release.yml/badge.svg)](https://github.com/axoflow/axosyslog/actions/workflows/nightly-release.yml) +[![Binary packages](https://github.com/axoflow/axosyslog/actions/workflows/packages.yml/badge.svg)](https://github.com/axoflow/axosyslog/actions/workflows/packages.yml) + +This repository contains the AxoSyslog source tree, cloud-ready syslog-ng images, and Helm charts created and maintained by [Axoflow](https://axoflow.com). ## Container images diff --git a/charts/LICENSE b/charts/LICENSE deleted file mode 100644 index d4141031aa..0000000000 --- a/charts/LICENSE +++ /dev/null @@ -1,281 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - diff --git a/charts/Makefile.am b/charts/Makefile.am new file mode 100644 index 0000000000..ae3a6a6fb6 --- /dev/null +++ b/charts/Makefile.am @@ -0,0 +1,17 @@ +EXTRA_DIST += \ + charts/axosyslog/Chart.yaml \ + charts/axosyslog/.helmignore \ + charts/axosyslog/README.md \ + charts/axosyslog/templates/syslog-statefulset.yaml \ + charts/axosyslog/templates/NOTES.txt \ + charts/axosyslog/templates/podmonitor.yaml \ + charts/axosyslog/templates/service.yaml \ + charts/axosyslog/templates/clusterrole.yaml \ + charts/axosyslog/templates/serviceaccount.yaml \ + charts/axosyslog/templates/syslog-config.yaml \ + charts/axosyslog/templates/_helpers.tpl \ + charts/axosyslog/templates/collector-daemonset.yaml \ + charts/axosyslog/templates/scc.yaml \ + charts/axosyslog/templates/clusterrolebinding.yaml \ + charts/axosyslog/templates/collector-config.yaml \ + charts/axosyslog/values.yaml diff --git a/cmake/print_config_summary.cmake b/cmake/print_config_summary.cmake index f887217ac0..cc6c630f6e 100644 --- a/cmake/print_config_summary.cmake +++ b/cmake/print_config_summary.cmake @@ -135,7 +135,7 @@ function(print_config_summary) list (REMOVE_DUPLICATES _variableNames) _print_separator() - message(NOTICE "syslog-ng Open Source Edition ${SYSLOG_NG_VERSION} configured") + message(NOTICE "AxoSyslog ${SYSLOG_NG_VERSION} configured") _print_separator() if(SUMMARY_FULL) diff --git a/configure.ac b/configure.ac index b0fc4a423d..cc7916b938 100644 --- a/configure.ac +++ b/configure.ac @@ -32,7 +32,7 @@ dnl BINARY_BRANCH - the value is added to all source/binary packages dnl SOURCE_REVISION - Revision of the source-tree, will added to the version string dnl -AC_INIT([syslog-ng], m4_esyscmd_s([scripts/version.sh])) +AC_INIT([axosyslog], m4_esyscmd_s([scripts/version.sh])) AC_CONFIG_SRCDIR([syslog-ng/main.c]) AC_CONFIG_MACRO_DIR([m4]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -2375,7 +2375,7 @@ AC_OUTPUT(dist.conf ) echo -echo "syslog-ng Open Source Edition $PACKAGE_VERSION configured" +echo "AxoSyslog $PACKAGE_VERSION configured" echo " Edition settings:" echo " Release type : $RELEASE_TYPE" echo " Pretty version : $BROCHURE_VERSION" diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 89d768ef50..171544ff18 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am @@ -88,21 +88,7 @@ EXTRA_DIST += \ \ contrib/scripts/config-graph-json-to-dot.py \ \ - contrib/valgrind/syslog-ng.supp \ - \ - contrib/syslog-ng-helm-chart/.helmignore \ - contrib/syslog-ng-helm-chart/values.yaml \ - contrib/syslog-ng-helm-chart/Chart.yaml \ - contrib/syslog-ng-helm-chart/templates/NOTES.txt \ - contrib/syslog-ng-helm-chart/templates/_helpers.tpl \ - contrib/syslog-ng-helm-chart/templates/compress-job.yaml \ - contrib/syslog-ng-helm-chart/templates/config.yaml \ - contrib/syslog-ng-helm-chart/templates/deployment.yaml \ - contrib/syslog-ng-helm-chart/templates/hpa.yaml \ - contrib/syslog-ng-helm-chart/templates/pvc.yaml \ - contrib/syslog-ng-helm-chart/templates/service.yaml \ - contrib/syslog-ng-helm-chart/templates/serviceaccount.yaml \ - contrib/syslog-ng-helm-chart/templates/tests/test-connection.yaml + contrib/valgrind/syslog-ng.supp if ENABLE_SYSTEMD_UNIT_INSTALL systemdsystemunit_DATA = contrib/systemd/syslog-ng@.service diff --git a/contrib/get-github-actions-status.py b/contrib/get-github-actions-status.py index 3d1b7dcf96..b4e1f3e5f3 100755 --- a/contrib/get-github-actions-status.py +++ b/contrib/get-github-actions-status.py @@ -8,7 +8,7 @@ def get_workflow_runs(workflow): - url = "https://api.github.com/repos/syslog-ng/syslog-ng/actions/workflows/{}.yml/runs?branch=master".format(workflow) + url = "https://api.github.com/repos/axoflow/axosyslog/actions/workflows/{}.yml/runs?branch=main".format(workflow) request = urllib.request.Request(url, None, {}) try: with urllib.request.urlopen(request) as response: diff --git a/contrib/syslog-ng-helm-chart/.helmignore b/contrib/syslog-ng-helm-chart/.helmignore deleted file mode 100644 index 0e8a0eb36f..0000000000 --- a/contrib/syslog-ng-helm-chart/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/contrib/syslog-ng-helm-chart/Chart.yaml b/contrib/syslog-ng-helm-chart/Chart.yaml deleted file mode 100644 index 485d0df9e2..0000000000 --- a/contrib/syslog-ng-helm-chart/Chart.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -name: syslog-ng -description: Syslog-ng -version: 0.2 -appVersion: 3.27.1 -maintainers: - - name: zakkg3 -sources: - - https://github.com/syslog-ng/syslog-ng -keywords: - - Syslog - - syslog-ng - - logrotate diff --git a/contrib/syslog-ng-helm-chart/LICENSE b/contrib/syslog-ng-helm-chart/LICENSE deleted file mode 100644 index e495e7985d..0000000000 --- a/contrib/syslog-ng-helm-chart/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (c) 2020 Nicolas Kowenski - -The syslog-ng Helm chart contained in this directory is free software; you can -redistribute it and/or modify it under the terms of the GNU Lesser General -Public License as published by the Free Software Foundation; either version 2.1 -of the License, or (at your option) any later version (please refer to the file -LGPL.txt for more details). diff --git a/contrib/syslog-ng-helm-chart/templates/NOTES.txt b/contrib/syslog-ng-helm-chart/templates/NOTES.txt deleted file mode 100644 index 902a2f9a58..0000000000 --- a/contrib/syslog-ng-helm-chart/templates/NOTES.txt +++ /dev/null @@ -1,19 +0,0 @@ -1. syslog-ng deployment. - -{{- if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "syslog-ng.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "syslog-ng.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "syslog-ng.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "syslog-ng.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Syslogng watch on tcp 601 and udp 514 port" -{{- end }} - -######################################################## -# Syslogng watch on tcp 601 and udp 514 port # -######################################################## diff --git a/contrib/syslog-ng-helm-chart/templates/_helpers.tpl b/contrib/syslog-ng-helm-chart/templates/_helpers.tpl deleted file mode 100644 index 44c2ccab6c..0000000000 --- a/contrib/syslog-ng-helm-chart/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "syslog-ng.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "syslog-ng.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "syslog-ng.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "syslog-ng.labels" -}} -helm.sh/chart: {{ include "syslog-ng.chart" . }} -{{ include "syslog-ng.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "syslog-ng.selectorLabels" -}} -app.kubernetes.io/name: {{ include "syslog-ng.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "syslog-ng.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "syslog-ng.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/contrib/syslog-ng-helm-chart/templates/compress-job.yaml b/contrib/syslog-ng-helm-chart/templates/compress-job.yaml deleted file mode 100644 index 2c461a8949..0000000000 --- a/contrib/syslog-ng-helm-chart/templates/compress-job.yaml +++ /dev/null @@ -1,60 +0,0 @@ -{{- if .Values.compressor.enabled }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: job-script -data: - entrypoint.sh: |- - #!/bin/bash - ls -lh /var/log/*-syslog - for filename in /var/log/*-syslog; do - if [[ $(find "$filename" -mtime +{{ .Values.compressor.retention_days }} -print) ]]; then - echo "$filename is older than {{ .Values.compressor.retention_days }} days, Compressing." - tar -zcvf "$filename"-$(date +%d-%m-%y).tar.gz $filename - rm $filename - else - echo skippig $filename not older than {{ .Values.compressor.retention_days }} days. - fi - done ---- -apiVersion: batch/v1beta1 -kind: CronJob -metadata: - name: {{ include "syslog-ng.fullname" . }}-compressor -spec: - schedule: "{{ .Values.compressor.schedule }}" - jobTemplate: - spec: - template: - spec: - restartPolicy: OnFailure - containers: - - name: compress - image: "ubuntu:20.10" - resources: - limits: - cpu: 500m - memory: 2048Mi - command: - - /bin/entrypoint.sh - volumeMounts: - - name: configmap-volume - mountPath: /bin/entrypoint.sh - readOnly: true - subPath: entrypoint.sh - {{- if .Values.storage.enable }} - - mountPath: /var/log - name: logs - {{- end }} - volumes: - - name: configmap-volume - configMap: - defaultMode: 0700 - name: job-script - {{- if .Values.storage.enable }} - - name: logs - persistentVolumeClaim: - claimName: {{ include "syslog-ng.fullname" . }}-pvc - {{- end }} -{{- end }} diff --git a/contrib/syslog-ng-helm-chart/templates/config.yaml b/contrib/syslog-ng-helm-chart/templates/config.yaml deleted file mode 100644 index bfd93d76bd..0000000000 --- a/contrib/syslog-ng-helm-chart/templates/config.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - labels: - {{- include "syslog-ng.labels" . | nindent 4 }} - name: {{ include "syslog-ng.fullname" . }} -data: - syslog-ng.conf: {{ tpl (toYaml .Values.config) . | indent 4 }} diff --git a/contrib/syslog-ng-helm-chart/templates/deployment.yaml b/contrib/syslog-ng-helm-chart/templates/deployment.yaml deleted file mode 100644 index 946a89ace1..0000000000 --- a/contrib/syslog-ng-helm-chart/templates/deployment.yaml +++ /dev/null @@ -1,71 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "syslog-ng.fullname" . }} - labels: - {{- include "syslog-ng.labels" . | nindent 4 }} -spec: -{{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} -{{- end }} - selector: - matchLabels: - {{- include "syslog-ng.selectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - checksum/config: {{ tpl (toYaml .Values.config) . | sha256sum }} - {{- with .Values.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "syslog-ng.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: tcp-port - containerPort: 601 - protocol: TCP - - name: udp-port - containerPort: 514 - protocol: UDP - volumeMounts: - - mountPath: /etc/syslog-ng/syslog-ng.conf - name: config - subPath: syslog-ng.conf - {{- if .Values.storage.enable }} - - mountPath: /var/log - name: logs - {{- end }} - volumes: - - name: config - configMap: - name: {{ include "syslog-ng.fullname" . }} - {{- if .Values.storage.enable }} - - name: logs - persistentVolumeClaim: - claimName: {{ include "syslog-ng.fullname" . }}-pvc - {{- end }} - - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/contrib/syslog-ng-helm-chart/templates/hpa.yaml b/contrib/syslog-ng-helm-chart/templates/hpa.yaml deleted file mode 100644 index c319ed0c55..0000000000 --- a/contrib/syslog-ng-helm-chart/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "syslog-ng.fullname" . }} - labels: - {{- include "syslog-ng.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "syslog-ng.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/contrib/syslog-ng-helm-chart/templates/pvc.yaml b/contrib/syslog-ng-helm-chart/templates/pvc.yaml deleted file mode 100644 index db2199fb9d..0000000000 --- a/contrib/syslog-ng-helm-chart/templates/pvc.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Values.storage.enable }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ include "syslog-ng.fullname" . }}-pvc -spec: - accessModes: - - ReadWriteMany - resources: - requests: - storage: {{ .Values.storage.size }} - storageClassName: {{ .Values.storage.storageClass }} -{{- end }} diff --git a/contrib/syslog-ng-helm-chart/templates/service.yaml b/contrib/syslog-ng-helm-chart/templates/service.yaml deleted file mode 100644 index e383b7f06b..0000000000 --- a/contrib/syslog-ng-helm-chart/templates/service.yaml +++ /dev/null @@ -1,27 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "syslog-ng.fullname" . }} - labels: - {{- include "syslog-ng.labels" . | nindent 4 }} -spec: - {{- if eq .Values.service.type "externalip" }} - - {{- with .Values.service.externalIPs }} - externalIPs: - {{- toYaml . | nindent 3 }} - {{- end }} - {{- else}} - type: {{ .Values.service.type }} - {{- end }} - ports: - - name: udp-port - port: 514 - targetPort: 514 - protocol: UDP - - name: tcp-port - port: 601 - targetPort: 601 - protocol: TCP - selector: - {{- include "syslog-ng.selectorLabels" . | nindent 4 }} diff --git a/contrib/syslog-ng-helm-chart/templates/serviceaccount.yaml b/contrib/syslog-ng-helm-chart/templates/serviceaccount.yaml deleted file mode 100644 index 6284249ade..0000000000 --- a/contrib/syslog-ng-helm-chart/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "syslog-ng.serviceAccountName" . }} - labels: - {{- include "syslog-ng.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/contrib/syslog-ng-helm-chart/templates/tests/test-connection.yaml b/contrib/syslog-ng-helm-chart/templates/tests/test-connection.yaml deleted file mode 100644 index c35c1362d6..0000000000 --- a/contrib/syslog-ng-helm-chart/templates/tests/test-connection.yaml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "syslog-ng.fullname" . }}-test-connection" - labels: - {{- include "syslog-ng.labels" . | nindent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - automountServiceAccountToken: false - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "syslog-ng.fullname" . }}:{{ .Values.service.port }}'] - resources: - limits: - cpu: 100m - memory: 256Mi - restartPolicy: Never diff --git a/contrib/syslog-ng-helm-chart/values.yaml b/contrib/syslog-ng-helm-chart/values.yaml deleted file mode 100644 index 45679a1c60..0000000000 --- a/contrib/syslog-ng-helm-chart/values.yaml +++ /dev/null @@ -1,108 +0,0 @@ -# Default values for syslog-ng. - -replicaCount: 1 - -image: - repository: balabit/syslog-ng - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "3.27.1" - -# By default, the network() driver binds to 0.0.0.0, meaning that it listens -# on every available IPV4 interface on the TCP/601 port. - -config: | - @version: 3.27 - @include "scl.conf" - options { - # enable or disable directory creation for destination files - create_dirs(yes); - - # keep hostnames from source host - keep_hostname(yes); - - # use ISO8601 timestamps - ts_format(iso); - }; - log { - source { - network(); - }; - destination { file("/var/log/${YEAR}-${MONTH}-syslog"); }; - }; - -storage: - enable: True - storageClass: "" - size: 500Gi - -# Enable compressor to run a cron-job to compress files in /var/log/*-syslog older than retention_days -# it also delete the plain-text file in order to keep the folder size as low as possible. -# (if changes destination in server.config other than `/var/log/${YEAR}-${MONTH}-syslog` be aware you could breake this) -compressor: - enabled: True - #“At 04:25 on day 1 and 15, every month every year” - schedule: "25 4 1,15 * *" - retention_days: 120 - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: false - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -podSecurityContext: {} - # fsGroup: 2000 - -# Syslog-ng manages its own capabilities as well, just make sure the two doesn't collide. -securityContext: {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -# syslog-ng have fixed ports tcp 601 and udp 514 -service: - type: ClusterIP - # use externalip for a pre routede exter al ip. - # TO-DO: LoadBalancer - # type: externalip - # externalIPs: - # - 10.205.212.12 - - -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 1 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} diff --git a/dbld/Makefile.am b/dbld/Makefile.am index 99382a5f2e..b8abf56ae3 100644 --- a/dbld/Makefile.am +++ b/dbld/Makefile.am @@ -38,7 +38,6 @@ EXTRA_DIST += \ dbld/images/ubuntu-noble.dockerfile \ dbld/images/ubuntu-lunar.dockerfile \ dbld/images/ubuntu-mantic.dockerfile \ - dbld/images/kira.dockerfile \ dbld/images/tarball.dockerfile \ dbld/images/hooks/build \ dbld/images/README.md \ diff --git a/dbld/README.md b/dbld/README.md index b2ef5fdaec..8f50d4bf5e 100644 --- a/dbld/README.md +++ b/dbld/README.md @@ -1,6 +1,6 @@ -## Syslog-ng development/release environment powered by Docker +## AxoSyslog development/release environment powered by Docker With the help of the following tool you can -- compile syslog-ng from source code +- compile AxoSyslog from source code - generate tarball (snapshot / release) - create OS specific packages @@ -8,7 +8,7 @@ in an isolated Docker container based environment. ## Usage information ```bash -whoami@host:~/syslog-ng$ dbld/rules [help] +whoami@host:~/axosyslog$ dbld/rules [help] ``` dbld/rules is the general entrypoint for the tool, specifying multiple @@ -17,25 +17,25 @@ command (without parameters it will run without any side effect), or read the source code on [GitHub](rules). Almost every `dbld/rules` command runs in a Docker container. You can use -the pre-built containers from [GitHub](https://github.com/syslog-ng?tab=packages&repo_name=syslog-ng) +the pre-built containers from [GitHub](https://github.com/orgs/axoflow/packages) or build your own images with the `dbld/rules image-` command. The source code and build products are mounted externally in the following locations: -- **/source** -> syslog-ng/* -- **/dbld** -> syslog-ng/dbld -- **/build** -> syslog-ng/dbld/build -- **/install** -> syslog-ng/dbld/install +- **/source** -> axosyslog/* +- **/dbld** -> axosyslog/dbld +- **/build** -> axosyslog/dbld/build +- **/install** -> axosyslog/dbld/install ## Examples -### Building syslog-ng from tarball using the 'tarball' image +### Building AxoSyslog from tarball using the 'tarball' image ```bash $ dbld/rules tarball $ Your tarball is in /build, also available on the host in $(top_srcdir)/dbld/build $ cd dbld/build -$ tar -xzvf syslog-ng*.tar.gz -$ ./syslog-ng-*/configure +$ tar -xzvf axosyslog*.tar.gz +$ ./axosyslog-*/configure $ make ``` @@ -45,11 +45,11 @@ You can also build a DEB using: $ dbld/rules deb-ubuntu-focal ``` -You can find the resulting debs in `$HOME/syslog-ng/dbld/build`. +You can find the resulting debs in `$HOME/axosyslog/dbld/build`. -### Hacking on syslog-ng itself +### Hacking on AxoSyslog itself -You can also use the docker based shell to hack on syslog-ng by configuring +You can also use the docker based shell to hack on AxoSyslog by configuring and building manually. You can use any of the supported OSes as shells (e.g. shell-ubuntu-noble or shell-almalinux-8) and there's "devshell" that contains a few extra tools, often needed during development. @@ -73,29 +73,29 @@ $ make check $ make install ``` -If the compilation and installation was successful you can run syslog-ng with the following command: +If the compilation and installation was successful you can run AxoSyslog with the following command: ```bash -$ /install/syslog-ng/sbin/syslog-ng -Fedv +$ /install/sbin/syslog-ng -Fedv ``` ### Preparing a release -The dbld tools also allow to prepare for a syslog-ng release. By default, +The dbld tools also allow to prepare for an AxoSyslog release. By default, when you generate a tarball/deb/rpm, dbld would generate a "snapshot" version (including a git commit id) to avoid mismatching it with a "real" release. If you instead want to do an "official-looking" release (e.g. 3.28.1 instead of 3.27.1.34.g83096fa.dirty), this is the procedure you have to -follow. The syslog-ng team is using this to perform releases. +follow. The AxoSyslog team is using this to perform releases. ### Version bumps First of all, you will need to commit a patch that bumps the version number in a couple of places (e.g. the VERSION file in the root directory). -Start with a git commit that you want to release (e.g the master branch), +Start with a git commit that you want to release (e.g the main branch), with no local changes. Version bumps are automated using the "prepare-release" target of diff --git a/dbld/deb b/dbld/deb index 4de750f418..03ad9d6292 100755 --- a/dbld/deb +++ b/dbld/deb @@ -8,11 +8,11 @@ function setup_dirs() { function prepare_source() { cd /build - rm -rf syslog-ng-${VERSION} - tar xf syslog-ng-${VERSION}.tar.gz + rm -rf axosyslog-${VERSION} + tar xf axosyslog-${VERSION}.tar.gz # save the tarball as .orig.tar.gz so that dpkg-buildpackage finds it as the original source - cp syslog-ng-${VERSION}.tar.gz syslog-ng_${VERSION}.orig.tar.gz + cp axosyslog-${VERSION}.tar.gz axosyslog_${VERSION}.orig.tar.gz } function capture_debs() { @@ -28,7 +28,7 @@ validate_container setup_dirs prepare_source -cd syslog-ng-${VERSION} +cd axosyslog-${VERSION} if [ ! -d debian ]; then echo "You have no Debian packaging in debian/, this should already by in the tarball at this point" diff --git a/dbld/distcheck b/dbld/distcheck index b9e0583549..8a31ac47af 100755 --- a/dbld/distcheck +++ b/dbld/distcheck @@ -3,7 +3,7 @@ . /dbld/functions.sh cd /source -SYSLOGNG_DIR=syslog-ng-${VERSION} +SYSLOGNG_DIR=axosyslog-${VERSION} SYSLOGNG_TARBALL=${SYSLOGNG_DIR}.tar.gz ./autogen.sh diff --git a/dbld/images/kira.dockerfile b/dbld/images/kira.dockerfile deleted file mode 100644 index 6d0ed33e99..0000000000 --- a/dbld/images/kira.dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -ARG CONTAINER_REGISTRY -FROM $CONTAINER_REGISTRY/dbld-ubuntu-focal -LABEL maintainer="Andras Mitzki , Laszlo Szemere , Balazs Scheidler " - -ARG ARG_IMAGE_PLATFORM -ARG COMMIT -ENV IMAGE_PLATFORM ${ARG_IMAGE_PLATFORM} -LABEL COMMIT=${COMMIT} - -RUN /dbld/builddeps install_apt_packages -RUN /dbld/builddeps install_bison_from_source -RUN /dbld/builddeps install_pip2 -RUN /dbld/builddeps install_pip_packages -RUN /dbld/builddeps set_jvm_paths diff --git a/dbld/packages.manifest b/dbld/packages.manifest index 6530b91e21..78bcfa9f47 100644 --- a/dbld/packages.manifest +++ b/dbld/packages.manifest @@ -120,28 +120,6 @@ libmongoc-dev [debian] ############################################################################# -############################################################################# -# Tools required to run @kira-syslogng, our testbot. -############################################################################# - -gdb [kira] -faketime [kira] -libdbd-mysql [kira] -lsb-release [kira] -lsof [kira] -netbase [kira] -netcat-openbsd [kira] -openssh-client [kira] -python-numpy [kira] -python3-numpy [kira] -python-yaml [kira] -python3-yaml [kira] -systemd-sysv [kira] -python-is-python2 [kira] -python2-dev [kira] -python2-dbg [kira] - - ############################################################################# # Development tools in our devshell. ############################################################################# diff --git a/dbld/pip_packages.manifest b/dbld/pip_packages.manifest index 637b260ce7..e69de29bb2 100644 --- a/dbld/pip_packages.manifest +++ b/dbld/pip_packages.manifest @@ -1,5 +0,0 @@ -# pip packages for kira tests -distro [kira] [python2, python3] -hy [kira] [python3] -hyrule [kira] [python3] -requests [kira] [python2, python3] diff --git a/dbld/pkg-tarball b/dbld/pkg-tarball index 8aac0c330a..93853d6fee 100755 --- a/dbld/pkg-tarball +++ b/dbld/pkg-tarball @@ -6,7 +6,7 @@ cd /source -SYSLOGNG_DIR=syslog-ng-${VERSION} +SYSLOGNG_DIR=axosyslog-${VERSION} SYSLOGNG_TARBALL=${SYSLOGNG_DIR}.tar.gz cd /build diff --git a/dbld/rpm b/dbld/rpm index f164a67030..7b20beb7b6 100755 --- a/dbld/rpm +++ b/dbld/rpm @@ -13,13 +13,13 @@ function setup_dirs() { function copy_rpm_packaging_src_files_to_build_folder() { # CzP's spec file expect these files in the pwd # where the build was initiated - rm -rf syslog-ng-${VERSION} && tar xvf syslog-ng-${VERSION}.tar.gz - find /build/syslog-ng-${VERSION}/packaging/rhel/ -type f | grep --invert-match '\.spec$' | xargs -i cp {} /build/ + rm -rf axosyslog-${VERSION} && tar xvf axosyslog-${VERSION}.tar.gz + find /build/axosyslog-${VERSION}/packaging/rhel/ -type f | grep --invert-match '\.spec$' | xargs -i cp {} /build/ } function prepare_source() { copy_rpm_packaging_src_files_to_build_folder - cp syslog-ng-${VERSION}.tar.gz $RPMBUILD_SOURCES + cp axosyslog-${VERSION}.tar.gz $RPMBUILD_SOURCES } function capture_rpms() { @@ -34,5 +34,5 @@ cd /build setup_dirs prepare_source -rpm_run_build_command rpmbuild --define '_dbld 1' -ta syslog-ng-${VERSION}.tar.gz +rpm_run_build_command rpmbuild --define '_dbld 1' -ta axosyslog-${VERSION}.tar.gz capture_rpms diff --git a/dbld/rules b/dbld/rules index 70cd804259..12f737f3cc 100755 --- a/dbld/rules +++ b/dbld/rules @@ -13,7 +13,6 @@ BUILDER_IMAGES= \ ubuntu-noble \ ubuntu-lunar \ ubuntu-mantic \ - kira \ tarball IMAGES=${BUILDER_IMAGES} devshell @@ -46,10 +45,10 @@ ROOT_DIR=$(shell pwd) DBLD_DIR=$(ROOT_DIR)/dbld BUILD_DIR=$(DBLD_DIR)/build RELEASE_DIR=$(DBLD_DIR)/release -TARBALL_BASENAME=syslog-ng-$(VERSION).tar.gz +TARBALL_BASENAME=axosyslog-$(VERSION).tar.gz TARBALL=$(BUILD_DIR)/$(TARBALL_BASENAME) GIT=$(shell which git || echo false) -GIT_RELEASE_TAG=syslog-ng-$(VERSION) +GIT_RELEASE_TAG=axosyslog-$(VERSION) CONFIGURE_OPTS=--enable-debug --enable-manpages --with-python=3 --prefix=/install $(CONFIGURE_ADD) DBLD_RULES=$(MAKE) --no-print-directory -f $(DBLD_DIR)/rules @@ -211,7 +210,6 @@ shell-%: setup images: $(foreach image,$(IMAGES), image-$(image)) image: image-$(DEFAULT_IMAGE) -image-kira: image-ubuntu-focal image-devshell: image-tarball image-tarball: image-debian-testing image-%: diff --git a/dbld/tarball b/dbld/tarball index 12c0b25e86..181c8c8784 100755 --- a/dbld/tarball +++ b/dbld/tarball @@ -3,7 +3,7 @@ . /dbld/functions.sh cd /source -SYSLOGNG_DIR=syslog-ng-${VERSION} +SYSLOGNG_DIR=axosyslog-${VERSION} SYSLOGNG_TARBALL=${SYSLOGNG_DIR}.tar.gz ./autogen.sh diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index a3fb4f6c83..0000000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -############################################################################# -# Copyright (c) 2015-2023 Balabit -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -# As an additional exemption you are allowed to compile & link against the -# OpenSSL libraries as published by the OpenSSL project. See the file -# COPYING for details. -# -############################################################################# - -FROM debian:testing -LABEL maintainer="Andras Mitzki , László Várady " -LABEL org.opencontainers.image.source="https://github.com/syslog-ng/syslog-ng" - -ARG PKG_TYPE=stable - -RUN apt-get update -qq && apt-get install -y \ - wget \ - ca-certificates \ - gnupg2 \ - && rm -rf /var/lib/apt/lists/* - -RUN wget -qO - https://ose-repo.syslog-ng.com/apt/syslog-ng-ose-pub.asc | gpg --dearmor > /usr/share/keyrings/ose-repo-archive-keyring.gpg && \ - echo "deb [signed-by=/usr/share/keyrings/ose-repo-archive-keyring.gpg] https://ose-repo.syslog-ng.com/apt/ ${PKG_TYPE} debian-testing" | tee --append /etc/apt/sources.list.d/syslog-ng-ose.list - -RUN apt-get update -qq && apt-get install -y \ - libdbd-mysql libdbd-pgsql libdbd-sqlite3 syslog-ng libjemalloc2 \ - && rm -rf /var/lib/apt/lists/* - -ADD syslog-ng.conf /etc/syslog-ng/syslog-ng.conf - -EXPOSE 514/udp -EXPOSE 601/tcp -EXPOSE 6514/tcp - -HEALTHCHECK --interval=2m --timeout=5s --start-period=30s CMD /usr/sbin/syslog-ng-ctl healthcheck --timeout 5 -ENV LD_PRELOAD /usr/lib/x86_64-linux-gnu/libjemalloc.so.2 -ENTRYPOINT ["/usr/sbin/syslog-ng", "-F"] diff --git a/docker/LICENSE b/docker/LICENSE deleted file mode 100644 index d4141031aa..0000000000 --- a/docker/LICENSE +++ /dev/null @@ -1,281 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - diff --git a/docker/Makefile.am b/docker/Makefile.am new file mode 100644 index 0000000000..717148e803 --- /dev/null +++ b/docker/Makefile.am @@ -0,0 +1,11 @@ +EXTRA_DIST += \ + docker/python-modules/webhook/__init__.py \ + docker/python-modules/webhook/scl/webhook.conf \ + docker/python-modules/webhook/source.py \ + docker/python-modules/requirements.txt \ + docker/tests/smoke.sh \ + docker/alpine.dockerfile \ + docker/apkbuild/axoflow/rootbld-repositories \ + docker/apkbuild/axoflow/axosyslog/APKBUILD \ + docker/apkbuild/axoflow/axosyslog/APKBUILD-debug.patch \ + docker/apkbuild/axoflow/axosyslog/axosyslog-python3.post-install diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index 68bcbae284..0000000000 --- a/docker/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# `balabit/syslog-ng` - * Syslog-ng is installed with all of its modules - * Within the container syslog-ng will start in foreground. This is useful because if there is some error with syslog-ng we can easily check the output console log through the `docker logs [containerID]` command - * You can use your own `syslog-ng.conf` or fall back to use the default one - -The following ports are exposed: - * Syslog UDP: 514, - * Syslog TCP: 601, - * Syslog TLS: 6514 - -Syslog-ng will listen on these ports and forwards the logs into the file -`/var/log/syslog`. You can check the default configuration in the source -repository of this image. - -Please check the syslog-ng image tags at the official docker repository to know what image versions exist [https://registry.hub.docker.com/u/balabit] - -## Using default configuration -Assume that the following ports are not used on host machine, because they can conflict: `514`, `601`: - -```bash -sudo docker run -it -p 514:514/udp -p 601:601 --name syslog-ng balabit/syslog-ng:latest -``` -By default syslog-ng will not print any debug messages to the console. If you want to see more debug messages you need to start the containers in this way: - -```bash -sudo docker run -it -p 514:514/udp -p 601:601 --name syslog-ng balabit/syslog-ng:latest -edv -``` - -## Using custom syslog-ng configuration -You can override the default configuration by mounting a configuration file under `/etc/syslog-ng/syslog-ng.conf`: - -```bash -sudo docker run -it -v "$PWD/syslog-ng.conf":/etc/syslog-ng/syslog-ng.conf balabit/syslog-ng:latest -``` - -## Reading logs from other containers -An example is used to describe how syslog-ng can read logs from other containers. - -Assume that you have already running an `apache2` container which exposes its logs as a mounted volume under "/var/log/apache2/". We will read the apache logs and send them to a remote host (`1.2.3.4:514`). The example syslog-ng configuration file is stored in the current directory as `syslog-ng.conf`. - -``` -source s_apache { - file("/var/log/apache2/access.log"); -}; - -destination d_remote { - tcp("1.2.3.4" port(514)); -}; - -log { - source(s_apache); - destination(d_remote); -}; -``` - -Now we can start syslog-ng: - -```bash -sudo docker run -it --volumes-from [containerID for apache2] -v "$PWD/syslog-ng.conf":/etc/syslog-ng/syslog-ng.conf balabit/syslog-ng:latest -``` - -## Entering into a container -Assume that your running container has a name "syslog-ng". In this case we can enter into this container by executing the following command: - -```bash -sudo docker exec -it syslog-ng /bin/bash -``` - -## More information -For detailed information on how to run your central log server in Docker and other Docker-related syslog-ng use cases, see the blog post [Your central log server in Docker](https://syslog-ng.com/blog/central-log-server-docker/). - - -## FAQ - -### capabilities - -If the given configuration requires, syslog-ng tries to set some POSIX capabilities at startup, but (by default) Docker do not grant capabilities to the containers. Mainly there are three methods to circumvent this: - * If you do not require any capability (i.e. don't want to listen on ports under 1024 - NET_BIND_SERVICE), simply start syslog-ng with the `--no-caps` option. - * If you know precisely the type of capability you need, use the `--cap-add` option of the Docker service. - * (For development/testing purpose only!) To grant ALL of the capabilities to your container, start it with the `privileged` option. However, we do not recommend this method in production environments. - diff --git a/docker/alpine.dockerfile b/docker/alpine.dockerfile index 0c0f948dbc..139d89522d 100644 --- a/docker/alpine.dockerfile +++ b/docker/alpine.dockerfile @@ -1,3 +1,26 @@ +############################################################################# +# Copyright (c) 2023-2024 Axoflow +# Copyright (c) 2023-2024 László Várady +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 as published +# by the Free Software Foundation, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As an additional exemption you are allowed to compile & link against the +# OpenSSL libraries as published by the OpenSSL project. See the file +# COPYING for details. +# +############################################################################# + ARG DEBUG=false FROM alpine:3.19 as apkbuilder @@ -26,7 +49,7 @@ RUN mkdir packages \ && printf 'export JOBS=$(nproc)\nexport MAKEFLAGS=-j$JOBS\n' >> .abuild/abuild.conf \ && cd axoflow/axosyslog \ && if [ "$PKG_TYPE" = "nightly" ]; then \ - tarball_filename="$(ls syslog-ng-*.tar.*)"; \ + tarball_filename="$(ls axosyslog-*.tar.*)"; \ [ -z "$tarball_filename" ] && echo "Tarball for nightly can not be found" && exit 1; \ tarball_name="${tarball_filename/\.tar.*}"; \ sed -i -e "s|^pkgver=.*|pkgver=$SNAPSHOT_VERSION|" -e "s|^builddir=.*|builddir=\"\$srcdir/$tarball_name\"|" APKBUILD; \ diff --git a/docker/apkbuild/axoflow/axosyslog/APKBUILD b/docker/apkbuild/axoflow/axosyslog/APKBUILD index 901b872ba0..7ac90a59bf 100644 --- a/docker/apkbuild/axoflow/axosyslog/APKBUILD +++ b/docker/apkbuild/axoflow/axosyslog/APKBUILD @@ -51,10 +51,10 @@ subpackages=" $pkgname-python3:_python3 $pkgname-grpc:_grpc " -source="https://github.com/syslog-ng/syslog-ng/releases/download/syslog-ng-$pkgver/syslog-ng-$pkgver.tar.gz +source="https://github.com/axoflow/axosyslog/releases/download/axosyslog-$pkgver/axosyslog-$pkgver.tar.gz python-modules.tar.gz " -builddir="$srcdir/syslog-ng-$pkgver" +builddir="$srcdir/axosyslog-$pkgver" _modules=" add-contextual-data @@ -178,6 +178,6 @@ _submv() { } sha512sums=" -2f1e0dea4c0ecfc3c77df7e6ac231ee8436c9c78fcb4df8ccdc417fea7d56791fdeb0844ac35f0342ce7c2bea5618d8723b6b54319c556120099eb809873082e syslog-ng-4.7.1.tar.gz +2f1e0dea4c0ecfc3c77df7e6ac231ee8436c9c78fcb4df8ccdc417fea7d56791fdeb0844ac35f0342ce7c2bea5618d8723b6b54319c556120099eb809873082e axosyslog-4.7.1.tar.gz SKIP python-modules.tar.gz " diff --git a/docker/syslog-ng.conf b/docker/syslog-ng.conf deleted file mode 100644 index 0387000b68..0000000000 --- a/docker/syslog-ng.conf +++ /dev/null @@ -1,42 +0,0 @@ -############################################################################# -# Default syslog-ng.conf file which collects all local logs into a -# single file called /var/log/messages tailored to container usage. -# -# The changes from the stock, default syslog-ng.conf file is that we've -# dropped the system() source that is not needed and that we enabled network -# connections using default-network-drivers(). Customize as needed and -# override using the -v option to docker, such as: -# -# docker run ... -v "$PWD/syslog-ng.conf":/etc/syslog-ng/syslog-ng.conf -# - -@version: 4.7 -@include "scl.conf" - -source s_local { - internal(); -}; - -source s_network { - default-network-drivers( - # NOTE: TLS support - # - # the default-network-drivers() source driver opens the TLS - # enabled ports as well, however without an actual key/cert - # pair they will not operate and syslog-ng would display a - # warning at startup. - # - #tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert")) - ); -}; - -destination d_local { - file("/var/log/messages"); - file("/var/log/messages-kv.log" template("$ISODATE $HOST $(format-welf --scope all-nv-pairs)\n") frac-digits(3)); -}; - -log { - source(s_local); - source(s_network); - destination(d_local); -}; diff --git a/lib/versioning.h b/lib/versioning.h index 5ec1dcb6b3..23709bbfcd 100644 --- a/lib/versioning.h +++ b/lib/versioning.h @@ -91,8 +91,8 @@ * should reference the syslog-ng version number through these macros, in order * to make it relatively simple to explain PE/OSE version numbers to users. */ -#define PRODUCT_DOCUMENTATION "https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition" -#define PRODUCT_CONTACT "\n\tGitHub Project: https://github.com/syslog-ng/syslog-ng\n\tChat with the Developers: https://gitter.im/syslog-ng/syslog-ng\n\tMailing List: https://lists.balabit.hu/mailman/listinfo/syslog-ng" +#define PRODUCT_DOCUMENTATION "https://axoflow.com/docs/axosyslog-core/" +#define PRODUCT_CONTACT "\n\tGitHub Project: https://github.com/axoflow/axosyslog\n\tChat with the Developers: https://discord.gg/E65kP9aZGm" #define VERSION_3_0 "syslog-ng 3.0" #define VERSION_3_1 "syslog-ng 3.1" diff --git a/news/create-newsfile.py b/news/create-newsfile.py index 6dc432e07a..3c0fd35cfd 100755 --- a/news/create-newsfile.py +++ b/news/create-newsfile.py @@ -69,7 +69,7 @@ def create_block(block_name, files): pr_id = match_pr_id.group(1) - entry += ' * {}\n([#{}](https://github.com/syslog-ng/syslog-ng/pull/{}))'.format(f.read_text().rstrip(), pr_id, pr_id) + entry += ' * {}\n([#{}](https://github.com/axoflow/axosyslog/pull/{}))'.format(f.read_text().rstrip(), pr_id, pr_id) entry = entry.replace('\n', '\n ') entry = entry.replace('\n \n', '\n\n') block += entry + '\n\n' @@ -113,7 +113,7 @@ def wrap(contributors): concated = ", ".join([c.replace(" ", "\0") for c in contributors]) return textwrap.fill(concated, width=70).replace("\0", " ") - stdout = _exec(r'git rev-list --no-merges --format=format:%aN syslog-ng-' + get_last_version() + r'..HEAD | ' + stdout = _exec(r'git rev-list --no-merges --format=format:%aN axosyslog-' + get_last_version() + r'..HEAD | ' r'grep -Ev "^commit [a-z0-9]{40}$" | sort | uniq') contributors = stdout.rstrip().split('\n') contributors = filter(lambda x : x not in exclude_contributor_list, contributors) @@ -121,12 +121,12 @@ def wrap(contributors): return '## Credits\n' \ '\n' \ - 'syslog-ng is developed as a community project, and as such it relies\n' \ - 'on volunteers, to do the work necessarily to produce syslog-ng.\n' \ + 'AxoSyslog is developed as a community project, and as such it relies\n' \ + 'on volunteers, to do the work necessary to produce AxoSyslog.\n' \ '\n' \ 'Reporting bugs, testing changes, writing code or simply providing\n' \ - 'feedback are all important contributions, so please if you are a user\n' \ - 'of syslog-ng, contribute.\n' \ + 'feedback is an important contribution, so please if you are a user\n' \ + 'of AxoSyslog, contribute.\n' \ '\n' \ 'We would like to thank the following people for their contribution:\n' \ '\n' \ diff --git a/news/next-pr-id.py b/news/next-pr-id.py index a9e807557b..bc8ce947aa 100755 --- a/news/next-pr-id.py +++ b/news/next-pr-id.py @@ -27,7 +27,7 @@ def get_last_issue_or_pr_id(): - ISSUES_API = "https://api.github.com/repos/syslog-ng/syslog-ng/issues?state=all&sort=created&direction=desc" + ISSUES_API = "https://api.github.com/repos/axoflow/axosyslog/issues?state=all&sort=created&direction=desc" raw_response = urlopen(ISSUES_API).read().decode("utf-8") json_response = loads(raw_response) @@ -37,7 +37,7 @@ def get_last_issue_or_pr_id(): def is_a_discussion(id): - DISCUSSIONS_URL = "https://github.com/syslog-ng/syslog-ng/discussions/" + DISCUSSIONS_URL = "https://github.com/axoflow/axosyslog/discussions/" try: urlopen(DISCUSSIONS_URL + str(id)) diff --git a/packaging/README.md b/packaging/README.md index 9c115d265f..af3c02d537 100644 --- a/packaging/README.md +++ b/packaging/README.md @@ -12,7 +12,7 @@ syslog-ng is part of a number of distributions, either in the main archive or supplemental/semi-official archives. We find it beneficial that people may find syslog-ng in those repositories, -however in a number of cases those syslog-ng versions lag behind our master +however in a number of cases those syslog-ng versions lag behind our main with several releases. In order to have best of both worlds, we are attempting to diff --git a/scl/system/plugin.conf b/scl/system/plugin.conf index ba3ecc425b..9058ecb9b7 100644 --- a/scl/system/plugin.conf +++ b/scl/system/plugin.conf @@ -29,10 +29,7 @@ # comment out the system-source module invocation. This way even if # unsupported by the C version of the plugin, you can still use the system() # source in your configuration file. Please if you have the need to do -# this, contact the syslog-ng developers and tell us about the omission. +# this, contact the AxoSyslog developers and tell us about the omission. # -# This is the mailing list address where developers are lurking: -# syslog-ng@lists.balabit.hu. -# -# Alternatively, you can open an issue on github.com/syslog-ng/syslog-ng +# You can open an issue on https://github.com/axoflow/axosyslog. # diff --git a/scripts/version.sh b/scripts/version.sh index b9e85a9824..e4a6bed2a8 100755 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -30,7 +30,7 @@ cd $BASEDIR/../ if [ "$VERSION" != "" ]; then echo $VERSION | tr -d '\n' elif [ -d .git ] && GIT_VERSION=$(git describe --tags --dirty --abbrev=7); then - echo $GIT_VERSION | sed 's/^syslog-ng-//' | tr '-' '.' | tr -d '\n' + echo $GIT_VERSION | sed 's/^axosyslog-//' | tr '-' '.' | tr -d '\n' else cat VERSION.txt | tr -d '\n' fi diff --git a/tests/commits/check.sh b/tests/commits/check.sh index f4f532de78..2893042801 100755 --- a/tests/commits/check.sh +++ b/tests/commits/check.sh @@ -21,7 +21,7 @@ # ############################################################################# -commit_range=origin/master..HEAD +commit_range=origin/main..HEAD if [ $# -gt 0 ]; then commit_range=$1 diff --git a/tests/copyright/policy b/tests/copyright/policy index b6d83d660d..f97b53aef8 100644 --- a/tests/copyright/policy +++ b/tests/copyright/policy @@ -64,6 +64,9 @@ lib/logmsg/tests/messages/syslog-ng-(pe-)?[.0-9]*-msg.h$ modules/python-modules/requirements\.lock scl/darwinosl/darwinosl-metadata-db.csv lib/multi-line/smart-multi-line\.fsm$ +docs/.*$ +charts/.*$ +docker/.*$ ########################################################################### # These files are LGPLd and are external contributions _without_ a Balabit @@ -268,6 +271,8 @@ modules/kvformat/filterx-func-parse-kv\.[ch] modules/kvformat/filterx-func-format-kv\.[ch] modules/kvformat/tests/test_filterx_func_parse_kv.c modules/kvformat/tests/test_filterx_func_format_kv.c +docker/python-modules/webhook/scl/webhook.conf +docker/python-modules/webhook/source.py ########################################################################### # These files are GPLd with Balabit origin.