[arch-commits] Commit in tomcat7/repos/extra-any (8 files)

Guillaume Alaux guillaume at nymeria.archlinux.org
Thu Jan 30 19:47:56 UTC 2014


    Date: Thursday, January 30, 2014 @ 20:47:56
  Author: guillaume
Revision: 204892

archrelease: copy trunk to extra-any

Added:
  tomcat7/repos/extra-any/PKGBUILD
    (from rev 204891, tomcat7/trunk/PKGBUILD)
  tomcat7/repos/extra-any/systemd_tmpfiles.d_tomcat7.conf
    (from rev 204891, tomcat7/trunk/systemd_tmpfiles.d_tomcat7.conf)
  tomcat7/repos/extra-any/systemd_tomcat7.service
    (from rev 204891, tomcat7/trunk/systemd_tomcat7.service)
  tomcat7/repos/extra-any/tomcat7.install
    (from rev 204891, tomcat7/trunk/tomcat7.install)
Deleted:
  tomcat7/repos/extra-any/PKGBUILD
  tomcat7/repos/extra-any/systemd_tmpfiles.d_tomcat7.conf
  tomcat7/repos/extra-any/systemd_tomcat7.service
  tomcat7/repos/extra-any/tomcat7.install

---------------------------------+
 PKGBUILD                        |  273 +++++++++++++++++++-------------------
 systemd_tmpfiles.d_tomcat7.conf |    6 
 systemd_tomcat7.service         |   68 ++++-----
 tomcat7.install                 |   88 ++++++------
 4 files changed, 218 insertions(+), 217 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2014-01-30 19:46:55 UTC (rev 204891)
