From 215bbfe2f3bd7fd24b5b592498f562a923416b2b Mon Sep 17 00:00:00 2001 From: caodongxia <315816521@qq.com> Date: Thu, 26 May 2022 16:29:40 +0800 Subject: [PATCH] Fix obs-api installwarning --- obs-server.spec | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/obs-server.spec b/obs-server.spec index f4a7f0f..2faed4d 100644 --- a/obs-server.spec +++ b/obs-server.spec @@ -6,7 +6,7 @@ Name: obs-server Version: 2.10.11 -Release: 5 +Release: 6 Summary: The Open Build Service -- Server Component License: GPL-2.0-only OR GPL-3.0-only URL: http://www.openbuildservice.org @@ -277,8 +277,10 @@ rmdir /srv/obs 2> /dev/null || : %systemd_postun_with_restart obsstoragesetup.service %pre -n obs-api -/usr/sbin/groupadd www -/usr/sbin/useradd wwwrun +getent group www >/dev/null || /usr/sbin/groupadd -r www + +getent passwd wwwrun >/dev/null || /usr/sbin/useradd -d / -g www -s /sbin/nologin -r wwwrun + getent passwd obsapidelayed >/dev/null || \ /usr/sbin/useradd -r -s /bin/bash -c "User for build service api delayed jobs" -d /srv/www/obs/api -g apache obsapidelayed @@ -307,9 +309,9 @@ for i in production.rb ; do done if [ ! -s /srv/www/obs/api/config/secret.key ]; then - pushd /srv/www/obs/api + pushd /srv/www/obs/api >& /dev/null RAILS_ENV=production bin/rails secret > /srv/www/obs/api/config/secret.key - popd + popd >& /dev/null fi chmod 0640 /srv/www/obs/api/config/secret.key chown root.apache /srv/www/obs/api/config/secret.key @@ -516,6 +518,9 @@ usermod -a -G docker obsservicerun %{_sbindir}/rcobsstoragesetup %changelog +* Thu May 26 2022 caodongxia - 2.10.11-6 +- Fix obs-api install warning + * Tue May 24 2022 wangkai - 2.10.11-5 - Update gems version for fix rpmbuild error -- Gitee