diff --git a/opensuse/SOURCES/jenkins.sysconfig.in b/opensuse/SOURCES/jenkins.sysconfig.in index fd19541203b9a184133881393c75c5a8e83a081f..345c96d0a28b727cfe59fc7f80e02a10530ba1b1 100644 --- a/opensuse/SOURCES/jenkins.sysconfig.in +++ b/opensuse/SOURCES/jenkins.sysconfig.in @@ -19,14 +19,14 @@ JENKINS_HOME="@@HOME@@" JENKINS_JAVA_CMD="" ## Type: string -## Default: "hudson" +## Default: "jenkins" ## ServiceRestart: jenkins # # Unix user account that runs the Hudson daemon # Be careful when you change this, as you need to update # permissions of $JENKINS_HOME and /var/log/jenkins. # -JENKINS_USER="hudson" +JENKINS_USER="jenkins" ## Type: string ## Default: "-Djava.awt.headless=true" diff --git a/opensuse/SPECS/jenkins.spec b/opensuse/SPECS/jenkins.spec index b0f10ba8c7150805bd0974c7ca42f509729fa762..9013e109a357b024983811cc20753bede4d0172a 100644 --- a/opensuse/SPECS/jenkins.spec +++ b/opensuse/SPECS/jenkins.spec @@ -2,7 +2,7 @@ # - how to add to the trusted service of the firewall? %define _prefix %{_usr}/lib/jenkins -%define workdir %{_var}/lib/hudson +%define workdir %{_var}/lib/jenkins Name: jenkins Version: %{ver} @@ -36,18 +36,18 @@ PreReq: /usr/sbin/groupadd /usr/sbin/useradd BuildArch: noarch %description -Hudson monitors executions of repeated jobs, such as building a software -project or jobs run by cron. Among those things, current Hudson focuses on the +Jenkins monitors executions of repeated jobs, such as building a software +project or jobs run by cron. Among those things, current Jenkins focuses on the following two jobs: - Building/testing software projects continuously, just like CruiseControl or - DamageControl. In a nutshell, Hudson provides an easy-to-use so-called + DamageControl. In a nutshell, Jenkins provides an easy-to-use so-called continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases the productivity. - Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs, even those that are run on a remote machine. For example, with cron, all you receive is regular e-mails that capture the output, and it is up to - you to look at them diligently and notice when it broke. Hudson keeps those + you to look at them diligently and notice when it broke. Jenkins keeps those outputs and makes it easy for you to notice when something is wrong. @@ -82,14 +82,29 @@ rm -rf "%{buildroot}" %__install -D -m0644 "%{SOURCE4}" "%{buildroot}/etc/zypp/repos.d/jenkins.repo" %pre -/usr/sbin/groupadd -r hudson &>/dev/null || : +/usr/sbin/groupadd -r jenkins &>/dev/null || : # SUSE version had -o here, but in Fedora -o isn't allowed without -u -/usr/sbin/useradd -g hudson -s /bin/false -r -c "Hudson Continuous Build server" \ - -d "%{workdir}" hudson &>/dev/null || : +/usr/sbin/useradd -g jenkins -s /bin/false -r -c "Jenkins Continuous Build server" \ + -d "%{workdir}" jenkins &>/dev/null || : %post /sbin/chkconfig --add jenkins +# If we have an old hudson install, rename it to jenkins +if test -d /var/lib/hudson; then + # leave a marker to indicate this came from Hudson. + # could be useful down the road + # This also ensures that the .??* wildcard matches something + touch /var/lib/hudson/.moving-hudson + mv -f /var/lib/hudson/* /var/lib/hudson/.??* /var/lib/jenkins + rmdir /var/lib/hudson + find /var/lib/jenkins -user hudson -exec chown jenkins {} + || true +fi +if test -d /var/run/hudson; then + mv -f /var/run/hudson/* /var/run/jenkins + rmdir /var/run/hudson +fi + %preun if [ "$1" = 0 ] ; then # if this is uninstallation as opposed to upgrade, delete the service @@ -111,8 +126,8 @@ exit 0 %defattr(-,root,root) %dir %{_prefix} %{_prefix}/%{name}.war -%attr(0755,hudson,hudson) %dir %{workdir} -%attr(0750,hudson,hudson) /var/log/jenkins +%attr(0755,jenkins,jenkins) %dir %{workdir} +%attr(0750,jenkins,jenkins) /var/log/jenkins %config /etc/logrotate.d/%{name} %config /etc/init.d/%{name} %config /etc/sysconfig/%{name} diff --git a/rpm/SOURCES/jenkins.sysconfig.in b/rpm/SOURCES/jenkins.sysconfig.in index 6bd752365bae785beae2db553732dd8e289abf70..93c17fc1e7efddb3d204331173825e53e274cd1b 100644 --- a/rpm/SOURCES/jenkins.sysconfig.in +++ b/rpm/SOURCES/jenkins.sysconfig.in @@ -19,14 +19,14 @@ JENKINS_HOME="@@HOME@@" JENKINS_JAVA_CMD="" ## Type: string -## Default: "hudson" +## Default: "jenkins" ## ServiceRestart: jenkins # # Unix user account that runs the Jenkins daemon # Be careful when you change this, as you need to update # permissions of $JENKINS_HOME and /var/log/jenkins. # -JENKINS_USER="hudson" +JENKINS_USER="jenkins" ## Type: string ## Default: "-Djava.awt.headless=true" diff --git a/rpm/SPECS/jenkins.spec b/rpm/SPECS/jenkins.spec index 94bf19ca8c01a5b0791a9b35c67fbd70faf56938..01f259a20a248d6671f6f8f4c9b4e8e6802155bc 100644 --- a/rpm/SPECS/jenkins.spec +++ b/rpm/SPECS/jenkins.spec @@ -2,7 +2,7 @@ # - how to add to the trusted service of the firewall? %define _prefix %{_usr}/lib/jenkins -%define workdir %{_var}/lib/hudson +%define workdir %{_var}/lib/jenkins Name: jenkins Version: %{ver} @@ -40,18 +40,18 @@ PreReq: /usr/sbin/groupadd /usr/sbin/useradd BuildArch: noarch %description -Hudson monitors executions of repeated jobs, such as building a software -project or jobs run by cron. Among those things, current Hudson focuses on the +Jenkins monitors executions of repeated jobs, such as building a software +project or jobs run by cron. Among those things, current Jenkins focuses on the following two jobs: - Building/testing software projects continuously, just like CruiseControl or - DamageControl. In a nutshell, Hudson provides an easy-to-use so-called + DamageControl. In a nutshell, Jenkins provides an easy-to-use so-called continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases the productivity. - Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs, even those that are run on a remote machine. For example, with cron, all you receive is regular e-mails that capture the output, and it is up to - you to look at them diligently and notice when it broke. Hudson keeps those + you to look at them diligently and notice when it broke. Jenkins keeps those outputs and makes it easy for you to notice when something is wrong. @@ -86,14 +86,30 @@ rm -rf "%{buildroot}" %__install -D -m0644 "%{SOURCE4}" "%{buildroot}/etc/yum.repos.d/jenkins.repo" %pre -/usr/sbin/groupadd -r hudson &>/dev/null || : +/usr/sbin/groupadd -r jenkins &>/dev/null || : # SUSE version had -o here, but in Fedora -o isn't allowed without -u -/usr/sbin/useradd -g hudson -s /bin/false -r -c "Hudson Continuous Build server" \ - -d "%{workdir}" hudson &>/dev/null || : +/usr/sbin/useradd -g jenkins -s /bin/false -r -c "Jenkins Continuous Build server" \ + -d "%{workdir}" jenkins &>/dev/null || : %post /sbin/chkconfig --add jenkins +# If we have an old hudson install, rename it to jenkins +if test -d /var/lib/hudson; then + # leave a marker to indicate this came from Hudson. + # could be useful down the road + # This also ensures that the .??* wildcard matches something + touch /var/lib/hudson/.moving-hudson + mv -f /var/lib/hudson/* /var/lib/hudson/.??* /var/lib/jenkins + rmdir /var/lib/hudson + find /var/lib/jenkins -user hudson -exec chown jenkins {} + || true +fi +if test -d /var/run/hudson; then + mv -f /var/run/hudson/* /var/run/jenkins + rmdir /var/run/hudson +fi + + %preun if [ "$1" = 0 ] ; then # if this is uninstallation as opposed to upgrade, delete the service @@ -115,8 +131,8 @@ exit 0 %defattr(-,root,root) %dir %{_prefix} %{_prefix}/%{name}.war -%attr(0755,hudson,hudson) %dir %{workdir} -%attr(0750,hudson,hudson) /var/log/jenkins +%attr(0755,jenkins,jenkins) %dir %{workdir} +%attr(0750,jenkins,jenkins) /var/log/jenkins %config /etc/logrotate.d/%{name} %config /etc/init.d/%{name} %config /etc/sysconfig/%{name}