Compare commits

...

25 Commits

Author SHA1 Message Date
Henrik Triem
4422c9d73a Set back to snapshot 2022-06-30 05:32:27 +00:00
Henrik Triem
7499175e32 Merge branch 'release/0.11.0' into 'master'
Release 0.11.0

See merge request packaging/rpm-icinga-php-thirdparty!8
2022-06-30 03:06:56 +00:00
Henrik Triem
8b52800d61 Release 0.11.0 2022-06-30 05:03:19 +02:00
Henrik Triem
83bdba6bb0 Raise version to 0.11.0 2022-06-30 04:45:17 +02:00
Eric Lippmann
7aacc0ff98 Build openSUSE v15.3 and v15.4 2022-06-23 00:05:15 +02:00
Eric Lippmann
15254d1d1d Build Fedora v35 and v36 2022-06-23 00:05:09 +02:00
Johannes Meyer
6b6086d02f Install the asset directory 2022-06-07 14:43:27 +02:00
Johannes Meyer
d222bfb197 Only build on CentOS 7 2022-06-07 14:36:28 +02:00
Henrik Triem
11a9a9431a Merge branch 'f35' into 'master'
Add Fedora 35

See merge request packaging/rpm-icinga-php-thirdparty!3
2022-04-14 10:44:20 +00:00
Alexander A. Klimov
18bbbc1ec0 Merge branch 'fix/snapshots' into 'master'
Snapshots: Look for correct branch

See merge request packaging/rpm-icinga-php-thirdparty!7
2022-04-14 08:50:21 +00:00
Henrik Triem
9e265eb0c3 Make snapshots work 2022-04-13 17:38:25 +02:00
Johannes Meyer
b4f8f37497 Merge branch 'os152' into 'master'
Drop openSUSE 15.2

See merge request packaging/rpm-icinga-php-thirdparty!6
2022-03-08 14:50:23 +00:00
Johannes Meyer
afa9c72302 Merge branch 'f33' into 'master'
Drop Fedora 33

See merge request packaging/rpm-icinga-php-thirdparty!4
2022-03-08 14:49:46 +00:00
Henrik Triem
77adecf9a4 Remove CentOS 8 2022-02-27 21:58:38 +00:00
Henrik Triem
2167a445f0 Remove subscription OS 2022-02-27 21:58:11 +00:00
Alexander A. Klimov
f5d14ff39a Drop openSUSE 15.2 2022-02-02 15:36:34 +00:00
Alexander A. Klimov
b8daea39c6 Drop Fedora 33 2022-02-02 14:46:18 +00:00
Henrik Triem
4c2f9492de Build snapshot on master 2022-01-31 14:54:25 +01:00
Alexander A. Klimov
c06d371d05 Add Fedora 35 2021-11-17 18:02:27 +00:00
Henrik Triem
f44e57e909 Merge branch '0.10.0-sles-15.3' into '0.10.0'
Add support for Suse/SLES 15.3

See merge request packaging/rpm-icinga-php-thirdparty!1
2021-07-29 15:33:47 +00:00
Johannes Meyer
723c1e6c21 Raise revision 2021-07-27 11:38:56 +02:00
Johannes Meyer
0952338355 Raise revision 2021-07-27 08:57:41 +02:00
Johannes Meyer
2aae27a64f Add missing php extension requirements
(cherry picked from commit 9db220e54a203246fcf0c728d850accee82b66a6)
2021-07-27 08:54:49 +02:00
Johannes Meyer
9db220e54a Add missing php extension requirements 2021-07-20 17:37:37 +02:00
Henrik Triem
d2dfb581a9 Add support for Suse/SLES 15.3 2021-07-14 17:37:11 +02:00
4 changed files with 178 additions and 81 deletions

12
.gitignore vendored Normal file
View File

