Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #396 from kshlm/updates-rpm-spec
Browse files Browse the repository at this point in the history
extras/rpms: Update specfile to support templates
  • Loading branch information
prashanthpai authored Oct 27, 2017
2 parents a862521 + bb609ec commit 9134778
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
26 changes: 20 additions & 6 deletions extras/rpms/glusterd2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Summary: The GlusterFS management daemon (preview)
License: GPLv2 or LGPLv3+
URL: https://%{provider_prefix}
Source0: https://%{provider_prefix}/archive/v%{version}-%{release}/%{name}-v%{version}-%{release}.tar.gz
Source1: glusterd.toml
Source1: glusterd2.toml

ExclusiveArch: x86_64

Expand All @@ -24,7 +24,7 @@ BuildRequires: git
BuildRequires: mercurial
BuildRequires: systemd

Requires: glusterfs-server >= 3.11.0
Requires: glusterfs-server >= 4.0dev
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Expand All @@ -47,20 +47,27 @@ pushd src/%{import_path}
make vendor-install
# Build glusterd2
make glusterd2
make glustercli
popd

%install
#Install glusterd2 binary
# TODO: Use make install to install
#Install glusterd2 & glustercli binary
install -D -p -m 0755 build/%{name} %{buildroot}%{_sbindir}/%{name}
install -D -p -m 0755 build/glustercli %{buildroot}%{_sbindir}/glustercli
#Install systemd unit
install -D -p -m 0644 extras/systemd/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
#Install glusterd config into etc
install -d -m 0755 %{buildroot}%{_sysconfdir}/glusterd
install -m 0644 -t %{buildroot}%{_sysconfdir}/glusterd %{SOURCE1}
install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}
install -m 0644 -t %{buildroot}%{_sysconfdir}/%{name} %{SOURCE1}
# Create /var/lib/glusterd2
install -d -m 0755 %{buildroot}%{_sharedstatedir}/%{name}
# logdir
install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}
#Install templates
install -d -m 0755 %{buildroot}%{_datadir}/%{name}/templates
install -D -m 0644 -t %{buildroot}%{_datadir}/%{name}/templates volgen/templates/*.graph


%post
%systemd_post %{name}.service
Expand All @@ -73,11 +80,18 @@ install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}

%files
%{_sbindir}/%{name}
%config(noreplace) %{_sysconfdir}/glusterd
%{_sbindir}/glustercli
%config(noreplace) %{_sysconfdir}/%{glusterd2}
%{_unitdir}/%{name}.service
%dir %{_sharedstatedir}/%{name}
%dir %{_localstatedir}/log/%{name}
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/templates
%{_datadir}/%{name}/templates/*

%changelog
* Thu Oct 26 2017 Kaushal M <[email protected]> - 4.0dev-8
- Update spec file

* Mon Jul 03 2017 Kaushal M <[email protected]> - 4.0dev-7
- Initial spec
1 change: 1 addition & 0 deletions extras/rpms/glusterd.toml → extras/rpms/glusterd2.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
localstatedir = "/var/lib/glusterd2"
logdir = "/var/log/glusterd2"
logfile = "glusterd2.log"
templatesdir = "/usr/share/glusterd2/templates"

0 comments on commit 9134778

Please sign in to comment.