Changeset 845
- Timestamp:
- 04/28/13 09:00:08 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.0/pkg/rpm/jobmonarch.spec.in
r842 r845 11 11 %{!?custom_web_prefixdir: %define web_prefixdir /var/www/html/ganglia} 12 12 13 %define gangliaroot %{web_prefixdir} /ganglia13 %define gangliaroot %{web_prefixdir} 14 14 %define gangliatemplatedir %{gangliaroot}/templates 15 15 %define gangliaaddonsdir %{gangliaroot}/addons … … 26 26 BuildArch: noarch 27 27 BuildRoot: %{_tmppath}/%{name} 28 BuildRequires: fakeroot 28 29 Requires: jobmonarch-jobarchived jobmonarch-jobmond jobmonarch-webfrontend 29 30 30 # Following requires were moved to the config.xml file in order to keep the 31 # RPM distro-independent 32 #Requires: mysql-client python-mysql 33 #%if %suse_version 34 #Requires: php5-gd >= 2.0 php5-mbstring 35 #%else 36 #Requires: php-gd >= 2.0 php-mbstring 37 #%endif 38 #AutoReqProv: no 31 AutoReqProv: no 39 32 40 33 %description … … 87 80 Requires: ganglia-web >= 3.5.7 88 81 Requires: jobmonarch-jobmond = 1.0 89 Requires: php -gd82 Requires: php >= 5.3.0 90 83 Requires: php-pgsql 84 %if 0%{?suse_version} 85 Requires: php5-gd >= 2.0 php5-mbstring 86 %else 87 Requires: php-gd >= 2.0 php-mbstring 88 %endif 91 89 92 90 %description -n jobmonarch-webfrontend … … 109 107 110 108 # Install files in RPM_BUILD_ROOT 111 %__make install \109 fakeroot %__make install \ 112 110 PREFIX=/usr \ 113 111 GANGLIA_ROOT=%{gangliaroot} \ 112 GANGLIA_USER=ganglia.ganglia \ 113 HTTPD_USER=apache.apache \ 114 114 JOBARCHIVE_RRDS=%{_sharedstatedir}/jobarchive \ 115 115 DESTDIR=$RPM_BUILD_ROOT 116 117 116 118 117 %clean … … 123 122 if [ "$1" = 1 ]; then 124 123 /sbin/chkconfig --add jobmond 125 /sbin/service jobmond start126 124 elif [ "$1" = 2 ]; then 127 /sbin/service jobmond restart125 /sbin/service jobmond condrestart 128 126 fi 129 127 … … 131 129 # $1 = 1 => install ($1 = 2 => upgrade) 132 130 if [ "$1" = 1 ]; then 133 if [ -x /usr/sbin/systemctl ]; then134 if [ ! -d %{_sharedstatedir}/pgsql/data/base ]; then135 %{_bindir}/postgresql-setup initdb136 fi137 %{_sbindir}/systemctl enable postgresql138 %{_sbindir}/systemctl start postgresql139 elif [ -x /sbin/chkconfig ]; then140 if [ ! -d %{_sharedstatedir}/pgsql/data/base ]; then141 /sbin/service postgresql initdb142 fi143 /sbin/chkconfig --level 235 postgresql on144 /sbin/service postgresql start145 fi146 131 # Generate a 8 char password for the database: 147 132 export DB_PASSWD=$(tr -dc A-Za-z0-9_< /dev/urandom |head -c 8 | xargs) … … 152 137 # Set the password in the ganglia conf.php 153 138 sed -i -e "s|^//\$JOB_ARCHIVE_SQL_PASSWORD.*|\$JOB_ARCHIVE_SQL_PASSWORD = \"$DB_PASSWD\"|g" %{gangliaaddonsdir}/job_monarch/conf.php 154 # Create the database 155 su -l postgres -c "%{_bindir}/createdb jobarchive" 156 # Ccreate the tables. 157 su -l postgres -c "%{_bindir}/psql -f %{_datadir}/jobarchived/job_dbase.sql jobarchive" 139 # Enable the service 158 140 /sbin/chkconfig --add jobarchived 159 /sbin/service jobarchived start160 141 elif [ "$1" = 2 ]; then 161 /sbin/service jobarchived restart142 /sbin/service jobarchived condrestart 162 143 fi 163 144 … … 298 279 %{gangliaaddonsdir}/job_monarch/dwoo/plugins/builtin/functions/count_words.php 299 280 %{gangliaaddonsdir}/job_monarch/dwoo/plugins/builtin/functions/date_format.php 300 %dir % {gangliaaddonsdir}/job_monarch/dwoo/compiled281 %dir %attr(755,apache,apache) %{gangliaaddonsdir}/job_monarch/dwoo/compiled 301 282 %dir %{gangliaaddonsdir}/job_monarch/dwoo/cache 302 283 %dir %{gangliaaddonsdir}/job_monarch/dwoo/Dwoo … … 390 371 - Fix the correct jobarchive rrd file path. 391 372 - Generate a password for the database and update config files accordingly. 373 - Set the correct permissions for %{gangliaaddonsdir}/job_monarch/dwoo/compiled 392 374 393 375 * Tue Apr 23 2013 Olivier Lahaye <olivier.lahaye@free.fr> 1.0-2
Note: See TracChangeset
for help on using the changeset viewer.