Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-23273] Update comments
  • Loading branch information
raul-arabaolaza committed Jan 27, 2017
1 parent 15a2e69 commit bd92f0a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions rpm/build/SPECS/jenkins.spec
Expand Up @@ -77,8 +77,7 @@ rm -rf "%{buildroot}"
-d "%{workdir}" %{name} &>/dev/null || :

# Used to decide later if we should perform a chown in case JENKINS_INSTALL_SKIP_CHOWN is false
# Check if a previous installation exists, if so use the configured JENKINS_USER to generate a files file for later use
# And check the JENKINS_HOME value and existing owners of work, log and cache dir, need to to this check
# Check if a previous installation exists, if so check the JENKINS_HOME value and existing owners of work, log and cache dir, need to to this check
# here because the %files directive overwrites folder owners, I have not found a simple way to make the
# files directive to use JENKINS_USER as owner.
if [ -f "/etc/sysconfig/%{name}" ]; then
Expand All @@ -94,7 +93,10 @@ rm -rf "%{buildroot}"
%post
/sbin/chkconfig --add %{name}

# Ensure the right ownership on files only if not owned by JENKINS_USER
# Ensure the right ownership on files only if not owned by JENKINS_USER and JENKINS_USER
# != %{name}, namely all cases but the default one (configured for %{name} owned by %{name})
# In any case if JENKINS_INSTALL_SKIP_CHOWN is true we do not chown anything to maintain
# the existing semantics
. /etc/sysconfig/%{name}
if test x"$JENKINS_INSTALL_SKIP_CHOWN" != "xtrue"; then
if [ -f "/tmp/cacheowner" ]; then
Expand Down

0 comments on commit bd92f0a

Please sign in to comment.