Commit c8990af5 authored by Noah Hilverling's avatar Noah Hilverling

Use new GitHub IcingaDB repository

parent 79b1dcf2
......@@ -24,7 +24,7 @@ do
done
: "${PROJECT:=icingadb}"
: "${UPSTREAM_GIT_URL:=https://git.icinga.com/icingadb/$PROJECT.git}"
: "${UPSTREAM_GIT_URL:=https://github.com/Icinga/$PROJECT.git}"
: "${UPSTREAM_GIT_BRANCH:=master}"
workdir=$(pwd)
......@@ -63,7 +63,7 @@ fi
package_version=$(echo "$git_version" | sed -e 's/^v//' -e 's/-/./g')
tarball="${workdir}/${PROJECT}-${package_version}.tar"
git archive --format=tar --prefix="${PROJECT}-${git_commit}/" -o "${tarball}" "${UPSTREAM_GIT_BRANCH}"
git archive --format=tar --prefix="${PROJECT}-${package_version}/" -o "${tarball}" "${UPSTREAM_GIT_BRANCH}"
# pack tarball
gzip -vf9 "${tarball}"
......
%define revision 1
%global provider git.icinga
%global provider github
%global provider_tld com
%global project icingadb
%global project Icinga
%global repo icingadb
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path %{provider_prefix}
%global commit f10596b960b05a492f4524c123a2522d4626a6e0
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global golang_min_version 1.10
%if "%{_vendor}" == "suse"
......@@ -35,17 +32,17 @@
%endif
Name: icingadb
Version: 0.0.0.%{shortcommit}
Version: 0.0.0
Release: %{revision}%{?dist}
Summary: Icinga DB
Group: System Environment/Daemons
%if "%{_vendor}" == "suse"
License: GPL-2.0-or-later
%else
License: GPLv2+
License: GPLv2+
%endif # suse
URL: https://%{provider_prefix}
Source0: https://%{import_path}/-/archive/%{commit}/%{repo}-%{version}.tar.gz
Source0: https://%{import_path}/archive/v%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
......@@ -72,7 +69,7 @@ Requires(pre): shadow-utils
Icinga DB
%prep
%setup -q -n %{name}-%{commit}
%setup -q
%build
mkdir -p src/%{provider}.%{provider_tld}/%{project}
......@@ -101,7 +98,7 @@ install -d -m 0755 %{buildroot}%{configdir}
install -d -m 0755 %{buildroot}%{_unitdir}
install -m 0755 icingadb %{buildroot}%{_sbindir}/
install -m 0644 etc/config_production.ini %{buildroot}%{configdir}/config.ini
install -m 0644 icingadb.ini %{buildroot}%{configdir}/icingadb.ini
install -m 0644 etc/%{service} %{buildroot}%{_unitdir}/
install -d -m 0755 %{buildroot}%{_datadir}/%{name}
......@@ -145,8 +142,7 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root)
#%%doc AUTHORS COPYING
%doc README.md
#%%doc AUTHORS COPYING README.md
%{_sbindir}/icingadb
%{_unitdir}/%{service}
......@@ -160,7 +156,7 @@ rm -rf %{buildroot}
%defattr(0640,icingadb,icingadb,0750)
%dir %{configdir}
%config(noreplace) %{configdir}/config.ini
%config(noreplace) %{configdir}/icingadb.ini
%changelog
* Mon Sep 24 2018 Markus Frosch <markus.frosch@icinga.com> 0.0.0-0
......
......@@ -4,7 +4,7 @@ addFilter("W: unversioned-explicit-provides group\(icingadb\)")
# we want secure permissions
addFilter("E: non-standard-dir-perm /etc/icingadb 0750L")
addFilter("E: non-readable /etc/icingadb/config.ini 0640L")
addFilter("E: non-readable /etc/icingadb/icingadb.ini 0640L")
# we want our daemon user
addFilter("W: non-standard-uid /etc/icingadb.* icingadb")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment