Skip to content
This repository
Browse code

[dist] update spec file template as currently used

  • Loading branch information...
commit 278ef3adb1d8f7572ed64ab8a44f4bc44392dfbd 1 parent 3bf155e
Adrian Schröter adrianschroeter authored

Showing 1 changed file with 171 additions and 137 deletions. Show diff stats Hide diff stats

  1. +171 137 dist/obs-server.spec
308 dist/obs-server.spec
... ... @@ -1,54 +1,58 @@
1 1 #
2 2 # spec file for package obs-server
3 3 #
4   -# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
5   -# This file and all modifications and additions to the pristine
6   -# package are under the same license as the package itself.
  4 +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
7 5 #
  6 +# All modifications and additions to the file contributed by third parties
  7 +# remain the property of their copyright owners, unless otherwise agreed
  8 +# upon. The license for this file, and modifications and additions to the
  9 +# file, is the same license as for the pristine package itself (unless the
  10 +# license for the pristine package is not an Open Source License, in which
  11 +# case the license is the MIT License). An "Open Source License" is a
  12 +# license that conforms to the Open Source Definition (Version 1.9)
  13 +# published by the Open Source Initiative.
  14 +
8 15 # Please submit bugfixes or comments via http://bugs.opensuse.org/
9 16 #
10 17
11 18
12   -
13 19 Name: obs-server
14 20 Summary: The Open Build Service -- Server Component
15   -
16   -Version: 2.2.64
17   -Release: 0
18   -License: GPL
  21 +License: GPL-2.0 ; GPL-3.0
19 22 Group: Productivity/Networking/Web/Utilities
  23 +Version: 2.3.1
  24 +Release: 0
20 25 Url: http://en.opensuse.org/Build_Service
21   -BuildRoot: /var/tmp/%name-root
22   -# git clone git://github.com/openSUSE/open-build-service.git build-service-1.7.54; tar cfvj obs-server-1.7.54.tar.bz2 --exclude=.git\* build-service-1.7.54/
  26 +BuildRoot: %{_tmppath}/%{name}-%{version}-build
  27 +# git clone git://gitorious.org/opensuse/build-service.git build-service-1.7.54; tar cfvj obs-server-1.7.54.tar.bz2 --exclude=.git\* build-service-1.7.54/
23 28 Source: obs-server-%version.tar.bz2
24   -# git clone git://github.com/openSUSE/opensuse-themes.git opensuse-themes-0.9; tar cfvj opensuse-themes-0.9.tar.bz2 --exclude=.git\* opensuse-themes-0.9
25   -Source1: opensuse-themes-2.2.62.tar.bz2
26   -Autoreqprov: on
  29 +# git clone git://gitorious.org/opensuse/themes.git opensuse-themes-0.9; tar cfvj opensuse-themes-0.9.tar.bz2 --exclude=.git\* opensuse-themes-0.9
  30 +Source1: opensuse-themes-2.3.0.tar.bz2
27 31 BuildRequires: python-devel
28   -BuildRequires: obs-common
29 32 # make sure this is in sync with the RAILS_GEM_VERSION specified in the
30 33 # config/environment.rb of the various applications.
31 34 # atm the obs rails version patch above unifies that setting among the applications
32 35 # also see requires in the obs-server-api sub package
33   -BuildRequires: rubygem-rails-2_3 >= 2.3.8
34   -BuildRequires: rubygem-rmagick
35   -BuildRequires: build >= 2009.05.04
  36 +BuildRequires: build >= 2012.05.31
36 37 BuildRequires: perl-BSSolv
37   -BuildRequires: lighttpd
38   -Requires: build >= 2009.05.04
39   -Requires: perl-BSSolv
  38 +BuildRequires: rubygem-rails-2_3 >= 2.3.14
  39 +BuildRequires: rubygem-rmagick
  40 +PreReq: /usr/sbin/useradd /usr/sbin/groupadd
  41 +Conflicts: obs-productconverter < %version-%release
  42 +Requires: build >= 2012.05.31
  43 +Requires: obs-worker
  44 +Requires: perl-BSSolv >= 0.18.0
40 45 # Required by source server
41   -Requires: patch diffutils
  46 +Requires: diffutils
  47 +Requires: patch
42 48 PreReq: sysvinit
43 49
44   -%if 0%{?suse_version} >= 1030
45   -BuildRequires: fdupes
46   -%endif
47 50 %if 0%{?suse_version:1}
48   -PreReq: %fillup_prereq %insserv_prereq permissions
  51 +BuildRequires: fdupes
  52 +PreReq: %fillup_prereq %insserv_prereq permissions pwdutils
49 53 %endif
50 54
51   -%if 0%{?suse_version} >= 1020
  55 +%if 0%{?suse_version:1}
