!98 [sync] PR-94: 修复obs-api安装是多余提示信息

From: @openeuler-sync-bot 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2022-06-16 12:06:06 +00:00 committed by Gitee
commit 388eceed6d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -6,7 +6,7 @@
Name: obs-server Name: obs-server
Version: 2.10.11 Version: 2.10.11
Release: 5 Release: 6
Summary: The Open Build Service -- Server Component Summary: The Open Build Service -- Server Component
License: GPL-2.0-only OR GPL-3.0-only License: GPL-2.0-only OR GPL-3.0-only
URL: http://www.openbuildservice.org URL: http://www.openbuildservice.org
@ -278,8 +278,10 @@ rmdir /srv/obs 2> /dev/null || :
%systemd_postun_with_restart obsstoragesetup.service %systemd_postun_with_restart obsstoragesetup.service
%pre -n obs-api %pre -n obs-api
/usr/sbin/groupadd www getent group www >/dev/null || /usr/sbin/groupadd -r www
/usr/sbin/useradd wwwrun
getent passwd wwwrun >/dev/null || /usr/sbin/useradd -d / -g www -s /sbin/nologin -r wwwrun
getent passwd obsapidelayed >/dev/null || \ 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 /usr/sbin/useradd -r -s /bin/bash -c "User for build service api delayed jobs" -d /srv/www/obs/api -g apache obsapidelayed
@ -308,9 +310,9 @@ for i in production.rb ; do
done done
if [ ! -s /srv/www/obs/api/config/secret.key ]; then 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 RAILS_ENV=production bin/rails secret > /srv/www/obs/api/config/secret.key
popd popd >& /dev/null
fi fi
chmod 0640 /srv/www/obs/api/config/secret.key chmod 0640 /srv/www/obs/api/config/secret.key
chown root.apache /srv/www/obs/api/config/secret.key chown root.apache /srv/www/obs/api/config/secret.key
@ -517,6 +519,9 @@ usermod -a -G docker obsservicerun
%{_sbindir}/rcobsstoragesetup %{_sbindir}/rcobsstoragesetup
%changelog %changelog
* Thu May 26 2022 caodongxia <caodongxia@h-partners.com> - 2.10.11-6
- Fix obs-api install warning
* Tue May 24 2022 wangkai <wangkai385@h-partners.com> - 2.10.11-5 * Tue May 24 2022 wangkai <wangkai385@h-partners.com> - 2.10.11-5
- Update gems version for fix rpmbuild error - Update gems version for fix rpmbuild error