ganglia / ganglia-web

Ganglia Web Frontend
BSD 3-Clause "New" or "Revised" License
316 stars 170 forks source link

Reworked the install and packaging so it results in the same installation whatever the build is (manual, deb pkg or rpm pkg) #231

Closed olahaye74 closed 10 years ago

olahaye74 commented 10 years ago

No need to %__cp %{SOURCE1}. File already there. Note: using more than one source prevent a build from tarball using rpmbuild -tb ganglia-web-3.5.12.tar.gz for instance.

olahaye74 commented 10 years ago

[build & packaging] Reworked the install and packaging so it results in the same installation whatever the build is (manual, deb pkg or rpm pkg)

olahaye74 commented 10 years ago

Tested on ubuntu 12.04: Works perfectly. Tested on centos-6.5: Works perfectly. Tested on fedora-17: Works perfectly.

olahaye74 commented 10 years ago

Small fix that prevent to fall in a situation similar to https://bugs.launchpad.net/rpm/+bug/930471 Thus using --with web_prefixdir=/usr/share/ganglia-webfrontend --with httpd_user=www-data would end up having the following lua variables: %web_prefixdir = /usr/share/ganglia_webfrontend %httpd_user = www_data

olahaye74 commented 10 years ago

Hopefully, this time, there is no more mistakes :)

olahaye74 commented 10 years ago

--with doesn't accept value assignation and was apparently an unsupported option in previous rpm versions. Fixed by replacing --with var=value with --define 'var value' Aslo made Makefile more smart and more vebose. Splitted install: rule in 2 rules: one that installs the files and one that does the chown. Thus package can be built with non-root account.