52 56 Recommends: yum yum-metadata-parser repoview dpkg
53 57 Recommends: createrepo
54 58 Conflicts: createrepo < 0.9.8
@@ -58,24 +62,41 @@ Recommends: openslp-server
58 62 Recommends: obs-signd
59 63 Recommends: inst-source-utils
60 64 %else
61   -Requires: yum yum-metadata-parser dpkg
62 65 Requires: createrepo >= 0.4.10
  66 +Requires: dpkg
  67 +Requires: yum
  68 +Requires: yum-metadata-parser
63 69 %endif
64   -Requires: perl-Compress-Zlib perl-Net-SSLeay perl-Socket-MsgHdr perl-XML-Parser
  70 +Requires: perl-Compress-Zlib
  71 +Requires: perl-File-Sync >= 0.10
  72 +Requires: perl-Net-SSLeay
  73 +Requires: perl-Socket-MsgHdr
  74 +Requires: perl-XML-Parser
65 75
66 76 %description
  77 +The Open Build Service (OBS) backend is used to store all sources and binaries. It also
  78 +calculates the need for new build jobs and distributes it.
  79 +
67 80 Authors:
68 81 --------
69   - The openSUSE Team <opensuse-buildservice@opensuse.org>
  82 + The Open Build Service Team <opensuse-buildservice@opensuse.org>
70 83
71 84 %package -n obs-worker
72   -Requires: perl-TimeDate screen curl perl-XML-Parser perl-Compress-Zlib cpio
  85 +Requires: cpio
  86 +Requires: curl
  87 +Requires: perl-Compress-Zlib
  88 +Requires: perl-TimeDate
  89 +Requires: perl-XML-Parser
  90 +Requires: screen
73 91 # For runlevel script:
74 92 Requires: curl
75 93 Recommends: openslp lvm2
  94 +#Conflicts: systemd
76 95 # requires from build script
77   -Requires: bash binutils bsdtar
78   -Summary: The openSUSE Build Service -- Build Host Component
  96 +Requires: bash
  97 +Requires: binutils
  98 +Requires: bsdtar
  99 +Summary: The Open Build Service -- Build Host Component
79 100 Group: Productivity/Networking/Web/Utilities
80 101 %if 0%{?suse_version}
81 102 PreReq: %fillup_prereq %insserv_prereq
@@ -85,13 +106,13 @@ Requires: lzma
85 106 %endif
86 107 %if 0%{?suse_version} >= 1120
87 108 BuildArch: noarch
88   -Requires: util-linux >= 2.16
  109 +Requires: util-linux >= 2.16
89 110 %else
90 111 %ifarch x86_64
91   -Requires: linux32
  112 +Requires: linux32
92 113 %endif
93 114 %ifarch ppc64
94   -Requires: powerpc32
  115 +Requires: powerpc32
95 116 %endif
96 117 %endif
97 118
@@ -101,42 +122,55 @@ packages in this obs installation. Install it alongside obs-server to
101 122 run a local playground test installation.
102 123
103 124 %package -n obs-api
104   -Summary: The openSUSE Build Service -- The Frontend part
  125 +Summary: The Open Build Service -- The API and WEBUI
105 126 Group: Productivity/Networking/Web/Utilities
106   -Requires: obs-common >= 2.1.79
  127 +Obsoletes: obs-common <= 2.2.90
107 128 %if 0%{?suse_version}
108 129 PreReq: %fillup_prereq %insserv_prereq
109 130 %endif
110 131
111   -Requires: lighttpd ruby-fcgi lighttpd-mod_magnet mysql ruby-mysql
  132 +#For lighttpd
  133 +#Recommends: lighttpd ruby-fcgi lighttpd-mod_magnet mysql ruby-mysql
  134 +#For apache
  135 +Recommends: apache2 apache2-mod_xforward rubygem-passenger-apache2
  136 +
  137 +Requires: mysql
  138 +Requires: ruby-mysql
112 139 # make sure this is in sync with the RAILS_GEM_VERSION specified in the
113 140 # config/environment.rb of the various applications.
114   -Requires: rubygem-rails-2_3 >= 2.3.8
115   -Requires: rubygem-rack >= 1.1.0
116   -Requires: rubygem-libxml-ruby
  141 +Requires: rubygem-ci_reporter
117 142 Requires: rubygem-daemons
118   -Requires: rubygem-delayed_job
  143 +Requires: rubygem-delayed_job < 2.0.0
  144 +Requires: rubygem-json
  145 +Requires: rubygem-libxml-ruby
  146 +Requires: rubygem-rack >= 1.1.0
  147 +Requires: rubygem-rails-2_3 >= 2.3.14
  148 +%if 0%{?suse_version} >= 1210
  149 +Requires: rubygem-erubis-2_6
  150 +%else
119 151 Requires: rubygem-erubis
  152 +%endif
  153 +Requires: rubygem-nokogiri
120 154 Requires: rubygem-rails_xss
121 155 %if 0%{?suse_version} >= 1020
122 156 Supplements: ruby-ldap
123 157 %endif
124 158 # requires for webui:
125 159 Requires: ghostscript-fonts-std
  160 +Requires: rubygem-exception_notification < 2.0