@ -0,0 +1,12 @@
## Build
/build/
/ccache/
## Snapshot Artifacts
/*.git/
/*.tar*
/*.version
## Editors
*~
.*.sw[op]

View File

@ -5,8 +5,8 @@ stages:
variables: variables:
DOCKER_IMAGE_BASE: registry.icinga.com/build-docker DOCKER_IMAGE_BASE: registry.icinga.com/build-docker
#ICINGA_BUILD_TYPE: snapshot ICINGA_BUILD_TYPE: snapshot
#ICINGA_BUILD_UPSTREAM_BRANCH: ICINGA_BUILD_UPSTREAM_BRANCH: snapshot/nightly
.build: &build .build: &build
stage: build stage: build
@ -42,25 +42,8 @@ variables:
- tags - tags
################################### ###################################
# EPEL # Centos
################################### ###################################
build/centos/8:
<<: *build
variables:
DOCKER_IMAGE: centos/8
test/centos/8:
<<: *test
variables:
DOCKER_IMAGE: centos/8
dependencies:
- build/centos/8
upload/epel/8:
<<: *upload
dependencies:
- build/centos/8
build/centos/7: build/centos/7:
<<: *build <<: *build
variables: variables:
@ -73,7 +56,7 @@ test/centos/7:
dependencies: dependencies:
- build/centos/7 - build/centos/7
upload/epel/7: upload/centos/7:
<<: *upload <<: *upload
dependencies: dependencies:
- build/centos/7 - build/centos/7
@ -81,93 +64,75 @@ upload/epel/7:
################################### ###################################
# Fedora # Fedora
################################### ###################################
build/fedora/34: build/fedora/36:
<<: *build <<: *build
variables: variables:
DOCKER_IMAGE: fedora/34 DOCKER_IMAGE: fedora/36
RPM_BUILD_NCPUS: '1'
test/fedora/34: test/fedora/36:
<<: *test <<: *test
variables: variables:
DOCKER_IMAGE: fedora/34 DOCKER_IMAGE: fedora/36
dependencies: dependencies:
- build/fedora/34 - build/fedora/36
upload/fedora/34: upload/fedora/36:
<<: *upload <<: *upload
dependencies: dependencies:
- build/fedora/34 - build/fedora/36
build/fedora/33: build/fedora/35:
<<: *build <<: *build
variables: variables:
DOCKER_IMAGE: fedora/33 DOCKER_IMAGE: fedora/35
RPM_BUILD_NCPUS: '1'
test/fedora/33: test/fedora/35:
<<: *test <<: *test
variables: variables:
DOCKER_IMAGE: fedora/33 DOCKER_IMAGE: fedora/35
dependencies: dependencies:
- build/fedora/33 - build/fedora/35
upload/fedora/33: upload/fedora/35:
<<: *upload <<: *upload
dependencies: dependencies:
- build/fedora/33 - build/fedora/35
###################################
# SLES
###################################
build/sles/15.2:
<<: *build
variables:
DOCKER_IMAGE: sles/15.2
test/sles/15.2:
<<: *test
variables:
DOCKER_IMAGE: sles/15.2
dependencies:
- build/sles/15.2
upload/SUSE/15.2:
<<: *upload
dependencies:
- build/sles/15.2
build/sles/12.5:
<<: *build
variables:
DOCKER_IMAGE: sles/12.5
test/sles/12.5:
<<: *test
variables:
DOCKER_IMAGE: sles/12.5
dependencies:
- build/sles/12.5
upload/SUSE/12.5:
<<: *upload
dependencies:
- build/sles/12.5
################################### ###################################
# openSUSE # openSUSE
################################### ###################################
build/opensuse/15.2: build/opensuse/15.4:
<<: *build <<: *build
variables: variables:
DOCKER_IMAGE: opensuse/15.2 DOCKER_IMAGE: opensuse/15.4
test/opensuse/15.2: test/opensuse/15.4:
<<: *test <<: *test
variables: variables:
DOCKER_IMAGE: opensuse/15.2 DOCKER_IMAGE: opensuse/15.4
dependencies: dependencies:
- build/opensuse/15.2 - build/opensuse/15.4
upload/openSUSE/15.2: upload/openSUSE/15.4:
<<: *upload <<: *upload
dependencies: dependencies:
- build/opensuse/15.2 - build/opensuse/15.4
build/opensuse/15.3:
<<: *build
variables:
DOCKER_IMAGE: opensuse/15.3
test/opensuse/15.3:
<<: *test
variables:
DOCKER_IMAGE: opensuse/15.3
dependencies:
- build/opensuse/15.3
upload/openSUSE/15.3:
<<: *upload
dependencies:
- build/opensuse/15.3

87
get_snapshot Executable file
View File

@ -0,0 +1,87 @@
#!/bin/bash
# Copyright (c) 2017 Icinga Development Team <info@icinga.com>
# Licensed as GPL-2.0+
set -e
while getopts ":p:U:b:" opt
do
case "$opt" in
p)
PROJECT="$OPTARG"
;;
U)
UPSTREAM_GIT_URL="$OPTARG"
;;
b)
UPSTREAM_GIT_BRANCH="$OPTARG"
;;
\?)
echo "Unknown argument: $OPTARG" >&2
exit 1
;;
esac
done
: ${PROJECT:=icinga-php-thirdparty}
: ${UPSTREAM_GIT_URL:=https://github.com/Icinga/$PROJECT.git}
: ${UPSTREAM_GIT_BRANCH:=snapshot/nightly}
set -x
if [ -z "$UPSTREAM_GIT_NOREPO" ]; then
if [ -d "${PROJECT}.git/" ]; then
cd "${PROJECT}.git"
if [ ! -d .git ]; then
echo "This is not a GIT repository: $(pwd)" >&2
exit 1
fi
if [ -z "$UPSTREAM_GIT_NOUPDATE" ]; then
if [ "$(git config remote.origin.url)" != "${UPSTREAM_GIT_URL}" ]; then
git remote set-url origin "${UPSTREAM_GIT_URL}"
fi
git fetch origin -p
git checkout -f "${UPSTREAM_GIT_BRANCH}"
git reset --hard "origin/${UPSTREAM_GIT_BRANCH}"
fi
git clean -fdx
elif [ -z "$UPSTREAM_GIT_NOUPDATE" ]; then
git clone -b "${UPSTREAM_GIT_BRANCH}" "${UPSTREAM_GIT_URL}" "${PROJECT}.git/"
cd "${PROJECT}.git"
else
echo "Missing '${PROJECT}.git' directory!" >&2
exit 1
fi
fi
git_version=$(git describe --tags "${UPSTREAM_GIT_BRANCH}")
git_commit=$(git rev-parse "${UPSTREAM_GIT_BRANCH}")
package_version=$(echo "$git_version" | sed -e 's/^v//' -e 's/-/./g')
prefix="${PROJECT}-${package_version}"
tarball="${prefix}.orig.tar"
git archive --format=tar --prefix="${prefix}/" -o "../${tarball}" "${UPSTREAM_GIT_BRANCH}"
cd ../
# create files with the properly set versions for snapshot
rm -rf "${prefix:?}/"
mkdir -p "${prefix:?}/"
echo "${package_version}" > "${prefix:?}/VERSION"
# add to tarball and remove tmpdir
tar --append -f "${tarball}" "${prefix}"/
rm -rf "${prefix:?}/"
# pack tarball
gzip -vf9 "${tarball}"
sha256sum "${tarball}.gz"
# store package version for build scripts
printf '%s\t%s\t%s\t%s' \
"${package_version}" \
"${git_commit}" \
"$(basename "${tarball}.gz")" \
"${UPSTREAM_GIT_BRANCH}" \
> "${PROJECT}.version"

View File

@ -1,10 +1,10 @@
# Icinga PHP Thirdparty for Icinga Web 2 | (c) 2021 Icinga GmbH | GPLv2+ # Icinga PHP Thirdparty for Icinga Web 2 | (c) 2021 Icinga GmbH | GPLv2+
%global revision 1 %global revision 2
%global module_name icinga-php-thirdparty %global module_name icinga-php-thirdparty
Name: %{module_name} Name: %{module_name}
Version: 0.10.0 Version: 0.11.0
Release: %{revision}%{?dist} Release: %{revision}%{?dist}
Summary: Icinga PHP Thirdparty for Icinga Web 2 Summary: Icinga PHP Thirdparty for Icinga Web 2
Group: Applications/System Group: Applications/System
@ -13,10 +13,36 @@ URL: https://icinga.com
Source0: https://github.com/Icinga/%{module_name}/archive/v%{version}.tar.gz Source0: https://github.com/Icinga/%{module_name}/archive/v%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
# Define php runtime identifier
%if 0%{?fedora} || 0%{?rhel} || 0%{?amzn}
%if 0%{?rhel} == 7
%define php_scl rh-php73
%endif
%if 0%{?php_scl:1}
%define php_scl_prefix %{php_scl}-
%endif
%define php %{?php_scl_prefix}php
%endif
%if 0%{?suse_version}
%define php php
%endif
%global basedir %{_datadir}/icinga-php/vendor %global basedir %{_datadir}/icinga-php/vendor
Requires: icinga-php-common Requires: icinga-php-common
# php extension requirements
Requires: %{php}-soap
Requires: %{php}-sockets
Requires: %{php}-curl
%{?suse_version:Requires: %{php}-json}
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
Requires: %{php}-json
%endif
%description %description
This package bundles all 3rd party PHP libraries This package bundles all 3rd party PHP libraries
used by Icinga Web products into one piece, used by Icinga Web products into one piece,
@ -28,6 +54,7 @@ which can be integrated as library into Icinga Web 2.
%install %install
mkdir -vp %{buildroot}%{basedir} mkdir -vp %{buildroot}%{basedir}
cp -vr asset %{buildroot}%{basedir}
cp -vr vendor %{buildroot}%{basedir} cp -vr vendor %{buildroot}%{basedir}
cp -vr composer.* %{buildroot}%{basedir} cp -vr composer.* %{buildroot}%{basedir}
cp -vr VERSION %{buildroot}%{basedir} cp -vr VERSION %{buildroot}%{basedir}
@ -42,5 +69,11 @@ rm -rf %{buildroot}
%{basedir} %{basedir}
%changelog %changelog
* Thu Jun 30 2022 Henrik Triem <henrik.triem@icinga.com> - 0.11.0-1
- Release 0.11.0
* Tue Jul 27 2021 Johannes Meyer <johannes.meyer@icinga.com> - 0.10.0-2
- Added missing php extension requirements
* Thu Jul 08 2021 Henrik Triem <henrik.triem@icinga.com> - 0.10.0-1 * Thu Jul 08 2021 Henrik Triem <henrik.triem@icinga.com> - 0.10.0-1
- Release 0.10.0 - Release 0.10.0