[arch-commits] Commit in tomcat6/trunk (PKGBUILD tomcat6.install)

2014-02-15 Thread Guillaume Alaux
Date: Saturday, February 15, 2014 @ 17:36:19
  Author: guillaume
Revision: 206022

Fix typo on pkg name and pkgrel bump

Modified:
  tomcat6/trunk/PKGBUILD
  tomcat6/trunk/tomcat6.install

-+
 PKGBUILD|4 ++--
 tomcat6.install |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2014-02-15 16:35:54 UTC (rev 206021)
+++ PKGBUILD2014-02-15 16:36:19 UTC (rev 206022)
@@ -1,7 +1,7 @@
 # Maintainer: Guillaume ALAUX 
 pkgname=tomcat6
 pkgver=6.0.39
-pkgrel=1
+pkgrel=2
 pkgdesc='Open source implementation of the Java Servlet 2.5 and JavaServer 
Pages 2.1 technologies'
 arch=('any')
 url='http://tomcat.apache.org/'
@@ -24,7 +24,7 @@
 sha256sums=('debdeafe900f5eb85f8816ea235ab7e3e5261071b2ea01ac288241e794e911a7'
 'b6d85501b00032a1385222e80a5f8e357276aaad605e699f40d5cc3770b8ce68'
 '07b9ff0686134b3256cda8b5253b91ba23f54b547640729e2382c3c12067ea80'
-'35c9607502237febba2e588185b8eed4936a061c8926bbb86c3b99e0b67f6e0e')
+'16046fc93a569cb817994ac251bbf464659286c39c2d9a5a2f52030d94a50dd0')
 
 _gid_log=19
 _gid_tomcat=66

Modified: tomcat6.install
===
--- tomcat6.install 2014-02-15 16:35:54 UTC (rev 206021)
+++ tomcat6.install 2014-02-15 16:36:19 UTC (rev 206022)
@@ -1,7 +1,7 @@
 _pkgname='tomcat6'
-_gid_tomcat_name='tomcat6'
+_gid_tomcat_name='tomcat'
 _gid_tomcat=66
-_uid_tomcat_name='tomcat6'
+_uid_tomcat_name='tomcat'
 _uid_tomcat=66
 
 post_install() {



[arch-commits] Commit in tomcat6/trunk (PKGBUILD tomcat6.install)

2014-02-15 Thread Guillaume Alaux
Date: Saturday, February 15, 2014 @ 17:18:27
  Author: guillaume
Revision: 206019

Rewrote install scripts

Modified:
  tomcat6/trunk/PKGBUILD
  tomcat6/trunk/tomcat6.install

-+
 PKGBUILD|2 +-
 tomcat6.install |   34 +-
 2 files changed, 22 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2014-02-15 16:15:55 UTC (rev 206018)
+++ PKGBUILD2014-02-15 16:18:27 UTC (rev 206019)
@@ -24,7 +24,7 @@
 sha256sums=('debdeafe900f5eb85f8816ea235ab7e3e5261071b2ea01ac288241e794e911a7'
 'b6d85501b00032a1385222e80a5f8e357276aaad605e699f40d5cc3770b8ce68'
 '07b9ff0686134b3256cda8b5253b91ba23f54b547640729e2382c3c12067ea80'
-'53ec4e24b3c4eec9d5dd4ac6e84d5758de4f459031d630486812439cce74af21')
+'35c9607502237febba2e588185b8eed4936a061c8926bbb86c3b99e0b67f6e0e')
 
 _gid_log=19
 _gid_tomcat=66

Modified: tomcat6.install
===
--- tomcat6.install 2014-02-15 16:15:55 UTC (rev 206018)
+++ tomcat6.install 2014-02-15 16:18:27 UTC (rev 206019)
@@ -1,13 +1,21 @@
+_pkgname='tomcat6'
+_gid_tomcat_name='tomcat6'
+_gid_tomcat=66
+_uid_tomcat_name='tomcat6'
+_uid_tomcat=66
+
 post_install() {
-  getent group tomcat >/dev/null 2>&1 || groupadd -g 66 tomcat
-  getent passwd tomcat >/dev/null 2>&1 || useradd -u 66 -g tomcat -d 
/usr/share/tomcat6 -s /bin/false tomcat
+  if ! getent group ${_gid_tomcat_name} >/dev/null 2>&1; then
+groupadd -g ${_gid_tomcat} ${_gid_tomcat_name}
+  fi
+  if ! getent passwd ${_uid_tomcat_name} >/dev/null 2>&1; then
+useradd  -u ${_uid_tomcat} -g ${_gid_tomcat_name} -d 
/usr/share/${_pkgname} -s /bin/false ${_uid_tomcat_name}
+  fi
 
-  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)."
+  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.'
   fi
 }
 