126 161 Requires: rubygem-gruff
127   -Requires: rubygem-sqlite3
128 162 Requires: rubygem-rmagick
129   -Requires: rubygem-exception_notification < 2.0
  163 +Requires: rubygem-sqlite3
130 164 Recommends: memcached
  165 +Summary: The Open Build Service -- The API and WEBUI
131 166 Group: Productivity/Networking/Web/Utilities
132   -Summary: The openSUSE Build Service -- The Frontend part
133 167
134 168 %description -n obs-api
135 169 This is the API server instance, and the web client for the
136 170 OBS.
137 171
138 172 %package -n obs-source_service
139   -Summary: The openSUSE Build Service -- source service daemon
  173 +Summary: The Open Build Service -- source service daemon
140 174 Group: Productivity/Networking/Web/Utilities
141 175 # Our default services, used in osc and webui
142 176 Recommends: obs-service-download_url
@@ -151,7 +185,7 @@ This component is optional and not required to run the service.
151 185
152 186
153 187 %package -n obs-productconverter
154   -Summary: The openSUSE Build Service -- product definition utility
  188 +Summary: The Open Build Service -- product definition utility
155 189 Group: Productivity/Networking/Web/Utilities
156 190 # For perl library files, TODO: split out obs-lib subpackage?
157 191 Requires: obs-server
@@ -161,9 +195,11 @@ bs_productconvert is a utility to create Kiwi- and Spec- files from a
161 195 product definition.
162 196
163 197 %package -n obs-utils
164   -Summary: The openSUSE Build Service -- utilities
  198 +Summary: The Open Build Service -- utilities
165 199 Group: Productivity/Networking/Web/Utilities
166   -Requires: osc build ruby
  200 +Requires: build
  201 +Requires: osc
  202 +Requires: ruby
167 203
168 204 %description -n obs-utils
169 205 obs_mirror_project is a tool to copy the binary data of a project from one obs to another
@@ -191,11 +227,17 @@ cd -
191 227 # First install all dist files
192 228 #
193 229 cd dist
194   -# configure lighttpd web service
  230 +# configure apache web service (new default since OBS 2.3)
  231 +mkdir -p $RPM_BUILD_ROOT/etc/apache2/vhosts.d/
  232 +install -m 0644 obs-apache2.conf $RPM_BUILD_ROOT/etc/apache2/vhosts.d/obs.conf
  233 +# configure lighttpd web service (default until OBS 2.1)
195 234 mkdir -p $RPM_BUILD_ROOT/etc/lighttpd/vhosts.d/
196   -install -m 0644 obs.conf $RPM_BUILD_ROOT/etc/lighttpd/vhosts.d/
  235 +install -m 0644 obs-lighttpd.conf $RPM_BUILD_ROOT/etc/lighttpd/vhosts.d/obs.conf
197 236 install -m 0644 rails.include $RPM_BUILD_ROOT/etc/lighttpd/vhosts.d/rails.inc
198 237 install -m 0644 cleanurl-v5.lua $RPM_BUILD_ROOT/etc/lighttpd/
  238 +# install overview page template
  239 +mkdir -p $RPM_BUILD_ROOT/srv/www/obs/overview
  240 +install -m 0644 overview.html.TEMPLATE $RPM_BUILD_ROOT/srv/www/obs/overview/
199 241 # install obs mirror script and obs copy script
200 242 install -d -m 755 $RPM_BUILD_ROOT/usr/sbin/
201 243 install -m 0755 obs_mirror_project obs_project_update $RPM_BUILD_ROOT/usr/sbin/
@@ -210,14 +252,14 @@ for i in obssrcserver obsrepserver obsscheduler obsworker obspublisher obsdispat
210 252 done
211 253 # install logrotate
212 254 install -d -m 755 $RPM_BUILD_ROOT/etc/logrotate.d/
213   -for i in obs-api.logrotate obs-build.logrotate obs-server.logrotate ; do
214   - install -m 0755 $i \
215   - $RPM_BUILD_ROOT/etc/logrotate.d/
  255 +for i in obs-api obs-build obs-server ; do
  256 + install -m 0644 ${i}.logrotate \
  257 + $RPM_BUILD_ROOT/etc/logrotate.d/$i
216 258 done
217 259 # install fillups
218 260 FILLUP_DIR=$RPM_BUILD_ROOT/var/adm/fillup-templates
219 261 install -d -m 755 $FILLUP_DIR
220   -install -m 0644 sysconfig.obs-server sysconfig.obs-worker $FILLUP_DIR/
  262 +install -m 0644 sysconfig.obs-server $FILLUP_DIR/
