Skip to content
Permalink
Browse files

[FIXED JENKINS-23273] /etc/sysconfig option to skip (off default) lon…

…g chown
  • Loading branch information
jieryn committed May 18, 2015
1 parent 26b1323 commit 1e4744ef8ff3cf0f16ea03aabf4afe2478a3e32e
Showing with 15 additions and 2 deletions.
  1. +10 −0 rpm/build/SOURCES/jenkins.sysconfig.in
  2. +5 −2 rpm/build/SPECS/jenkins.spec
@@ -29,6 +29,16 @@ JENKINS_JAVA_CMD=""
JENKINS_USER="@@ARTIFACTNAME@@"

## Type: string
## Default: "false"
## ServiceRestart: jenkins
#
# Whether to skip potentially long-running chown at the
# $JENKINS_HOME location. Do not enable this, "true", unless
# you know what you're doing. See JENKINS-23273.
#
#JENKINS_INSTALL_SKIP_CHOWN="false"

## Type: string
## Default: "-Djava.awt.headless=true"
## ServiceRestart: @@ARTIFACTNAME@@
#
@@ -110,8 +110,11 @@ fi

# Ensure the right ownership on files
. /etc/sysconfig/%{name}
chown -R ${JENKINS_USER:-%{name}} /var/log/%{name}
chown -R ${JENKINS_USER:-%{name}} ${JENKINS_HOME:-%{workdir}}
if test ( "x"$JENKINS_INSTALL_SKIP_CHOWN != "xtrue" ); then
chown -R ${JENKINS_USER:-%{name}} /var/cache/%{name}
chown -R ${JENKINS_USER:-%{name}} /var/log/%{name}
chown -R ${JENKINS_USER:-%{name}} ${JENKINS_HOME:-%{workdir}}
fi

%preun
if [ "$1" = 0 ] ; then

0 comments on commit 1e4744e

Please sign in to comment.
You can’t perform that action at this time.