+++ PKGBUILD	2014-01-30 19:47:56 UTC (rev 204892)
@@ -1,136 +0,0 @@
-# Maintainer: Guillaume ALAUX <guillaume at archlinux.org>
-pkgbase=tomcat7
-pkgname=('java-servlet3.0-tomcat' 'java-jsp2.2-tomcat' 'tomcat7')
-pkgver=7.0.47
-pkgrel=1
-arch=('any')
-url='http://tomcat.apache.org/'
-license=('APACHE')
-makedepends=('java-environment' 'apache-ant>=1.8' 'java-commons-daemon' 'eclipse-ecj')
-source=(http://archive.apache.org/dist/tomcat/tomcat-7/v${pkgver}/src/apache-tomcat-${pkgver}-src.tar.gz
-        http://archive.apache.org/dist/tomcat/tomcat-7/v${pkgver}/bin/apache-tomcat-${pkgver}.tar.gz
-        systemd_tomcat7.service
-        systemd_tmpfiles.d_tomcat7.conf
-        tomcat7.install)
-
-sha256sums=('be7cad1c70b9db84e8b139a81312ecd80761f2e69edbd1d176d49e52f728bc99'
-            '46dc31b08c120ffc2e38dccc119b9df02662a9fb297fa3fc6d90902c2f86057a'
-            '6b3d9711319165c331b827cba40cb788c0d1ea60fd181a56b8da4ca41e2d2930'
-            '4bfeb2f4462547bf15cb2b72db545c0531c70f8640fa79344d520ceea6812a93'
-            '4db469bcbcfb043c63ce3db0412997552861ea0f9c09d8825808570ed75aa27b')
-
-_servletver=3.0
-_jspver=2.2
-
-build() {
-  cd "${srcdir}/apache-tomcat-${pkgver}-src"
-
-  . /etc/profile.d/apache-ant.sh
-
-  ant clean deploy \
-    -Dbase.path=${srcdir}/DOWN_LIBS \
-    -Dcommons-daemon.jar=/usr/share/java/commons-daemon.jar \
-    -Djdt.jar=/usr/share/java/eclipse-ecj.jar \
-    -Dno.build.dbcp=true
-}
-
-#TODO add test "ant test"
-
-package_java-servlet3.0-tomcat() {
-  pkgdesc='Servlet 3.0 java library implementation by Apache Tomcat'
-  depends=('java-environment>=5')
-
-  cd "${srcdir}/apache-tomcat-${pkgver}-src/output/build/lib"
-
-  install -dm755 ${pkgdir}/usr/share/java/servlet${_servletver}-tomcat
-  install -m644 servlet-api.jar \
-                ${pkgdir}/usr/share/java/servlet${_servletver}-tomcat/servlet-api-${_servletver}.jar
-  ln -s servlet${_servletver}-tomcat/servlet-api-${_servletver}.jar \
-        ${pkgdir}/usr/share/java/servlet-api.jar
-}
-
-package_java-jsp2.2-tomcat() {
-  pkgdesc='JSP 2.2 java library implementation by Apache Tomcat'
-  depends=('java-environment>=5')
-
-  cd "${srcdir}/apache-tomcat-${pkgver}-src/output/build/lib"
-
-  install -dm755 ${pkgdir}/usr/share/java/jsp${_jspver}-tomcat
-  for j in el-api jsp-api; do
-    install -m644 ${j}.jar \
-                  ${pkgdir}/usr/share/java/jsp${_jspver}-tomcat/${j}-${_jspver}.jar
-    ln -s jsp${_jspver}-tomcat/${j}-${_jspver}.jar ${pkgdir}/usr/share/java/${j}.jar
-  done
-}
-
-package_tomcat7() {
-  pkgdesc='Servlet-3.0/JSP-2.2 Container'
-  depends=('java-runtime>=6' 'java-jsvc' 'eclipse-ecj'
-           "java-servlet3.0-tomcat=${pkgver}" "java-jsp2.2-tomcat=${pkgver}")
-  optdepends=('tomcat-native: to allow optimal performance in production environments')
-  backup=(etc/tomcat7/catalina.policy
-          etc/tomcat7/catalina.properties
-          etc/tomcat7/context.xml
-          etc/tomcat7/logging.properties
-          etc/tomcat7/server.xml
-          etc/tomcat7/tomcat-users.xml
-          etc/tomcat7/web.xml)
-  install=tomcat7.install
-
-  cd "${srcdir}/apache-tomcat-${pkgver}-src/output/build"
-
-  # Tomcat general files
-  install -dm755 ${pkgdir}/usr/share/{,java/}${pkgname}
-  # commons-daemon and tomcat-natives are packaged on their own
-  rm bin/{*.bat,commons-daemon*,tomcat-native.tar.gz}
-  cp -r bin ${pkgdir}/usr/share/${pkgname}
-
-  # eclipse-ecj is packaged on its own
-  rm lib/eclipse-ecj.jar
-  install -m644 lib/* ${pkgdir}/usr/share/java/${pkgname}
-  ln -s ../eclipse-ecj.jar ${pkgdir}/usr/share/java/${pkgname}/eclipse-ecj.jar
-
-  # Provided by previous packages
-  rm ${pkgdir}/usr/share/java/${pkgname}/servlet-api.jar
-  ln -s /usr/share/java/servlet${_servletver}-tomcat/servlet-api-${_servletver}.jar \
-        ${pkgdir}/usr/share/java/${pkgname}/servlet-api.jar
-
-  for j in el-api jsp-api; do
-    rm ${pkgdir}/usr/share/java/${pkgname}/${j}.jar
-    ln -s /usr/share/java/jsp${_jspver}-tomcat/${j}-${_jspver}.jar \
-          ${pkgdir}/usr/share/java/${pkgname}/${j}.jar
-  done
-
-  install -m644 "${srcdir}/apache-tomcat-${pkgver}/lib/tomcat-dbcp.jar" \
-                ${pkgdir}/usr/share/java/${pkgname}/tomcat-dbcp-${pkgver}.jar
-  ln -s tomcat-dbcp-${pkgver}.jar \
-        ${pkgdir}/usr/share/java/${pkgname}/tomcat-dbcp.jar
-
-  ln -s /usr/share/java/${pkgname} ${pkgdir}/usr/share/${pkgname}/lib
-
-  # 71=tomcat7 / 19=log
-  install -dm775 -o 71 -g 19 ${pkgdir}/var/log/${pkgname}
-  ln -s /var/log/${pkgname} ${pkgdir}/usr/share/${pkgname}/logs
-  touch ${pkgdir}/var/log/${pkgname}/catalina.{out,err}
-  chgrp 19 ${pkgdir}/var/log/${pkgname}/catalina.{out,err}
-
-  install -dm775 ${pkgdir}/etc/${pkgname}
-  install -g 71 -m640 conf/* ${pkgdir}/etc/${pkgname}
-  install -d -g 71 -m775 ${pkgdir}/etc/${pkgname}/Catalina
-  ln -s /etc/${pkgname} ${pkgdir}/usr/share/${pkgname}/conf
-
-  install -dm775 ${pkgdir}/var/lib/${pkgname}
-  cp -r webapps ${pkgdir}/var/lib/${pkgname}
-  chown -R 71:71 ${pkgdir}/var/lib/${pkgname}
-  ln -s /var/lib/${pkgname}/webapps ${pkgdir}/usr/share/${pkgname}/webapps
-
-  install -dm1777 ${pkgdir}/var/tmp
-  install -dm775 -o 71 -g 71 ${pkgdir}/var/tmp/${pkgname}/{temp,work}
-  ln -s /var/tmp/${pkgname}/temp ${pkgdir}/usr/share/${pkgname}/temp
-  ln -s /var/tmp/${pkgname}/work ${pkgdir}/usr/share/${pkgname}/work
-
-  install -Dm644 ${srcdir}/systemd_tomcat7.service \
-                 ${pkgdir}/usr/lib/systemd/system/${pkgname}.service
-  install -Dm644 ${srcdir}/systemd_tmpfiles.d_tomcat7.conf \
-                 ${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf
-}

Copied: tomcat7/repos/extra-any/PKGBUILD (from rev 204891, tomcat7/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2014-01-30 19:47:56 UTC (rev 204892)
@@ -0,0 +1,137 @@
+# Maintainer: Guillaume ALAUX <guillaume at archlinux.org>
+pkgbase=tomcat7
+pkgname=('java-servlet3.0-tomcat' 'java-jsp2.2-tomcat' 'tomcat7')
+pkgver=7.0.50
+pkgrel=1
+arch=('any')
+url='http://tomcat.apache.org/'
+license=('APACHE')
+makedepends=('java-environment' 'apache-ant>=1.8' 'java-commons-daemon' 'eclipse-ecj')
+source=(http://archive.apache.org/dist/tomcat/tomcat-7/v${pkgver}/src/apache-tomcat-${pkgver}-src.tar.gz
+        http://archive.apache.org/dist/tomcat/tomcat-7/v${pkgver}/bin/apache-tomcat-${pkgver}.tar.gz
+        systemd_tomcat7.service
+        systemd_tmpfiles.d_tomcat7.conf
+        tomcat7.install)
+
+sha256sums=('a668e1356b4fa3032ecf2b65bc9136cd2eed98547719b363df66eb27b5e20fd0'
+            '7be7b2d9e6626c81f2aa3d39a7e5b0e52e025d773cd29c4a0cf9e71b0d4c11e9'
+            '6b3d9711319165c331b827cba40cb788c0d1ea60fd181a56b8da4ca41e2d2930'
+            '4bfeb2f4462547bf15cb2b72db545c0531c70f8640fa79344d520ceea6812a93'
+            '4db469bcbcfb043c63ce3db0412997552861ea0f9c09d8825808570ed75aa27b')
+
+_servletver=3.0
+_jspver=2.2
+
+build() {
+  cd "${srcdir}/apache-tomcat-${pkgver}-src"
+
+  . /etc/profile.d/apache-ant.sh
+
+  ant clean deploy \
+    -Dbase.path=${srcdir}/DOWN_LIBS \
+    -Dcommons-daemon.jar=/usr/share/java/commons-daemon.jar \
+    -Djdt.jar=/usr/share/java/eclipse-ecj.jar \
+    -Dno.build.dbcp=true \
+    -Djava.7.home=${JAVA_HOME}
+}
+
+#TODO add test "ant test"
+
+package_java-servlet3.0-tomcat() {
+  pkgdesc='Servlet 3.0 java library implementation by Apache Tomcat'
+  depends=('java-environment>=5')
+
+  cd "${srcdir}/apache-tomcat-${pkgver}-src/output/build/lib"
+
+  install -dm755 ${pkgdir}/usr/share/java/servlet${_servletver}-tomcat
+  install -m644 servlet-api.jar \
+                ${pkgdir}/usr/share/java/servlet${_servletver}-tomcat/servlet-api-${_servletver}.jar
+  ln -s servlet${_servletver}-tomcat/servlet-api-${_servletver}.jar \
+        ${pkgdir}/usr/share/java/servlet-api.jar
+}
+
+package_java-jsp2.2-tomcat() {
+  pkgdesc='JSP 2.2 java library implementation by Apache Tomcat'
+  depends=('java-environment>=5')
+
+  cd "${srcdir}/apache-tomcat-${pkgver}-src/output/build/lib"
+
+  install -dm755 ${pkgdir}/usr/share/java/jsp${_jspver}-tomcat
+  for j in el-api jsp-api; do
+    install -m644 ${j}.jar \
+                  ${pkgdir}/usr/share/java/jsp${_jspver}-tomcat/${j}-${_jspver}.jar
+    ln -s jsp${_jspver}-tomcat/${j}-${_jspver}.jar ${pkgdir}/usr/share/java/${j}.jar
+  done
+}
+
+package_tomcat7() {
+  pkgdesc='Servlet-3.0/JSP-2.2 Container'
+  depends=('java-runtime>=6' 'java-jsvc' 'eclipse-ecj'
+           "java-servlet3.0-tomcat=${pkgver}" "java-jsp2.2-tomcat=${pkgver}")
+  optdepends=('tomcat-native: to allow optimal performance in production environments')
+  backup=(etc/tomcat7/catalina.policy
+          etc/tomcat7/catalina.properties
+          etc/tomcat7/context.xml
+          etc/tomcat7/logging.properties
+          etc/tomcat7/server.xml
+          etc/tomcat7/tomcat-users.xml
+          etc/tomcat7/web.xml)
+  install=tomcat7.install
+
+  cd "${srcdir}/apache-tomcat-${pkgver}-src/output/build"
+
+  # Tomcat general files
+  install -dm755 ${pkgdir}/usr/share/{,java/}${pkgname}
+  # commons-daemon and tomcat-natives are packaged on their own
+  rm bin/{*.bat,commons-daemon*,tomcat-native.tar.gz}
+  cp -r bin ${pkgdir}/usr/share/${pkgname}
+
+  # eclipse-ecj is packaged on its own
+  rm lib/eclipse-ecj.jar
+  install -m644 lib/* ${pkgdir}/usr/share/java/${pkgname}
+  ln -s ../eclipse-ecj.jar ${pkgdir}/usr/share/java/${pkgname}/eclipse-ecj.jar
+
+  # Provided by previous packages
+  rm ${pkgdir}/usr/share/java/${pkgname}/servlet-api.jar
+  ln -s /usr/share/java/servlet${_servletver}-tomcat/servlet-api-${_servletver}.jar \
+        ${pkgdir}/usr/share/java/${pkgname}/servlet-api.jar
+
+  for j in el-api jsp-api; do
+    rm ${pkgdir}/usr/share/java/${pkgname}/${j}.jar
+    ln -s /usr/share/java/jsp${_jspver}-tomcat/${j}-${_jspver}.jar \
+          ${pkgdir}/usr/share/java/${pkgname}/${j}.jar
+  done
+
+  install -m644 "${srcdir}/apache-tomcat-${pkgver}/lib/tomcat-dbcp.jar" \
+                ${pkgdir}/usr/share/java/${pkgname}/tomcat-dbcp-${pkgver}.jar
+  ln -s tomcat-dbcp-${pkgver}.jar \
+        ${pkgdir}/usr/share/java/${pkgname}/tomcat-dbcp.jar
+
+  ln -s /usr/share/java/${pkgname} ${pkgdir}/usr/share/${pkgname}/lib
+
+  # 71=tomcat7 / 19=log
+  install -dm775 -o 71 -g 19 ${pkgdir}/var/log/${pkgname}
+  ln -s /var/log/${pkgname} ${pkgdir}/usr/share/${pkgname}/logs
+  touch ${pkgdir}/var/log/${pkgname}/catalina.{out,err}
+  chgrp 19 ${pkgdir}/var/log/${pkgname}/catalina.{out,err}
+
+  install -dm775 ${pkgdir}/etc/${pkgname}
+  install -g 71 -m640 conf/* ${pkgdir}/etc/${pkgname}
+  install -d -g 71 -m775 ${pkgdir}/etc/${pkgname}/Catalina
+  ln -s /etc/${pkgname} ${pkgdir}/usr/share/${pkgname}/conf
+
+  install -dm775 ${pkgdir}/var/lib/${pkgname}
+  cp -r webapps ${pkgdir}/var/lib/${pkgname}
+  chown -R 71:71 ${pkgdir}/var/lib/${pkgname}
+  ln -s /var/lib/${pkgname}/webapps ${pkgdir}/usr/share/${pkgname}/webapps
+
+  install -dm1777 ${pkgdir}/var/tmp
+  install -dm775 -o 71 -g 71 ${pkgdir}/var/tmp/${pkgname}/{temp,work}
+  ln -s /var/tmp/${pkgname}/temp ${pkgdir}/usr/share/${pkgname}/temp
+  ln -s /var/tmp/${pkgname}/work ${pkgdir}/usr/share/${pkgname}/work
+
+  install -Dm644 ${srcdir}/systemd_tomcat7.service \
+                 ${pkgdir}/usr/lib/systemd/system/${pkgname}.service
+  install -Dm644 ${srcdir}/systemd_tmpfiles.d_tomcat7.conf \
+                 ${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf
+}

Deleted: systemd_tmpfiles.d_tomcat7.conf
===================================================================
--- systemd_tmpfiles.d_tomcat7.conf	2014-01-30 19:46:55 UTC (rev 204891)
+++ systemd_tmpfiles.d_tomcat7.conf	2014-01-30 19:47:56 UTC (rev 204892)
@@ -1,3 +0,0 @@
-d   /var/tmp/tomcat7
-d   /var/tmp/tomcat7/temp   0775    tomcat7  tomcat7
-d   /var/tmp/tomcat7/work   0775    tomcat7  tomcat7

Copied: tomcat7/repos/extra-any/systemd_tmpfiles.d_tomcat7.conf (from rev 204891, tomcat7/trunk/systemd_tmpfiles.d_tomcat7.conf)
===================================================================
--- systemd_tmpfiles.d_tomcat7.conf	                        (rev 0)
+++ systemd_tmpfiles.d_tomcat7.conf	2014-01-30 19:47:56 UTC (rev 204892)
@@ -0,0 +1,3 @@
+d   /var/tmp/tomcat7
+d   /var/tmp/tomcat7/temp   0775    tomcat7  tomcat7
+d   /var/tmp/tomcat7/work   0775    tomcat7  tomcat7

Deleted: systemd_tomcat7.service
===================================================================
--- systemd_tomcat7.service	2014-01-30 19:46:55 UTC (rev 204891)
+++ systemd_tomcat7.service	2014-01-30 19:47:56 UTC (rev 204892)
@@ -1,34 +0,0 @@
-[Unit]
-Description=Tomcat 7 servlet container
-After=syslog.target network.target
-
-[Service]
-Type=forking
-PIDFile=/var/run/tomcat7.pid
-Environment=CATALINA_PID=/var/run/tomcat7.pid
-Environment=TOMCAT_JAVA_HOME=/usr/lib/jvm/java-7-openjdk
-Environment=CATALINA_HOME=/usr/share/tomcat7
-Environment=CATALINA_BASE=/usr/share/tomcat7
-Environment=CATALINA_OPTS=
-
-ExecStart=/usr/bin/jsvc \
-            -Dcatalina.home=${CATALINA_HOME} \
-            -Dcatalina.base=${CATALINA_BASE} \
-            -Djava.io.tmpdir=/var/tmp/tomcat7/temp \
-            -cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.jar:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar \
-            -user tomcat7 \
-            -java-home ${TOMCAT_JAVA_HOME} \
-            -pidfile /var/run/tomcat7.pid \
-            -errfile /var/log/tomcat7/catalina.err \
-            -outfile /var/log/tomcat7/catalina.out \
-            $CATALINA_OPTS \
-            org.apache.catalina.startup.Bootstrap
-
-ExecStop=/usr/bin/jsvc \
-            -pidfile /var/run/tomcat7.pid \
-            -stop \
-            org.apache.catalina.startup.Bootstrap
-
-[Install]
-WantedBy=multi-user.target
-

Copied: tomcat7/repos/extra-any/systemd_tomcat7.service (from rev 204891, tomcat7/trunk/systemd_tomcat7.service)
===================================================================
--- systemd_tomcat7.service	                        (rev 0)
+++ systemd_tomcat7.service	2014-01-30 19:47:56 UTC (rev 204892)
@@ -0,0 +1,34 @@
+[Unit]
+Description=Tomcat 7 servlet container
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/tomcat7.pid
+Environment=CATALINA_PID=/var/run/tomcat7.pid
+Environment=TOMCAT_JAVA_HOME=/usr/lib/jvm/java-7-openjdk
+Environment=CATALINA_HOME=/usr/share/tomcat7
+Environment=CATALINA_BASE=/usr/share/tomcat7
+Environment=CATALINA_OPTS=
+
+ExecStart=/usr/bin/jsvc \
+            -Dcatalina.home=${CATALINA_HOME} \
+            -Dcatalina.base=${CATALINA_BASE} \
+            -Djava.io.tmpdir=/var/tmp/tomcat7/temp \
+            -cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.jar:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar \
+            -user tomcat7 \
+            -java-home ${TOMCAT_JAVA_HOME} \
+            -pidfile /var/run/tomcat7.pid \
+            -errfile /var/log/tomcat7/catalina.err \
+            -outfile /var/log/tomcat7/catalina.out \
+            $CATALINA_OPTS \
+            org.apache.catalina.startup.Bootstrap
+
+ExecStop=/usr/bin/jsvc \
+            -pidfile /var/run/tomcat7.pid \
+            -stop \
+            org.apache.catalina.startup.Bootstrap
+
+[Install]
+WantedBy=multi-user.target
+

Deleted: tomcat7.install
===================================================================
--- tomcat7.install	2014-01-30 19:46:55 UTC (rev 204891)
+++ tomcat7.install	2014-01-30 19:47:56 UTC (rev 204892)
@@ -1,44 +0,0 @@
-post_install() {
-  getent group tomcat7 >/dev/null 2>&1 || groupadd -g 71 tomcat7
-  getent passwd tomcat7 >/dev/null 2>&1 || useradd -u 71 -g tomcat7 -d /usr/share/tomcat7 -s /bin/false tomcat7
-
-  if [ -f lib/modules/$(uname -r)/kernel/security/capability.ko ]; then
-    echo 'It appears that your current kernel has linux security'
-    echo 'capabilities built as a module. Tomcat requires this'
-    echo ' functionality to operate.'
-    echo ''
-    echo ' To activate the module, please load it now (modprobe capability).'
-    echo ' Also, you should add it to your MODULES array in rc.conf, so'
-    echo ' it will be activated automatically at boot-up.'
-  fi
-
-  # Some tomcat7 files were owned by 'tomcat:tomcat', let's fix this
-  chown root:tomcat7 /etc/tomcat7 /etc/tomcat7/*
-  chown -R tomcat7:tomcat7 /etc/tomcat7/Catalina
-  chown -R tomcat7:tomcat7 /var/lib/tomcat7
-  chown -R tomcat7:tomcat7 /var/tmp/tomcat7
-  chown tomcat7:log /var/log/tomcat7
-  find /var/log/tomcat7 -user tomcat -exec chown tomcat7 {} \;
-  find /var/log/tomcat7 -group tomcat -exec chgrp tomcat7 {} \;
-
-  # Fix some previously erroneous mods
-  chmod 775 /var/tmp/tomcat7 /var/tmp/tomcat7/temp /var/tmp/tomcat7/work
-}
-
-post_upgrade() {
-  post_install $1
-}
-
-pre_remove() {
-  if getent passwd tomcat7 > /dev/null 2>&1; then
-      userdel tomcat7
-  fi
-  if getent group tomcat7 > /dev/null 2>&1; then
-      groupdel tomcat7
-  fi
-
-  echo 'Please consider removing the following directories:'
-  echo '  /var/lib/tomcat7'
-  echo '  /var/tmp/tomcat7'
-  echo '  /var/log/tomcat7'
-}

Copied: tomcat7/repos/extra-any/tomcat7.install (from rev 204891, tomcat7/trunk/tomcat7.install)
===================================================================
--- tomcat7.install	                        (rev 0)
+++ tomcat7.install	2014-01-30 19:47:56 UTC (rev 204892)
@@ -0,0 +1,44 @@
+post_install() {
+  getent group tomcat7 >/dev/null 2>&1 || groupadd -g 71 tomcat7
+  getent passwd tomcat7 >/dev/null 2>&1 || useradd -u 71 -g tomcat7 -d /usr/share/tomcat7 -s /bin/false tomcat7
+
+  if [ -f lib/modules/$(uname -r)/kernel/security/capability.ko ]; then
+    echo 'It appears that your current kernel has linux security'
+    echo 'capabilities built as a module. Tomcat requires this'
+    echo ' functionality to operate.'
+    echo ''
+    echo ' To activate the module, please load it now (modprobe capability).'
+    echo ' Also, you should add it to your MODULES array in rc.conf, so'
+    echo ' it will be activated automatically at boot-up.'
+  fi
+
+  # Some tomcat7 files were owned by 'tomcat:tomcat', let's fix this
+  chown root:tomcat7 /etc/tomcat7 /etc/tomcat7/*
+  chown -R tomcat7:tomcat7 /etc/tomcat7/Catalina
+  chown -R tomcat7:tomcat7 /var/lib/tomcat7
+  chown -R tomcat7:tomcat7 /var/tmp/tomcat7
+  chown tomcat7:log /var/log/tomcat7
+  find /var/log/tomcat7 -user tomcat -exec chown tomcat7 {} \;
+  find /var/log/tomcat7 -group tomcat -exec chgrp tomcat7 {} \;
+
+  # Fix some previously erroneous mods
+  chmod 775 /var/tmp/tomcat7 /var/tmp/tomcat7/temp /var/tmp/tomcat7/work
+}
+
+post_upgrade() {
+  post_install $1
+}
+
+pre_remove() {
+  if getent passwd tomcat7 > /dev/null 2>&1; then
+      userdel tomcat7
+  fi
+  if getent group tomcat7 > /dev/null 2>&1; then
+      groupdel tomcat7
+  fi
+
+  echo 'Please consider removing the following directories:'
+  echo '  /var/lib/tomcat7'
+  echo '  /var/tmp/tomcat7'
+  echo '  /var/log/tomcat7'
+}




More information about the arch-commits mailing list