221 263 # install cronjobs
222 264 CRON_DIR=$RPM_BUILD_ROOT/etc/cron.d
223 265 install -d -m 755 $CRON_DIR
@@ -245,7 +287,6 @@ exec /usr/lib/obs/server/bs_serverstatus "\$@"
245 287 EOF
246 288 chmod 0755 $RPM_BUILD_ROOT/usr/sbin/obs_serverstatus
247 289
248   -
249 290 #
250 291 # Install all web and api parts.
251 292 #
@@ -253,9 +294,10 @@ cd ../src
253 294 for i in api webui; do
254 295 mkdir -p $RPM_BUILD_ROOT/srv/www/obs/
255 296 cp -a $i $RPM_BUILD_ROOT/srv/www/obs/$i
  297 + rm $RPM_BUILD_ROOT/srv/www/obs/$i/lib/activexml
  298 + mkdir $RPM_BUILD_ROOT/srv/www/obs/$i/lib/activexml
  299 + cp -a activexml/* $RPM_BUILD_ROOT/srv/www/obs/$i/lib/activexml/
256 300 done
257   -rm $RPM_BUILD_ROOT/srv/www/obs/api/README_LOGIN
258   -rm $RPM_BUILD_ROOT/srv/www/obs/api/files/specfiletemplate
259 301 mkdir -p $RPM_BUILD_ROOT/srv/www/obs/api/log
260 302 mkdir -p $RPM_BUILD_ROOT/srv/www/obs/api/tmp
261 303 mkdir -p $RPM_BUILD_ROOT/srv/www/obs/webui/log
@@ -270,15 +312,12 @@ touch $RPM_BUILD_ROOT/srv/www/obs/webui/db/database.db
270 312 #set default api on localhost for the webui
271 313 #
272 314 mv $RPM_BUILD_ROOT/srv/www/obs/api/files/distributions.xml.template $RPM_BUILD_ROOT/srv/www/obs/api/files/distributions.xml
273   -sed 's,FRONTEND_HOST.*,FRONTEND_HOST = "127.0.42.2",' \
274   - $RPM_BUILD_ROOT/srv/www/obs/webui/config/environments/development.rb > tmp-file \
275   - && mv tmp-file "$RPM_BUILD_ROOT/srv/www/obs/webui/config/environments/development.rb"
276   -sed 's,FRONTEND_PORT.*,FRONTEND_PORT = 80,' \
277   - $RPM_BUILD_ROOT/srv/www/obs/webui/config/environments/development.rb > tmp-file \
278   - && mv tmp-file "$RPM_BUILD_ROOT/srv/www/obs/webui/config/environments/development.rb"
279   -sed 's,api.opensuse.org,127.0.42.2,' \
280   - $RPM_BUILD_ROOT/srv/www/obs/webui/app/helpers/package_helper.rb > tmp-file \
281   - && mv tmp-file "$RPM_BUILD_ROOT/srv/www/obs/webui/app/helpers/package_helper.rb"
  315 +sed -i 's,FRONTEND_HOST.*,FRONTEND_HOST = "127.0.42.2",' \
  316 + $RPM_BUILD_ROOT/srv/www/obs/webui/config/environments/development.rb
  317 +sed -i 's,FRONTEND_PORT.*,FRONTEND_PORT = 80,' \
  318 + $RPM_BUILD_ROOT/srv/www/obs/webui/config/environments/development.rb
  319 +sed -i 's,api.opensuse.org,127.0.42.2,' \
  320 + $RPM_BUILD_ROOT/srv/www/obs/webui/app/helpers/package_helper.rb
282 321
283 322 #
284 323 # Install webui theme
@@ -296,11 +335,11 @@ cp -a ../docs/api/api/*.{rng,xsd} $RPM_BUILD_ROOT/srv/www/obs/docs/api
296 335 #
297 336 # Fix symlinks to common, could be much cleaner ...
298 337 #
299   -rm -f $RPM_BUILD_ROOT/srv/www/obs/api/lib/common $RPM_BUILD_ROOT/srv/www/obs/webui/lib/common
300   -ln -sf /srv/www/obs/common/lib $RPM_BUILD_ROOT/srv/www/obs/api/lib/common
301   -ln -sf /srv/www/obs/common/lib $RPM_BUILD_ROOT/srv/www/obs/webui/lib/common
302   -ln -sf /srv/www/obs/common/images $RPM_BUILD_ROOT/srv/www/obs/api/public/images/common
303   -ln -sf /srv/www/obs/common/images $RPM_BUILD_ROOT/srv/www/obs/webui/public/images/common
  338 +#rm -f $RPM_BUILD_ROOT/srv/www/obs/api/lib/common $RPM_BUILD_ROOT/srv/www/obs/webui/lib/common
  339 +#ln -sf /srv/www/obs/common/lib $RPM_BUILD_ROOT/srv/www/obs/api/lib/common
  340 +#ln -sf /srv/www/obs/common/lib $RPM_BUILD_ROOT/srv/www/obs/webui/lib/common
  341 +#ln -sf /srv/www/obs/common/images $RPM_BUILD_ROOT/srv/www/obs/api/public/images/common
  342 +#ln -sf /srv/www/obs/common/images $RPM_BUILD_ROOT/srv/www/obs/webui/public/images/common
304 343 ln -sf /srv/www/obs/docs/api $RPM_BUILD_ROOT/srv/www/obs/api/public/schema
305 344 #
306 345 # change script names to allow to start them with startproc
@@ -318,20 +357,14 @@ cp BSConfig.pm.template BSConfig.pm
318 357
319 358 install -d -m 755 $RPM_BUILD_ROOT/usr/lib/obs/server/
320 359 install -d -m 755 $RPM_BUILD_ROOT/usr/lib/obs/server/build # dummy, it is a %ghost
321   -install -d -m 755 $RPM_BUILD_ROOT/srv/obs/log
322   -install -d -m 755 $RPM_BUILD_ROOT/srv/obs/run
  360 +#for i in build events info jobs log projects repos run sources trees workers; do
  361 +# install -d -m 755 $RPM_BUILD_ROOT/srv/obs/$i
  362 +#done
323 363 # install executables and code
324 364 cp -a * $RPM_BUILD_ROOT/usr/lib/obs/server/
325 365 rm -r $RPM_BUILD_ROOT/usr/lib/obs/server/testdata
326 366 rm $RPM_BUILD_ROOT/usr/lib/obs/server/Makefile.PL
327   -# create symlink to build scritps
328   -#rm -rf $RPM_BUILD_ROOT/usr/lib/obs/server/build
329   -#ln -sf /usr/lib/build $RPM_BUILD_ROOT/usr/lib/obs/server/build
330   -
331   -#
332   -# Cleanup stuff which should not be in git :/
333   -#
334   -rm $RPM_BUILD_ROOT/srv/www/obs/webui/config/build.opensuse.org.diff
  367 +cd ..
335 368
336 369 #
337 370 # turn duplicates into hard links
@@ -343,10 +376,11 @@ rm $RPM_BUILD_ROOT/srv/www/obs/webui/config/build.opensuse.org.diff
343 376 %fdupes $RPM_BUILD_ROOT/srv/www/obs
344 377 %endif
345 378
346   -# hack for old rpm on 11.2 and before
347   -%if 0%{?suse_version} <= 1120
348   -touch $RPM_BUILD_ROOT/srv/www/obs/webui/config/database.yml
349   -%endif
  379 +# these config files must not be hard linked
  380 +install api/config/database.yml.example $RPM_BUILD_ROOT/srv/www/obs/api/config/database.yml
  381 +install api/config/options.yml.example $RPM_BUILD_ROOT/srv/www/obs/api/config/options.yml
  382 +install webui/config/database.yml.example $RPM_BUILD_ROOT/srv/www/obs/webui/config/database.yml
  383 +install webui/config/options.yml.example $RPM_BUILD_ROOT/srv/www/obs/webui/config/options.yml
350 384
351 385 %pre
352 386 /usr/sbin/groupadd -r obsrun 2> /dev/null || :
@@ -357,7 +391,7 @@ touch $RPM_BUILD_ROOT/srv/www/obs/webui/config/database.yml
357 391 /usr/sbin/useradd -r -o -s /bin/false -c "User for build service backend" -d /usr/lib/obs -g obsrun obsrun 2> /dev/null || :
358 392
359 393 %preun
360   -for service in obssrcserver obsrepserver obsdispatcher obsscheduler obspublisher obswarden obssigner obsstoragesetup ; do
  394 +for service in obssrcserver obsrepserver obsdispatcher obsscheduler obspublisher obswarden obssigner ; do
361 395 %stop_on_removal $service
362 396 done
363 397
@@ -365,9 +399,10 @@ done
365 399 %stop_on_removal obsworker
366 400
367 401 %post
  402 +[ -d /srv/obs ] || install -d -o obsrun -g obsrun /srv/obs
368 403 %run_permissions
369 404 %{fillup_and_insserv -n obs-server}
370   -for service in obssrcserver obsrepserver obsdispatcher obsscheduler obspublisher obswarden obssigner obsstoragesetup ; do
  405 +for service in obssrcserver obsrepserver obsdispatcher obsscheduler obspublisher obswarden obssigner ; do
371 406 %restart_on_update $service
372 407 done
373 408
@@ -390,43 +425,40 @@ fi
390 425 %insserv_cleanup
391 426 %verifyscript -n obs-server
392 427 %verify_permissions
  428 +# cleanup empty directory just in case
  429 +rmdir /srv/obs 2> /dev/null || :
393 430
394 431 %post -n obs-worker
395   -%{fillup_and_insserv -n obs-worker}
396   -%restart_on_update obsworker
  432 +%{fillup_and_insserv -n obs-server}
  433 +# NOT used on purpose: restart_on_update obsworker
  434 +# This can cause problems when building chroot
  435 +# and bs_worker is anyway updating itself at runtime based on server code
  436 +
  437 +%pre -n obs-api
  438 +# help rpm to turn a directory in a symlink
  439 +if [ -d /srv/www/obs/webui/public/vendor/neutral/images -a ! -L /srv/www/obs/webui/public/vendor/neutral/images ]; then
  440 + mv /srv/www/obs/webui/public/vendor/neutral/images /srv/www/obs/webui/public/vendor/neutral/images.rpmold
  441 +fi
397 442
398 443 %post -n obs-api
399 444 %{fillup_and_insserv -n obs-server}
400   -if [ -e /srv/www/obs/webclient/config/database.yml ] && [ ! -e /srv/www/obs/webui/config/database.yml ]; then
401   - cp /srv/www/obs/webclient/config/database.yml /srv/www/obs/webui/config/database.yml
402   -fi
403 445 if [ -e /srv/www/obs/frontend/config/database.yml ] && [ ! -e /srv/www/obs/api/config/database.yml ]; then
404 446 cp /srv/www/obs/frontend/config/database.yml /srv/www/obs/api/config/database.yml
405 447 fi
406 448 # updaters can keep their production_slave config
407 449 for i in production_slave.rb production.rb development_base.rb; do
408   - if [ -e /srv/www/obs/webclient/config/environments/$i ] && [ ! -e /srv/www/obs/webui/config/environments/$i ]; then
409   - cp /srv/www/obs/webclient/config/environments/$i /srv/www/obs/webui/config/environments/$i
410   - fi
411 450 if [ -e /srv/www/obs/frontend/config/environments/$i ] && [ ! -e /srv/www/obs/api/config/environments/$i ]; then
412 451 cp /srv/www/obs/frontend/config/environments/$i /srv/www/obs/api/config/environments/$i
413 452 fi
414 453 done
415   -# install initial version of database config
416   -if [ ! -e /srv/www/obs/webui/config/database.yml ]; then
417   - cp -a /srv/www/obs/webui/config/database.yml.example /srv/www/obs/webui/config/database.yml
418   -fi
419   -if [ ! -e /srv/www/obs/api/config/database.yml ]; then
420   - cp -a /srv/www/obs/api/config/database.yml.example /srv/www/obs/api/config/database.yml
  454 +# for update from 2.1(lighttpd), do a chown
  455 +if [ `stat -c %U /srv/www/obs/api/config/secret.key` == lighttpd ]; then
  456 + chown wwwrun.www /srv/www/obs/api/config/secret.key
421 457 fi
422   -# for update to 1.7, new names of components
423   -if [ -e /etc/lighttpd/vhosts.d/obs.conf ]; then
424   - sed -i -e 's,/srv/www/obs/webclient,/srv/www/obs/webui,' \
425   - -e 's,/srv/www/obs/frontend,/srv/www/obs/api,' \
426   - /etc/lighttpd/vhosts.d/obs.conf
  458 +if [ `stat -c %U /srv/www/obs/webui/config/secret.key` == lighttpd ]; then
  459 + chown wwwrun.www /srv/www/obs/webui/config/secret.key
427 460 fi
428   -echo '**** Keep in mind to run rake db:migrate after updating this package (read README.UPDATERS) ****'
429   -%restart_on_update lighttpd
  461 +echo '**** Keep in mind to run rake db:migrate after updating this package and restart apache (read README.UPDATERS) ****'
430 462
431 463 %postun -n obs-api
432 464 %insserv_cleanup
@@ -440,7 +472,7 @@ rm -rf $RPM_BUILD_ROOT
440 472 %dir /etc/slp.reg.d
441 473 %dir /usr/lib/obs
442 474 %dir /usr/lib/obs/server
443   -/etc/logrotate.d/obs-server.logrotate
  475 +/etc/logrotate.d/obs-server
444 476 /etc/init.d/obsdispatcher
445 477 /etc/init.d/obspublisher
446 478 /etc/init.d/obsrepserver
@@ -448,7 +480,6 @@ rm -rf $RPM_BUILD_ROOT
448 480 /etc/init.d/obssrcserver
449 481 /etc/init.d/obswarden
450 482 /etc/init.d/obssigner
451   -/etc/init.d/obsstoragesetup
452 483 /usr/sbin/obs_admin
453 484 /usr/sbin/obs_serverstatus
454 485 /usr/sbin/rcobsdispatcher
@@ -458,10 +489,10 @@ rm -rf $RPM_BUILD_ROOT
458 489 /usr/sbin/rcobssrcserver
459 490 /usr/sbin/rcobswarden
460 491 /usr/sbin/rcobssigner
461   -/usr/sbin/rcobsstoragesetup
462 492 /usr/lib/obs/server/plugins
463 493 /usr/lib/obs/server/BSAccess.pm
464 494 /usr/lib/obs/server/BSBuild.pm
  495 +/usr/lib/obs/server/BSCando.pm
465 496 /usr/lib/obs/server/BSConfig.pm.template
466 497 /usr/lib/obs/server/BSEvents.pm
467 498 /usr/lib/obs/server/BSFileDB.pm
@@ -495,6 +526,7 @@ rm -rf $RPM_BUILD_ROOT
495 526 /usr/lib/obs/server/XML
496 527 /usr/lib/obs/server/bs_admin
497 528 /usr/lib/obs/server/bs_archivereq
  529 +/usr/lib/obs/server/bs_check_consistency
498 530 /usr/lib/obs/server/bs_dispatch
499 531 /usr/lib/obs/server/bs_publish
500 532 /usr/lib/obs/server/bs_repserver
@@ -509,10 +541,9 @@ rm -rf $RPM_BUILD_ROOT
509 541 /usr/lib/obs/server/BSSolv.pm
510 542 /usr/lib/obs/server/BSSolv.xs
511 543 /usr/lib/obs/server/typemap
  544 +/usr/lib/obs/server/worker-deltagen.spec
512 545 %config(noreplace) /usr/lib/obs/server/BSConfig.pm
513 546 %config(noreplace) /etc/slp.reg.d/*
514   -%attr(-,obsrun,obsrun) /srv/obs
515   -/var/adm/fillup-templates/sysconfig.obs-server
516 547 # created via %post, since rpm fails otherwise while switching from
517 548 # directory to symlink
518 549 %ghost /usr/lib/obs/server/build
@@ -526,32 +557,31 @@ rm -rf $RPM_BUILD_ROOT
526 557
527 558 %files -n obs-worker
528 559 %defattr(-,root,root)
529   -/var/adm/fillup-templates/sysconfig.obs-worker
  560 +/var/adm/fillup-templates/sysconfig.obs-server
530 561 /etc/init.d/obsworker
531 562 /etc/init.d/obsstoragesetup
532 563 /usr/sbin/rcobsworker
533 564 /usr/sbin/rcobsstoragesetup
534   -# intentionally packaged in server and api package
535   -/var/adm/fillup-templates/sysconfig.obs-server
536 565
537 566 %files -n obs-api
538 567 %defattr(-,root,root)
539 568 %doc dist/{README.UPDATERS,README.SETUP} docs/openSUSE.org.xml ReleaseNotes-* README COPYING AUTHORS
  569 +/srv/www/obs/overview
  570 +
540 571 %dir /srv/www/obs
541 572 %dir /srv/www/obs/api
542 573 %dir /srv/www/obs/api/config
543 574 %dir /srv/www/obs/api/config/initializers
544 575 %dir /srv/www/obs/api/config/environments
545 576 %dir /srv/www/obs/api/files
546   -/etc/logrotate.d/obs-build.logrotate
547   -/etc/logrotate.d/obs-api.logrotate
  577 +/etc/logrotate.d/obs-build
  578 +/etc/logrotate.d/obs-api
548 579 /etc/init.d/obsapidelayed
549 580 /etc/init.d/obsapisetup
550 581 /usr/sbin/rcobsapisetup
551 582 /usr/sbin/rcobsapidelayed
552 583 /srv/www/obs/api/app
553 584 /srv/www/obs/api/db
554   -/srv/www/obs/api/doc
555 585 /srv/www/obs/api/files/wizardtemplate.spec
556 586 /srv/www/obs/api/lib
557 587 /srv/www/obs/api/public
@@ -560,8 +590,6 @@ rm -rf $RPM_BUILD_ROOT
560 590 /srv/www/obs/api/test
561 591 /srv/www/obs/api/vendor
562 592 /srv/www/obs/docs
563   -# intentionally packaged in server and api package
564   -/var/adm/fillup-templates/sysconfig.obs-server
565 593
566 594 #
567 595 # some files below config actually are _not_ config files
@@ -571,10 +599,12 @@ rm -rf $RPM_BUILD_ROOT
571 599 /srv/www/obs/api/config/boot.rb
572 600 /srv/www/obs/api/config/routes.rb
573 601 /srv/www/obs/api/config/environments/development.rb
574   -/srv/www/obs/api/config/database.yml.example
  602 +%attr(0640,root,www) %config(noreplace) /srv/www/obs/api/config/database.yml*
  603 +%attr(0644,root,root) %config(noreplace) /srv/www/obs/api/config/options.yml*
575 604 /srv/www/obs/api/config/environments/production_test.rb
576 605 /srv/www/obs/api/config/initializers/options.rb
577 606 /srv/www/obs/api/config/initializers/logging.rb
  607 +/srv/www/obs/api/config/initializers/create_runtime_directories.rb
578 608
579 609 %config /srv/www/obs/api/config/environment.rb
580 610 %config(noreplace) /srv/www/obs/api/config/lighttpd.conf
@@ -583,23 +613,20 @@ rm -rf $RPM_BUILD_ROOT
583 613 %config(noreplace) /srv/www/obs/api/config/environments/stage.rb
584 614 %config(noreplace) /srv/www/obs/api/config/environments/development_base.rb
585 615 %config(noreplace) /srv/www/obs/api/config/active_rbac_config.rb
586   -%config(noreplace) /srv/www/obs/api/config/options.yml
587 616 %config(noreplace) /srv/www/obs/api/files/distributions.xml
588 617 %config(noreplace) /etc/cron.d/obs-api
589   -%attr(0644,root,root) %ghost %config(noreplace) /srv/www/obs/webui/config/database.yml
590 618
591   -%dir %attr(-,lighttpd,lighttpd) /srv/www/obs/api/log
592   -%verify(not size md5) %attr(-,lighttpd,lighttpd) /srv/www/obs/api/log/production.log
593   -%attr(-,lighttpd,lighttpd) /srv/www/obs/api/tmp
  619 +%dir %attr(-,wwwrun,www) /srv/www/obs/api/log
  620 +%verify(not size md5) %attr(-,wwwrun,www) /srv/www/obs/api/log/production.log
  621 +%attr(-,wwwrun,www) /srv/www/obs/api/tmp
594 622
595 623 # starting the webui part
596 624 %dir /srv/www/obs/webui
597 625 # sqlite3 needs write permissions
598   -%dir %attr(-,lighttpd,lighttpd) /srv/www/obs/webui/db
  626 +%dir %attr(-,wwwrun,www) /srv/www/obs/webui/db
599 627 /srv/www/obs/webui/app
600 628 /srv/www/obs/webui/db/migrate
601 629 /srv/www/obs/webui/db/schema.rb
602   -/srv/www/obs/webui/doc
603 630 /srv/www/obs/webui/lib
604 631 /srv/www/obs/webui/public
605 632 /srv/www/obs/webui/Rakefile
@@ -615,21 +642,28 @@ rm -rf $RPM_BUILD_ROOT
615 642 /srv/www/obs/webui/README.theme
616 643 /srv/www/obs/webui/config/initializers/options.rb
617 644 /srv/www/obs/webui/config/initializers/logging.rb
618   -/srv/www/obs/webui/config/database.yml.example
  645 +/srv/www/obs/webui/config/initializers/create_runtime_directories.rb
  646 +/srv/www/obs/webui/config/initializers/xhtml_init.rb
619 647
620 648 %config /srv/www/obs/webui/config/boot.rb
621 649 %config /srv/www/obs/webui/config/environment.rb
622   -%config(noreplace) /srv/www/obs/webui/config/options.yml
623 650 %config(noreplace) /srv/www/obs/webui/config/environments/production.rb
624 651 %config(noreplace) /srv/www/obs/webui/config/environments/test.rb
625 652 %config(noreplace) /srv/www/obs/webui/config/environments/stage.rb
626 653 %config(noreplace) /srv/www/obs/webui/config/environments/development_base.rb
627 654 %config(noreplace) /srv/www/obs/webui/config/initializers/theme_support.rb
  655 +%attr(0640,root,www) %config(noreplace) /srv/www/obs/webui/config/database.yml*
  656 +%attr(0644,root,root) %config(noreplace) /srv/www/obs/webui/config/options.yml*
  657 +
  658 +%dir %attr(-,wwwrun,www) /srv/www/obs/webui/log
  659 +%config(noreplace) %verify(not size md5) %attr(-,wwwrun,www) /srv/www/obs/webui/db/database.db
  660 +%config(noreplace) %verify(not size md5) %attr(-,wwwrun,www) /srv/www/obs/webui/log/production.log
  661 +%attr(-,wwwrun,www) /srv/www/obs/webui/tmp
628 662
629   -%dir %attr(-,lighttpd,lighttpd) /srv/www/obs/webui/log
630   -%config(noreplace) %verify(not size md5) %attr(-,lighttpd,lighttpd) /srv/www/obs/webui/db/database.db
631   -%config(noreplace) %verify(not size md5) %attr(-,lighttpd,lighttpd) /srv/www/obs/webui/log/production.log
632   -%attr(-,lighttpd,lighttpd) /srv/www/obs/webui/tmp
  663 +# these dirs primarily belong to apache2:
  664 +%dir /etc/apache2
  665 +%dir /etc/apache2/vhosts.d
  666 +%config(noreplace) /etc/apache2/vhosts.d/obs.conf
633 667
634 668 # these dirs primarily belong to lighttpd:
635 669 %config(noreplace) /etc/lighttpd/vhosts.d/obs.conf
@@ -648,4 +682,4 @@ rm -rf $RPM_BUILD_ROOT
648 682 /usr/bin/obs_productconvert
649 683 /usr/lib/obs/server/bs_productconvert
650 684
651   -%changelog -n obs-server
  685 +%changelog

0 comments on commit 278ef3a

Please sign in to comment.
Something went wrong with that request. Please try again.