@@ -16,12 +24,12 @@
 }
 
 pre_remove() {
-  if getent passwd tomcat >/dev/null 2>&1; then
-  userdel tomcat
+  if getent passwd ${_uid_tomcat_name} > /dev/null 2>&1; then
+userdel ${_uid_tomcat_name}
   fi
-  if getent group tomcat >/dev/null 2>&1; then
-  groupdel tomcat
+  if getent group ${_gid_tomcat_name} > /dev/null 2>&1; then
+groupdel ${_gid_tomcat_name}
   fi
 
-  echo 'To fully clean Tomcat''s file, consider removing directories 
/var/{lib,tmp,log}/tomcat6'
+  echo "To fully clean Tomcat's file, consider removing directories 
/var/{lib,tmp,log}/${_pkgname}"
 }



[arch-commits] Commit in tomcat6/trunk (PKGBUILD tomcat6.install)

2011-09-14 Thread Guillaume Alaux
Date: Wednesday, September 14, 2011 @ 12:24:46
  Author: guillaume
Revision: 138024

upgpkg: tomcat6 6.0.33-3

Fixed owner of /etc/tomcat6 and tomcat user dir

Modified:
  tomcat6/trunk/PKGBUILD
  tomcat6/trunk/tomcat6.install

-+
 PKGBUILD|9 +
 tomcat6.install |2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2011-09-14 13:39:16 UTC (rev 138023)
+++ PKGBUILD2011-09-14 16:24:46 UTC (rev 138024)
@@ -1,7 +1,7 @@
 # Maintainer: Guillaume ALAUX 
 pkgname=tomcat6
 pkgver=6.0.33
-pkgrel=2
+pkgrel=3
 pkgdesc="Servlet-2.5/JSP-2.1 Container"
 arch=('any')
 url='http://tomcat.apache.org/'
@@ -29,7 +29,7 @@
  'a6ff671562c9ac91e8cc2812760df49d'
  'b9f482437de11587d72b53ddaa2a'
  '8f2ccc09837577394441d29a03b0e667'
- '1be39071bd27781c352b2d73b765e29d')
+ 'afdb7edc5c7a7b5fa85ad110d021cad3')
 
 build() {
   cd "${srcdir}/apache-tomcat-${pkgver}-src"
@@ -65,8 +65,9 @@
   touch ${pkgdir}/var/log/${pkgname}/catalina.{out,err}
   chgrp 19 ${pkgdir}/var/log/${pkgname}/catalina.{out,err}
 
-  install -dm770 ${pkgdir}/etc/${pkgname}
-  install -m660 conf/* ${pkgdir}/etc/${pkgname}
+  install -dm775 ${pkgdir}/etc/${pkgname}
+  install -g 66 -m640 conf/* ${pkgdir}/etc/${pkgname}
+  install -d -g66 -m775 ${pkgdir}/etc/${pkgname}/Catalina
   ln -s /etc/${pkgname} ${pkgdir}/usr/share/${pkgname}/conf
 
   install -dm775 ${pkgdir}/var/lib/${pkgname}

Modified: tomcat6.install
===
--- tomcat6.install 2011-09-14 13:39:16 UTC (rev 138023)
+++ tomcat6.install 2011-09-14 16:24:46 UTC (rev 138024)
@@ -1,6 +1,6 @@
 post_install() {
   getent group tomcat >/dev/null 2>&1 || groupadd -g 66 tomcat
-  getent passwd tomcat >/dev/null 2>&1 || useradd -u 66 -g tomcat -d 
/usr/share/tomcat -s /bin/false tomcat
+  getent passwd tomcat >/dev/null 2>&1 || useradd -u 66 -g tomcat -d 
/usr/share/tomcat6 -s /bin/false tomcat
 
   if [ -f lib/modules/`uname -r`/kernel/security/capability.ko ]; then
 echo ">>> It appears that your current kernel has linux security"