Skip to content

Commit

Permalink
PMM-12231 set grafana as owner of the plugin dir (#2365)
Browse files Browse the repository at this point in the history
* PMM-12231 set grafana ownership of the plugin dir

* PMM-12231 fix the spec's path to built plugins

* PMM-12231 apply permissions on the whole directory
  • Loading branch information
Alex Tymchuk authored Jul 17, 2023
1 parent bfc9776 commit 46b7060
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
13 changes: 8 additions & 5 deletions build/packages/rpm/server/SPECS/percona-dashboards.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%global commit ad4af6808bcd361284e8eb8cd1f36b1e98e32bce
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%define build_timestamp %(date -u +"%y%m%d%H%M")
%define release 19
%define release 20
%define rpm_release %{release}.%{build_timestamp}.%{shortcommit}%{?dist}

Name: percona-dashboards
Expand Down Expand Up @@ -44,19 +44,22 @@ install -d %{buildroot}%{_datadir}/%{name}
install -d %{buildroot}%{_datadir}/%{name}/panels/pmm-app
install -d %{buildroot}%{_datadir}/%{name}/setup-page

cp -pa ./panels %{buildroot}%{_datadir}/%{name}
cp -pa ./pmm-app/dist %{buildroot}%{_datadir}/%{name}/panels/pmm-app
cp -rpa ./setup-page/build/* %{buildroot}%{_datadir}/%{name}/setup-page
cp -a ./panels %{buildroot}%{_datadir}/%{name}
cp -a ./pmm-app/dist %{buildroot}%{_datadir}/%{name}/panels/pmm-app
cp -ra ./setup-page/build/* %{buildroot}%{_datadir}/%{name}/setup-page
echo %{version} > %{buildroot}%{_datadir}/%{name}/VERSION


%files
%license LICENSE
%doc README.md LICENSE
%{_datadir}/%{name}
%attr(-,grafana,grafana) %{_datadir}/%{name}


%changelog
* Wed Jul 12 2023 Alex Tymchuk <[email protected]> - 2.39.0-20
- PMM-12231 Set grafana user as owner of plugins directory

* Tue May 16 2023 Oleksii Kysil <[email protected]> - 2.38.0-1
- PMM-12118 Skip stripping of plugin binaries

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@
src: /usr/share/percona-dashboards/panels/
dest: /srv/grafana/plugins/

- name: Set permissions for the plugin directory
file:
path: "/srv/grafana/plugins"
state: directory
owner: grafana
group: grafana
mode: "0775"

- name: Check that the SQLite grafana database exists
stat:
path: /srv/grafana/grafana.db
Expand Down

0 comments on commit 46b7060

Please sign in to comment.