Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:wangyang:branches:OBS:Server:2.10:fedora
obs-server
obs-server.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File obs-server.spec of Package obs-server
# # spec file for package obs-server # # Copyright (c) 2018 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 http://bugs.opensuse.org/ # %if 0%{?fedora} %global sbin /usr/sbin %else %global sbin /sbin %endif %if 0%{?fedora} || 0%{?rhel} %global apache_user apache %global apache_group apache %else %global apache_user wwwrun %global apache_group www %endif %define secret_key_file /srv/www/obs/api/config/secret.key %define obs_backend_data_dir /srv/obs %define obs_backend_dir /usr/lib/obs/server %if ! %{defined _restart_on_update_reload} %define _restart_on_update_reload() (\ test "$YAST_IS_RUNNING" = instsys && exit 0\ test -f /etc/sysconfig/services -a \\\ -z "$DISABLE_RESTART_ON_UPDATE" && . /etc/sysconfig/services\ test "$DISABLE_RESTART_ON_UPDATE" = yes -o \\\ "$DISABLE_RESTART_ON_UPDATE" = 1 && exit 0\ %{?*:/usr/bin/systemctl force-reload %{*}}\ ) || : %{nil} %define _restart_on_update_never() : %define service_del_postun(fnr) \ test -n "$FIRST_ARG" || FIRST_ARG="$1" \ if [ "$FIRST_ARG" -ge 1 ]; then \ # Package upgrade, not uninstall \ if [ -x /usr/bin/systemctl ]; then \ /usr/bin/systemctl daemon-reload || : \ %{expand:%%_restart_on_update%{-f:_force}%{!-f:%{-n:_never}}%{!-f:%{!-n:%{-r:_reload}}} %{?*}} \ fi \ else # package uninstall \ for service in %{?*} ; do \ sysv_service="${service%.*}" \ rm -f "/var/lib/systemd/migrated/$sysv_service" || : \ done \ if [ -x /usr/bin/systemctl ]; then \ /usr/bin/systemctl daemon-reload || : \ fi \ fi \ %{nil} %endif %if ! %{defined _fillupdir} %define _fillupdir %{_localstatedir}/adm/fillup-templates %endif %if 0%{?suse_version} >= 1315 %define reload_on_update() %{?nil: test -n "$FIRST_ARG" || FIRST_ARG=$1 if test "$FIRST_ARG" -ge 1 ; then test -f /etc/sysconfig/services && . /etc/sysconfig/services if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_RESTART_ON_UPDATE" != yes ; then test -x /bin/systemctl && /bin/systemctl daemon-reload >/dev/null 2>&1 || : for service in %{?*} ; do test -x /bin/systemctl && /bin/systemctl reload $service >/dev/null 2>&1 || : done fi fi %nil } %endif %global obs_api_support_scripts obs-api-support.target obs-clockwork.service obs-delayedjob-queue-consistency_check.service obs-delayedjob-queue-default.service obs-delayedjob-queue-issuetracking.service obs-delayedjob-queue-mailers.service obs-delayedjob-queue-project_log_rotate.service obs-delayedjob-queue-releasetracking.service obs-delayedjob-queue-staging.service obs-sphinx.service Name: obs-worker Summary: The Open Build Service -- Build Host Component License: GPL-2.0-only OR GPL-3.0-only Group: Productivity/Networking/Web/Utilities Version: 2.10~pre Release: 0 Url: http://www.openbuildservice.org BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch Source0: open-build-service-%version.tar.xz Patch0: custom.patch Requires: cpio Requires: curl Requires: perl-Compress-Zlib Requires: perl-TimeDate Requires: perl-XML-Parser Requires: screen # for build script Requires: psmisc # For runlevel script: Requires: curl Requires: bash Requires: binutils Requires: bsdtar # zstd is esp for Arch Linux Requires: zstd Requires: util-linux >= 2.16 %if 0%{?suse_version} >= 1550 Requires: insserv-compat %endif %description This is the obs build host, to be installed on each machine building packages in this obs installation. Install it alongside obs-server to run a local playground test installation. %package -n system-user-obsrun Summary: System user and group obsrun Group: System/Fhs Provides: user(obsrun) Provides: group(obsrun) %if 0%{?suse_version:1} Requires(pre): shadow %endif %if 0%{?suse_version} >= 1500 %sysusers_requires %endif %description -n system-user-obsrun This package provides the system account and group 'obsrun'. %if 0%{?suse_version} >= 1500 %pre -n system-user-obsrun -f obsrun.pre %files -n system-user-obsrun %{_sysusersdir}/system-user-obsrun.conf %else %pre -n system-user-obsrun getent group obsrun >/dev/null || /usr/sbin/groupadd -r obsrun getent passwd obsrun >/dev/null || \ /usr/sbin/useradd -r -g obsrun -d /usr/lib/obs -s %{sbin}/nologin \ -c "User for build service backend" obsrun %files -n system-user-obsrun %endif #-------------------------------------------------------------------------------- %prep %setup -q -n open-build-service-%version %patch0 -p1 %build %if 0%{?suse_version} >= 1500 %sysusers_generate_pre dist/system-user-obsrun.conf obsrun system-user-obsrun.conf %endif %install %if 0%{?suse_version} >= 1500 mkdir -p %{buildroot}%{_sysusersdir} install -m 0644 dist/system-user-obsrun.conf %{buildroot}%{_sysusersdir}/ %endif mkdir -p %{buildroot}/usr/sbin mkdir -p %{buildroot}%{_unitdir} install -m 0755 dist/obsworker %{buildroot}/usr/sbin/obsworker ln -sf /usr/sbin/obsworker %{buildroot}/usr/sbin/rcobsworker install -m 0644 dist/systemd/obsworker.service %{buildroot}%{_unitdir}/obsworker.service %check exit 0 %pre %service_add_pre obsworker.service %preun %service_del_preun obsworker.service %post %service_add_post obsworker.service %postun # NOT used on purpose: restart_on_update obsworker # This can cause problems when building chroot # and bs_worker is anyway updating itself at runtime based on server code %service_del_postun -r obsworker.service %files %defattr(-,root,root) %{_unitdir}/obsworker.service /usr/sbin/obsworker /usr/sbin/rcobsworker %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