Skip to content

Commit

Permalink
Merge pull request #98 from MrAnno/dbld-rpm
Browse files Browse the repository at this point in the history
rpm/deb packages and minor improvements
  • Loading branch information
alltilla authored May 18, 2024
2 parents 0032470 + 663fddc commit aeab53f
Show file tree
Hide file tree
Showing 88 changed files with 362 additions and 503 deletions.
75 changes: 0 additions & 75 deletions .github/workflows/axosyslog-create-packages.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/axosyslog-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
tags: ${{ steps.tags.outputs.TAGS }}
# description should be here because it is a multi-arch image
# see docs: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#adding-a-description-to-multi-arch-images
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=${{ fromJSON(steps.docker-metadata-tags.outputs.json).labels['org.opencontainers.image.description'] }}
outputs: type=image,name=${{ env.DOCKER_IMAGE_NAME }},annotation-index.org.opencontainers.image.description=${{ fromJSON(steps.docker-metadata-tags.outputs.json).labels['org.opencontainers.image.description'] }}
build-args: |
PKG_TYPE=${{ inputs.pkg-type }}
SNAPSHOT_VERSION=${{ inputs.snapshot-version }}
Expand Down
85 changes: 0 additions & 85 deletions .github/workflows/axosyslog-packages.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/comment-cfg-grammar-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# The download-artifact action cannot download artifacts from other workflows.
# Copied from https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
- name: Download comment artifact
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

steps:
- name: Download source tarball artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.source-tarball-artifact-name }}

Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
cp -r axosyslog/dbld/build/${{ matrix.distro }} package/
- name: Store package as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: package-${{ matrix.distro }}
path: package/*
12 changes: 6 additions & 6 deletions .github/workflows/devshell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
run: make VERBOSE=1 func-test

- name: "Artifact: test-suite.log"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always() && steps.make_check.outcome == 'failure'
with:
name: test-suite-${{ matrix.build-tool }}-${{ matrix.cc }}
Expand All @@ -122,7 +122,7 @@ jobs:
tar -cz -f /tmp/light-reports.tar.gz /tmp/light-reports
- name: "Artifact: light-reports"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always() && steps.prepare-light-reports.outcome == 'success'
with:
name: light-reports-${{ matrix.build-tool }}-${{ matrix.cc }}
Expand All @@ -136,7 +136,7 @@ jobs:
gdb --ex="thread apply all bt full" --ex="quit" ${SYSLOG_NG_INSTALL_DIR}/sbin/syslog-ng --core {} \;
- name: "Artifact: corefiles"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: corefiles-${{ matrix.build-tool }}-${{ matrix.cc }}
Expand Down Expand Up @@ -228,14 +228,14 @@ jobs:
(git diff > ../light-style-problems.diff ; git reset --hard HEAD && exit 1)
- name: "Artifact: c-style-problems"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always() && steps.c-style-check.outcome == 'failure'
with:
name: c-style-problems
path: c-style-problems.diff

- name: "Artifact: light-style-problems"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always() && steps.light-style-check.outcome == 'failure'
with:
name: light-style-problems
Expand All @@ -259,7 +259,7 @@ jobs:
run: tests/copyright/check.sh . .

- name: "Artifact: copyright-run.log"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: copyright-run.log
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
./dbld/rules release VERSION=${VERSION}
- name: Store release tarball as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release-tarball
path: ${{ env.TARBALL_PATH }}
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
uses: actions/checkout@v4

- name: Download release tarball artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: release-tarball

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/index-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
rm -f "${GPG_KEY_PATH}"

- name: "Artifact: verbose run log"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ env.VERBOSE_LOG_PATH }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: ./dbld/rules pkg-tarball

- 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
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/stable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,10 @@ jobs:
name: axosyslog-modules
needs: find-draft-release-run
runs-on: ubuntu-latest
outputs:
version: ${{ steps.unpack_tag.outputs.group1 }}
steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Regex matching
uses: kaisugi/[email protected]
id: unpack_tag
with:
text: ${{ github.ref }}
regex: 'refs/tags/axosyslog-(.*)'

- name: Create AxoSyslog modules tarball
working-directory: docker
run: |
Expand All @@ -93,13 +84,6 @@ jobs:
name: axosyslog-modules-tarball
path: docker/python-modules.tar.gz

publish-packages:
uses: ./.github/workflows/axosyslog-packages.yml
needs: axosyslog-modules
with:
repo: axoflow/axosyslog
version: ${{ needs.axosyslog-modules.outputs.version }}

publish-image:
uses: ./.github/workflows/axosyslog-docker.yml
needs: axosyslog-modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

steps:
- name: Download package artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: package-${{ matrix.distro }}
path: package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
./dbld/rules release VERSION=${RELEASE_VERSION}
- name: Upload tarball
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: axosyslog-${{ env.RELEASE_VERSION }}
path: dbld/release/${{ env.RELEASE_VERSION }}/axosyslog-${{ env.RELEASE_VERSION }}.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion dbld/build.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ ubuntu-lunar python3
ubuntu-mantic python3

fedora python3
almalinux python3
almalinux python3,noriemann,nokafka,nomqtt,nojava
6 changes: 2 additions & 4 deletions dbld/builddeps
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,10 @@ function add_copr_repo {
case "${OS_DISTRIBUTION}" in
centos|almalinux)
$YUM_INSTALL yum-plugin-copr
yum copr enable -y czanik/syslog-ng-githead
yum config-manager --set-enabled powertools
;;
fedora)
$DNF_INSTALL -y dnf-plugins-core
dnf copr enable -y czanik/syslog-ng-githead
;;
esac
}
Expand All @@ -143,9 +141,9 @@ function install_debian_build_deps {
}

function install_rpm_build_deps {
RPM_SPEC_FILE="${DBLD_DIR}/extra-files/${IMAGE_PLATFORM}/syslog-ng.spec"
RPM_SPEC_FILE="${DBLD_DIR}/extra-files/${IMAGE_PLATFORM}/axosyslog.spec"
if ! [ -f ${RPM_SPEC_FILE} ]; then
echo "install_rpm_build_deps() called from dockerfile but without a syslog-ng.spec file, make sure that control file is copied over to ${RPM_SPEC_FILE} by the prepare step"
echo "install_rpm_build_deps() called from dockerfile but without an axosyslog.spec file, make sure that control file is copied over to ${RPM_SPEC_FILE} by the prepare step"
exit 1
fi

Expand Down
8 changes: 4 additions & 4 deletions dbld/generate-rpm-specfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
MODE=$1

if [ $MODE = "snapshot" ]; then
echo "Generating snapshot version in syslog-ng.spec"
echo "Generating snapshot version in axosyslog.spec"
sed -e "s/^Version: \([0-9.]\+\).*$/Version: $VERSION/" \
-e "s/^Release: \([0-9.]\+\).*$/Release: \1+`date +%Y%m%dT%H%M%S`/" -i packaging/rhel/syslog-ng.spec
-e "s/^Release: \([0-9.]\+\).*$/Release: \1+`date +%Y%m%dT%H%M%S`/" -i packaging/rhel/axosyslog.spec
elif [ $MODE = "release" ]; then
echo "Validating that your RPM specfile matches the current version"
RPM_VERSION=`grep ^Version packaging/rhel/syslog-ng.spec | cut -d ' ' -f2`
RPM_VERSION=`grep ^Version packaging/rhel/axosyslog.spec | cut -d ' ' -f2`
if [ "${RPM_VERSION}" != "${VERSION}" ]; then
echo "The version numbers in syslog-ng.spec do not match the current version number. Cannot generate a release tarball this way"
echo "The version numbers in axosyslog.spec do not match the current version number. Cannot generate a release tarball this way"
exit 1
fi
fi
2 changes: 1 addition & 1 deletion dbld/images/almalinux.prepare.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

cp packaging/rhel/syslog-ng.spec ${EXTRA_FILES_DIR}/syslog-ng.spec
cp packaging/rhel/axosyslog.spec ${EXTRA_FILES_DIR}/axosyslog.spec
2 changes: 1 addition & 1 deletion dbld/images/centos.prepare.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

cp packaging/rhel/syslog-ng.spec ${EXTRA_FILES_DIR}/syslog-ng.spec
cp packaging/rhel/axosyslog.spec ${EXTRA_FILES_DIR}/axosyslog.spec
Loading

0 comments on commit aeab53f

Please sign in to comment.