From 896c9ceb5d3891bd176d825c8abb83a9f8b86f6e Mon Sep 17 00:00:00 2001 From: Christoph Dwertmann Date: Fri, 7 Jun 2013 19:00:35 +1000 Subject: [PATCH] Adds warning not to build as root, otherwise the RVM installer will place two files in /etc --- README | 2 +- rpm/create_rpm_from_here | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README b/README index 5c19ee3..be24f78 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ This is basically a .spec file which builds and packages RVM and selected Rubies & Gems into a RPM. RVM is installed system-wide for all users and is ready to use immediately, with no compilation needed on the target machine. -Just clone this repo, customize the rubies and gems needed as indicated below and launch: +Just clone this repo, customize the rubies and gems needed as indicated below and run (as user, not root!): ./rpm/create_rpm_from_here diff --git a/rpm/create_rpm_from_here b/rpm/create_rpm_from_here index a6dfd59..a5a7c92 100755 --- a/rpm/create_rpm_from_here +++ b/rpm/create_rpm_from_here @@ -3,6 +3,11 @@ # This script will build a RPM from the files in the current directory, given that there is a rpm/file.spec # Its primary purpose is to be used by Jenkins +if [ $UID == 0 ]; then + echo "Please do not build RPM packages as root" + exit 1 +fi + set -e set -x -- 2.43.0