Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lrupp
oncall
oncall.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File oncall.spec of Package oncall
# # spec file for package oncall # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: oncall Version: 1.5.3 Release: 0 Summary: On-call management and scheduling system License: BSD-2-Clause Group: Productivity/Networking/Web/Frontends URL: https://oncall.tools/ Source: %{name}-%{version}.tar.gz Source1: oncall_config_nginx Source2: oncall.service Source4: oncall.tmpfile Source5: oncall.logrotate Source6: oncall-rpmlintrc Patch0: fix_shebang_lines.patch # Patch1: oncall-content_length.patch Patch2: oncall-other_types_css.patch BuildRequires: python-rpm-macros BuildRequires: python3-setuptools BuildRequires: systemd-rpm-macros BuildRequires: python3-falcon >= 1.4.1 %requires_eq python3-falcon BuildRequires: python3-falcon-cors %requires_eq python3-falcon-cors BuildRequires: python3-greenlet >= 0.4.16 %requires_eq python3-greenlet BuildRequires: python3-asn1crypto >= 1.0.0 %requires_eq python3-asn1crypto BuildRequires: python3-gevent >= 1.4.0 %requires_eq python3-gevent BuildRequires: python3-ujson %requires_eq python3-ujson BuildRequires: python3-SQLAlchemy %requires_eq python3-SQLAlchemy BuildRequires: python3-PyYAML %requires_eq python3-PyYAML BuildRequires: python3-PyMySQL %requires_eq python3-PyMySQL BuildRequires: python3-phonenumbers %requires_eq python3-phonenumbers BuildRequires: python3-Jinja2 %requires_eq python3-Jinja2 BuildRequires: python3-streql %requires_eq python3-streql BuildRequires: python3-webassets %requires_eq python3-webassets BuildRequires: python3-Beaker %requires_eq python3-Beaker BuildRequires: python3-cryptography %requires_eq python3-cryptography BuildRequires: python3-ldap %requires_eq python3-ldap BuildRequires: python3-pytz %requires_eq python3-pytz BuildRequires: python3-irisclient %requires_eq python3-irisclient BuildRequires: python3-slackclient >= 1.3.1 %requires_eq python3-slackclient BuildRequires: python3-icalendar %requires_eq python3-icalendar BuildRequires: python3-pymsteams %requires_eq python3-pymsteams BuildRequires: python3-idna >= 2.10 %requires_eq python3-idna BuildRequires: python3-ldap %requires_eq python3-ldap BuildRequires: python3-prometheus-client %requires_eq python3-prometheus-client Requires: http_daemon Requires: mariadb-client Requires(pre): pwdutils Recommends: logrotate BuildArch: noarch %{?systemd_requires} %define oncall_user _oncall %define oncall_group _oncall %description Oncall is a calendar tool designed for scheduling and managing on-call shifts. It offers highly customizable scheduling for on-call shifts, as well as a streamlined UI for editing, swapping, and overriding on-call shifts. It can be used as source of dynamic ownership info for paging systems like http://iris.claims. %package config-nginx Summary: On-call running with nginx as proxy Group: Productivity/Networking/Web/Frontends Requires: nginx %description config-nginx If you want to run %{name} via nginx, just install this package to get some easy to understand/adaptable configuration files that make it easy to setup %{name} with Nginx. %files config-nginx %dir %{_sysconfdir}/nginx %dir %{_sysconfdir}/nginx/conf.d %config(noreplace) %{_sysconfdir}/nginx/conf.d/%{name}.conf %prep %autosetup -p1 # Avoid env grep -rl "#!%{_bindir}/env python" . | xargs -L 1 --verbose sed -i -e "s|#!%{_bindir}/env python|#!%{_bindir}/python|g" %build LANG="en_US.UTF8" \ CFLAGS="%{optflags}" \ CXXFLAGS="%{optflags}" \ OVERRIDE_CFLAGS="%{optflags}" \ python3 setup.py build %install python3 setup.py install --prefix %{_prefix} --root=%{buildroot} # fix some permissions chmod +x %{buildroot}%{python3_sitelib}/%{name}/sphinx_extension.py chmod +x %{buildroot}%{python3_sitelib}/%{name}/bin/{run_server,scheduler,user_sync}.py chmod +x %{buildroot}%{python3_sitelib}/%{name}/user_sync/slack.py for file in $(find %{buildroot}/%{python3_sitelib} -type f -name "*.svg"); do chmod -x "$file" done # install nginx configuration install -Dm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/nginx/conf.d/%{name}.conf # install template configuration files in /etc/oncall mkdir -p %{buildroot}%{_sysconfdir}/%{name} cp configs/*.yaml %{buildroot}%{_sysconfdir}/%{name}/ # install service file install -Dm644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service sed -i "s|__PYTHON_STUFF__|%{_bindir}/python3 %{python3_sitelib}/%{name}/bin/run_server.py|g" %{buildroot}%{_unitdir}/%{name}.service mkdir -p %{buildroot}%{_sbindir} ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} # install tmpfile install -D -m 0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf # install logrotate file install -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} mkdir -p %{buildroot}/var/log/%{name} # create cache directories, owned by the oncall user: mkdir -p %{buildroot}/var/cache/%{name}/{bundles,.webassets-cache} cd %{buildroot}%{python3_sitelib}/%{name}/ui/static ln -s /var/cache/%{name}/bundles . ln -s /var/cache/%{name}/.webassets-cache . %pre %service_add_pre %{name}.service %post %service_add_post %{name}.service %tmpfiles_create %{_tmpfilesdir}/%{name}.conf # systemd-tmpfiles --create %%{_tmpfilesdir}/%%{name}.conf /usr/sbin/groupadd -r %{oncall_group} 2>/dev/null || : /usr/sbin/useradd -r -g %{oncall_group} -d %{python3_sitelib}/oncall -s /bin/false -c "Oncall System User" %{oncall_user} 2>/dev/null || : %preun %service_del_preun %{name}.service %postun %service_del_postun %{name}.service %files %doc *.md docs/source/*.rst db/ %license LICENSE %{_bindir}/build_assets %{_bindir}/oncall-dev %{_bindir}/oncall-notifier %{_bindir}/oncall-scheduler %{_bindir}/oncall-user-sync %dir %{python3_sitelib}/%{name} %dir %{python3_sitelib}/%{name}*.egg-info %{python3_sitelib}/%{name}/*py* %{python3_sitelib}/%{name}/api %{python3_sitelib}/%{name}/auth %{python3_sitelib}/%{name}/bin %{python3_sitelib}/%{name}/messengers %{python3_sitelib}/%{name}/metrics %{python3_sitelib}/%{name}/notifier %{python3_sitelib}/%{name}/scheduler %{python3_sitelib}/%{name}/user_sync %dir %{python3_sitelib}/%{name}/ui %{python3_sitelib}/%{name}/ui/*py* %{python3_sitelib}/%{name}/ui/templates %{python3_sitelib}/%{name}/ui/static %{python3_sitelib}/%{name}/ui/static/css %{python3_sitelib}/%{name}/ui/static/fonts %{python3_sitelib}/%{name}/ui/static/images %{python3_sitelib}/%{name}/ui/static/js %{python3_sitelib}/%{name}*.egg-info/* %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/*.yaml %{_unitdir}/%{name}.service %{_tmpfilesdir}/%{name}.conf %{_sbindir}/rc%{name} %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %dir %attr(0750,%{oncall_user},%{oncall_group}) /var/log/%{name} %ghost %dir /run/%{name} %defattr(-,%{oncall_user},%{oncall_group}) %dir /var/cache/%{name} /var/cache/%{name}/bundles /var/cache/%{name}/.webassets-cache %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor