From 1d5952bb9c33f353dcec3a364c477c7e719023f5 Mon Sep 17 00:00:00 2001 From: Matej Ferencevic Date: Fri, 3 Apr 2020 18:47:09 +0200 Subject: [PATCH] Fix RPM package installation Summary: `chattr` must be after `chown`. Reviewers: buda Reviewed By: buda Differential Revision: https://phabricator.memgraph.io/D2752 --- release/rpm/community/memgraph.spec.in | 7 +++++-- release/rpm/enterprise/memgraph.spec.in | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/release/rpm/community/memgraph.spec.in b/release/rpm/community/memgraph.spec.in index 22e2db896..32fa03aa5 100644 --- a/release/rpm/community/memgraph.spec.in +++ b/release/rpm/community/memgraph.spec.in @@ -76,13 +76,16 @@ for i in /usr/share/memgraph/examples/*; do if [ ! -d $i/telemetry ]; then mkdir $i/telemetry || exit 1 fi - # Make snapshots directory immutable (optional) - chattr +i -R $i/snapshots || true done # Change ownership of all examples chown -R memgraph:memgraph /usr/share/memgraph/examples || exit 1 +# Make snapshots directory immutable (optional) +for i in /usr/share/memgraph/examples/*; do + chattr +i -R $i/snapshots || true +done + # Generate SSL certificates if [ ! -d /etc/memgraph/ssl ]; then mkdir /etc/memgraph/ssl || exit 1 diff --git a/release/rpm/enterprise/memgraph.spec.in b/release/rpm/enterprise/memgraph.spec.in index 10c533040..c13c219e7 100644 --- a/release/rpm/enterprise/memgraph.spec.in +++ b/release/rpm/enterprise/memgraph.spec.in @@ -76,13 +76,16 @@ for i in /usr/share/memgraph/examples/*; do if [ ! -d $i/telemetry ]; then mkdir $i/telemetry || exit 1 fi - # Make snapshots directory immutable (optional) - chattr +i -R $i/snapshots || true done # Change ownership of all examples chown -R memgraph:memgraph /usr/share/memgraph/examples || exit 1 +# Make snapshots directory immutable (optional) +for i in /usr/share/memgraph/examples/*; do + chattr +i -R $i/snapshots || true +done + # Generate SSL certificates if [ ! -d /etc/memgraph/ssl ]; then mkdir /etc/memgraph/ssl || exit 1