mirror of
https://git.icinga.com/packaging/rpm-icinga-php-library.git
synced 2025-09-18 07:37:39 +02:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9312d4e6da |
12
.gitignore
vendored
12
.gitignore
vendored
@ -1,12 +0,0 @@
|
|||||||
## Build
|
|
||||||
/build/
|
|
||||||
/ccache/
|
|
||||||
|
|
||||||
## Snapshot Artifacts
|
|
||||||
/*.git/
|
|
||||||
/*.tar*
|
|
||||||
/*.version
|
|
||||||
|
|
||||||
## Editors
|
|
||||||
*~
|
|
||||||
.*.sw[op]
|
|
123
.gitlab-ci.yml
123
.gitlab-ci.yml
@ -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: snapshot/nightly
|
#ICINGA_BUILD_UPSTREAM_BRANCH:
|
||||||
|
|
||||||
.build: &build
|
.build: &build
|
||||||
stage: build
|
stage: build
|
||||||
@ -42,8 +42,25 @@ variables:
|
|||||||
- tags
|
- tags
|
||||||
|
|
||||||
###################################
|
###################################
|
||||||
# Centos
|
# EPEL
|
||||||
###################################
|
###################################
|
||||||
|
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:
|
||||||
@ -56,7 +73,7 @@ test/centos/7:
|
|||||||
dependencies:
|
dependencies:
|
||||||
- build/centos/7
|
- build/centos/7
|
||||||
|
|
||||||
upload/centos/7:
|
upload/epel/7:
|
||||||
<<: *upload
|
<<: *upload
|
||||||
dependencies:
|
dependencies:
|
||||||
- build/centos/7
|
- build/centos/7
|
||||||
@ -64,75 +81,93 @@ upload/centos/7:
|
|||||||
###################################
|
###################################
|
||||||
# Fedora
|
# Fedora
|
||||||
###################################
|
###################################
|
||||||
build/fedora/36:
|
build/fedora/34:
|
||||||
<<: *build
|
<<: *build
|
||||||
variables:
|
variables:
|
||||||
DOCKER_IMAGE: fedora/36
|
DOCKER_IMAGE: fedora/34
|
||||||
RPM_BUILD_NCPUS: '1'
|
|
||||||
|
|
||||||
test/fedora/36:
|
test/fedora/34:
|
||||||
<<: *test
|
<<: *test
|
||||||
variables:
|
variables:
|
||||||
DOCKER_IMAGE: fedora/36
|
DOCKER_IMAGE: fedora/34
|
||||||
dependencies:
|
dependencies:
|
||||||
- build/fedora/36
|
- build/fedora/34
|
||||||
|
|
||||||
upload/fedora/36:
|
upload/fedora/34:
|
||||||
<<: *upload
|
<<: *upload
|
||||||
dependencies:
|
dependencies:
|
||||||
- build/fedora/36
|
- build/fedora/34
|
||||||
|
|
||||||
build/fedora/35:
|
build/fedora/33:
|
||||||
<<: *build
|
<<: *build
|
||||||
variables:
|
variables:
|
||||||
DOCKER_IMAGE: fedora/35
|
DOCKER_IMAGE: fedora/33
|
||||||
RPM_BUILD_NCPUS: '1'
|
|
||||||
|
|
||||||
test/fedora/35:
|
test/fedora/33:
|
||||||
<<: *test
|
<<: *test
|
||||||
variables:
|
variables:
|
||||||
DOCKER_IMAGE: fedora/35
|
DOCKER_IMAGE: fedora/33
|
||||||
dependencies:
|
dependencies:
|
||||||
- build/fedora/35
|
- build/fedora/33
|
||||||
|
|
||||||
upload/fedora/35:
|
upload/fedora/33:
|
||||||
<<: *upload
|
<<: *upload
|
||||||
dependencies:
|
dependencies:
|
||||||
- build/fedora/35
|
- build/fedora/33
|
||||||
|
|
||||||
|
###################################
|
||||||
|
# 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.4:
|
build/opensuse/15.2:
|
||||||
<<: *build
|
<<: *build
|
||||||
variables:
|
variables:
|
||||||
DOCKER_IMAGE: opensuse/15.4
|
DOCKER_IMAGE: opensuse/15.2
|
||||||
|
|
||||||
test/opensuse/15.4:
|
test/opensuse/15.2:
|
||||||
<<: *test
|
<<: *test
|
||||||
variables:
|
variables:
|
||||||
DOCKER_IMAGE: opensuse/15.4
|
DOCKER_IMAGE: opensuse/15.2
|
||||||
dependencies:
|
dependencies:
|
||||||
- build/opensuse/15.4
|
- build/opensuse/15.2
|
||||||
|
|
||||||
upload/openSUSE/15.4:
|
upload/openSUSE/15.2:
|
||||||
<<: *upload
|
<<: *upload
|
||||||
dependencies:
|
dependencies:
|
||||||
- build/opensuse/15.4
|
- build/opensuse/15.2
|
||||||
|
|
||||||
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
87
get_snapshot
@ -1,87 +0,0 @@
|
|||||||
#!/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-library}
|
|
||||||
: ${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"
|
|
@ -4,7 +4,7 @@
|
|||||||
%global module_name icinga-php-library
|
%global module_name icinga-php-library
|
||||||
|
|
||||||
Name: %{module_name}
|
Name: %{module_name}
|
||||||
Version: 0.9.1
|
Version: 0.6.0
|
||||||
Release: %{revision}%{?dist}
|
Release: %{revision}%{?dist}
|
||||||
Summary: Icinga PHP Library for Icinga Web 2
|
Summary: Icinga PHP Library for Icinga Web 2
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -13,35 +13,9 @@ 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/ipl
|
%global basedir %{_datadir}/icinga-php/ipl
|
||||||
|
|
||||||
Requires: icinga-php-common
|
Requires: icinga-php-common
|
||||||
Requires: icinga-php-thirdparty
|
|
||||||
|
|
||||||
# php extension requirements
|
|
||||||
Requires: %{php}-intl
|
|
||||||
%{?rhel:Requires: %{php}-pdo}
|
|
||||||
%{?suse_version:Requires: %{php}-gettext %{php}-json %{php}-openssl}
|
|
||||||
%if 0%{?rhel} >= 8 || 0%{?fedora} >= 30
|
|
||||||
Requires: %{php}-json
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This project bundles all Icinga PHP libraries into one
|
This project bundles all Icinga PHP libraries into one
|
||||||
@ -68,23 +42,5 @@ rm -rf %{buildroot}
|
|||||||
%{basedir}
|
%{basedir}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jul 06 2022 Johannes Meyer <johannes.meyer@icinga.com> - 0.9.1-1
|
|
||||||
- Release 0.9.1
|
|
||||||
|
|
||||||
* Thu Jun 30 2022 Henrik Triem <henrik.triem@icinga.com> - 0.9.0-1
|
|
||||||
- Release 0.9.0
|
|
||||||
|
|
||||||
* Tue Apr 26 2022 Johannes Meyer <johannes.meyer@icinga.com> - 0.8.1-1
|
|
||||||
- Release 0.8.1
|
|
||||||
|
|
||||||
* Wed Mar 23 2022 Johannes Meyer <johannes.meyer@icinga.com> - 0.8.0-1
|
|
||||||
- Release 0.8.0
|
|
||||||
|
|
||||||
* Wed Nov 10 2021 Johannes Meyer <johannes.meyer@icinga.com> - 0.7.0-1
|
|
||||||
- Release 0.7.0
|
|
||||||
|
|
||||||
* Tue Jul 27 2021 Johannes Meyer <johannes.meyer@icinga.com> - 0.6.1-1
|
|
||||||
- Release 0.6.1
|
|
||||||
|
|
||||||
* Thu Jul 08 2021 Henrik Triem <henrik.triem@icinga.com> - 0.6.0-1
|
* Thu Jul 08 2021 Henrik Triem <henrik.triem@icinga.com> - 0.6.0-1
|
||||||
- Release 0.6.0
|
- Release 0.6.0
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# this script runs in the rpm_test environment
|
|
||||||
|
|
||||||
PACKAGES=( icinga-php-library )
|
|
||||||
|
|
||||||
icinga-build-rpm-install "${PACKAGES[@]}"
|
|
||||||
|
|
||||||
bash
|
|
Loading…
x
Reference in New Issue
Block a user