Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 1e4744e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 10 additions & 0 deletions rpm/build/SOURCES/jenkins.sysconfig.in
Expand Up @@ -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@@
#
Expand Down
7 changes: 5 additions & 2 deletions rpm/build/SPECS/jenkins.spec
Expand Up @@ -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
Expand Down

0 comments on commit 1e4744e

Please sign in to comment.