Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Aug 23, 2014

Conversation

olahaye74
Copy link
Contributor

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.

No need to %__cp %SOURCE1 as well.
More over, using more than one source prevent a build from tarball using
rpmbuild -tb ganglia-web-3.5.12.tar.gz for instance.
…in the same

  installation whatever the build is (manual, deb pkg or rpm pkg)
- Use Makefile to make install for deb and rpm as well including config files.
- Include specfile in the dist-gzip so a rpmbuild -tb (tarbuild) can be used
- Added customization for rpmbuild using --with tags (see spec file for
  usage and more details).
- Use adequate default values for rpm. The apache_user is not www-data. it's apache...
- Use /etc/ganglia-webfrontend to store conf.php what ever the distro is.
  Make sure that a link is set to apache config dir using triggers or postinstall.
- Use /etc/ganglia-webfrontend to store conf.php what ever the distro is.
  Use a generic conf.php in /usr/share/ganglia-webfrontend to load the file from
  /etc/ganglia-webfrontend.
- Replaced vargwebstatedir with vargwebdir in conf_default.php.in and Makefile.
- filters dir was not created under debian pkg or manual make install
- Added possibility to have a httpd_group different from user. For instance you
  can choose to install files under apache.daemon identity. If not specified,
  a group with the same name as the user is used.
- Added comment in the install section of the Makefile so it's clear.
- Reworked dist-gzip target so version.php  and spec file are generated while other
  .in files remain so they can be tuned by make or make install.
- Make sure that sharedstatedir is not owned by rpm package (conflict on fc-18+),
  and updated %file section accordingly.
- Removed the manual install and specific config files in debian packaging. Using
  standard make install DESTDIR=...
@olahaye74
Copy link
Contributor Author

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

  • Use Makefile to make install for deb and rpm as well including config files.
  • Include specfile in the dist-gzip so a rpmbuild -tb (tarbuild) can be used
  • Added customization for rpmbuild using --with tags (see spec file for
    usage and more details).
  • Use adequate default values for rpm. The apache_user is not www-data. it's apache...
  • Use /etc/ganglia-webfrontend to store conf.php what ever the distro is.
    Make sure that a link is set to apache config dir using triggers or postinstall.
  • Use /etc/ganglia-webfrontend to store conf.php what ever the distro is.
    Use a generic conf.php in /usr/share/ganglia-webfrontend to load the file from
    /etc/ganglia-webfrontend.
  • Replaced vargwebstatedir with vargwebdir in conf_default.php.in and Makefile.
  • filters dir was not created under debian pkg or manual make install
  • Added possibility to have a httpd_group different from user. For instance you
    can choose to install files under apache.daemon identity. If not specified,
    a group with the same name as the user is used.
  • Added comment in the install section of the Makefile so it's clear.
  • Reworked dist-gzip target so version.php and spec file are generated while other
    .in files remain so they can be tuned by make or make install.
  • Make sure that sharedstatedir is not owned by rpm package (conflict on fc-18+),
    and updated %file section accordingly.
  • Removed the manual install and specific config files in debian packaging. Using
    standard make install DESTDIR=...

@olahaye74
Copy link
Contributor Author

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

@olahaye74
Copy link
Contributor Author

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
Copy link
Contributor Author

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

… adapted specfile for this.

Now Makefile has a rule that install files without setting ownership. this permit to build an rpm without being root.
using --define magro for specfile tunning.
@olahaye74
Copy link
Contributor Author

--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.

vvuksan added a commit that referenced this pull request Aug 23, 2014
Reworked the install and packaging so it results in the same installation whatever the build is (manual, deb pkg or rpm pkg)
@vvuksan vvuksan merged commit 65a6674 into ganglia:master Aug 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants