pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils * Pull in some changes discussed on the Webmi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a79f5af1a5bb
branches:  trunk
changeset: 513033:a79f5af1a5bb
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Fri May 19 17:14:53 2006 +0000

description:
* Pull in some changes discussed on the Webmin mailing list to allow
  running an individual module's uninstall action

* Add an DEINSTALL_TEMPLATE file that is pulled in by all wbm-* modules
  that will run the module's uninstall action at DEINSTALL time.

* Fix the "time" module to ignore "sched_mode" -- verified by Jamie
  Cameron on the Webmin mailing list as a bug.

* Fix the "postfix" module to remove its temp files at DEINSTALL time
  so that we cleanly pkg_delete.

Bump the PKGREVISION of sysutils/webmin as well as all sysutils/wbm-*
packages that have uninstall.pl scripts.

diffstat:

 sysutils/wbm-cluster-copy/Makefile       |   3 ++-
 sysutils/wbm-cluster-cron/Makefile       |   3 ++-
 sysutils/wbm-postfix/DEINSTALL           |   8 ++++++++
 sysutils/wbm-postfix/Makefile            |   3 ++-
 sysutils/wbm-quota/Makefile              |   3 ++-
 sysutils/wbm-status/Makefile             |   3 ++-
 sysutils/wbm-time/Makefile               |   3 ++-
 sysutils/wbm-time/distinfo               |   3 ++-
 sysutils/wbm-time/patches/patch-ab       |  19 +++++++++++++++++++
 sysutils/webmin/Makefile                 |   4 ++--
 sysutils/webmin/distinfo                 |   5 +++--
 sysutils/webmin/files/wbm-deinstall.tmpl |  16 ++++++++++++++++
 sysutils/webmin/patches/patch-ac         |  20 ++++++++++++++++++++
 sysutils/webmin/wbm.mk                   |   8 +++++++-
 14 files changed, 89 insertions(+), 12 deletions(-)

diffs (225 lines):

diff -r 17c867eef16e -r a79f5af1a5bb sysutils/wbm-cluster-copy/Makefile
--- a/sysutils/wbm-cluster-copy/Makefile        Fri May 19 16:23:47 2006 +0000
+++ b/sysutils/wbm-cluster-copy/Makefile        Fri May 19 17:14:53 2006 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 2006/05/16 21:39:30 jlam Exp $
+# $NetBSD: Makefile,v 1.2 2006/05/19 17:14:53 jlam Exp $
 
 DISTNAME=      cluster-copy
 PKGNAME=       wbm-${DISTNAME}-${WBM_VERSION}
+PKGREVISION=   1
 DIST_SUBDIR=   webmin-modules-${WBM_VERSION}
 
 # The version is from the module.info file from the extracted distfile.
diff -r 17c867eef16e -r a79f5af1a5bb sysutils/wbm-cluster-cron/Makefile
--- a/sysutils/wbm-cluster-cron/Makefile        Fri May 19 16:23:47 2006 +0000
+++ b/sysutils/wbm-cluster-cron/Makefile        Fri May 19 17:14:53 2006 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 2006/05/16 21:39:44 jlam Exp $
+# $NetBSD: Makefile,v 1.2 2006/05/19 17:14:53 jlam Exp $
 
 DISTNAME=      cluster-cron
 PKGNAME=       wbm-${DISTNAME}-${WBM_VERSION}
+PKGREVISION=   1
 DIST_SUBDIR=   webmin-modules-${WBM_VERSION}
 
 # The version is from the module.info file from the extracted distfile.
diff -r 17c867eef16e -r a79f5af1a5bb sysutils/wbm-postfix/DEINSTALL
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/wbm-postfix/DEINSTALL    Fri May 19 17:14:53 2006 +0000
@@ -0,0 +1,8 @@
+# $NetBSD: DEINSTALL,v 1.1 2006/05/19 17:14:53 jlam Exp $
+
+case "${STAGE}" in
+DEINSTALL)
+       # Remove temporary files possibly generated by postfinger.cgi.
+       ${RM} -f ${PKG_PREFIX}/share/webmin/postfix/postfinger.*.[dn]
+       ;;
+esac
diff -r 17c867eef16e -r a79f5af1a5bb sysutils/wbm-postfix/Makefile
--- a/sysutils/wbm-postfix/Makefile     Fri May 19 16:23:47 2006 +0000
+++ b/sysutils/wbm-postfix/Makefile     Fri May 19 17:14:53 2006 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 2006/05/16 04:03:26 jlam Exp $
+# $NetBSD: Makefile,v 1.2 2006/05/19 17:14:53 jlam Exp $
 
 DISTNAME=      postfix
 PKGNAME=       wbm-${DISTNAME}-${WBM_VERSION}
+PKGREVSION=    1
 DIST_SUBDIR=   webmin-modules-${WBM_VERSION}
 
 # The version is from the module.info file from the extracted distfile.
diff -r 17c867eef16e -r a79f5af1a5bb sysutils/wbm-quota/Makefile
--- a/sysutils/wbm-quota/Makefile       Fri May 19 16:23:47 2006 +0000
+++ b/sysutils/wbm-quota/Makefile       Fri May 19 17:14:53 2006 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 2006/05/16 15:42:30 jlam Exp $
+# $NetBSD: Makefile,v 1.2 2006/05/19 17:14:53 jlam Exp $
 
 DISTNAME=      quota
 PKGNAME=       wbm-${DISTNAME}-${WBM_VERSION}
+PKGREVISION=   1
 DIST_SUBDIR=   webmin-modules-${WBM_VERSION}
 
 # The version is from the module.info file from the extracted distfile.
diff -r 17c867eef16e -r a79f5af1a5bb sysutils/wbm-status/Makefile
--- a/sysutils/wbm-status/Makefile      Fri May 19 16:23:47 2006 +0000
+++ b/sysutils/wbm-status/Makefile      Fri May 19 17:14:53 2006 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 2006/05/16 15:43:17 jlam Exp $
+# $NetBSD: Makefile,v 1.2 2006/05/19 17:14:53 jlam Exp $
 
 DISTNAME=      status
 PKGNAME=       wbm-${DISTNAME}-${WBM_VERSION}
+PKGREVISION=   1
 DIST_SUBDIR=   webmin-modules-${WBM_VERSION}
 
 # The version is from the module.info file from the extracted distfile.
diff -r 17c867eef16e -r a79f5af1a5bb sysutils/wbm-time/Makefile
--- a/sysutils/wbm-time/Makefile        Fri May 19 16:23:47 2006 +0000
+++ b/sysutils/wbm-time/Makefile        Fri May 19 17:14:53 2006 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1.1.1 2006/05/16 15:44:04 jlam Exp $
+# $NetBSD: Makefile,v 1.2 2006/05/19 17:14:53 jlam Exp $
 
 DISTNAME=      time
 PKGNAME=       wbm-${DISTNAME}-${WBM_VERSION}
+PKGREVISION=   1
 DIST_SUBDIR=   webmin-modules-${WBM_VERSION}
 
 # The version is from the module.info file from the extracted distfile.
diff -r 17c867eef16e -r a79f5af1a5bb sysutils/wbm-time/distinfo
--- a/sysutils/wbm-time/distinfo        Fri May 19 16:23:47 2006 +0000
+++ b/sysutils/wbm-time/distinfo        Fri May 19 17:14:53 2006 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1.1.1 2006/05/16 15:44:04 jlam Exp $
+$NetBSD: distinfo,v 1.2 2006/05/19 17:14:53 jlam Exp $
 
 SHA1 (webmin-modules-1.270/time.wbm.gz) = d4b785569fd27a78b5ff9ade348ef8fe1fbca9aa
 RMD160 (webmin-modules-1.270/time.wbm.gz) = 73b049052db9b13c865b0d5af8ef7684074f19c6
 Size (webmin-modules-1.270/time.wbm.gz) = 32355 bytes
 SHA1 (patch-aa) = 12531637b08992dd84c8f49863b0892b63606eac
+SHA1 (patch-ab) = a4d2bdb99969c6a16fc15f8f011be5b2a8199ef1
diff -r 17c867eef16e -r a79f5af1a5bb sysutils/wbm-time/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/wbm-time/patches/patch-ab        Fri May 19 17:14:53 2006 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-ab,v 1.1 2006/05/19 17:14:53 jlam Exp $
+
+--- uninstall.pl.orig  Tue Apr  4 23:16:15 2006
++++ uninstall.pl
+@@ -5,14 +5,12 @@ require 'time-lib.pl';
+ 
+ sub module_uninstall
+ {
+-if ($config{'sched_mode'}) {
+       # Scheduled checking is enabled .. remove the cron job
+       &foreign_require("cron", "cron-lib.pl");
+       $job = &find_cron_job();
+       if ($job) {
+               &cron::delete_cron_job($job);
+               }
+-      }
+ }
+ 
+ 1;
diff -r 17c867eef16e -r a79f5af1a5bb sysutils/webmin/Makefile
--- a/sysutils/webmin/Makefile  Fri May 19 16:23:47 2006 +0000
+++ b/sysutils/webmin/Makefile  Fri May 19 17:14:53 2006 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.15 2006/05/16 18:30:20 jlam Exp $
+# $NetBSD: Makefile,v 1.16 2006/05/19 17:14:53 jlam Exp $
 
 DISTNAME=      webmin-1.270-minimal
 PKGNAME=       ${DISTNAME:S/-minimal$//}
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    sysutils www
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=webadmin/}
 
diff -r 17c867eef16e -r a79f5af1a5bb sysutils/webmin/distinfo
--- a/sysutils/webmin/distinfo  Fri May 19 16:23:47 2006 +0000
+++ b/sysutils/webmin/distinfo  Fri May 19 17:14:53 2006 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.6 2006/05/16 04:01:28 jlam Exp $
+$NetBSD: distinfo,v 1.7 2006/05/19 17:14:53 jlam Exp $
 
 SHA1 (webmin-1.270-minimal.tar.gz) = 31fa4cf18205a0dac74e38290a03950450abae26
 RMD160 (webmin-1.270-minimal.tar.gz) = 94847d56eb9aebefc234178656dc53daa3af91c6
 Size (webmin-1.270-minimal.tar.gz) = 1301974 bytes
-SHA1 (patch-aa) = c643cb0f568629288584902b942c792652cc366e
+SHA1 (patch-aa) = 7a0aa94e94963a8b5b171423aefb445d0849339f
+SHA1 (patch-ac) = 12c133cb1beefd2614f4caa15cc2b29cd1721efa
diff -r 17c867eef16e -r a79f5af1a5bb sysutils/webmin/files/wbm-deinstall.tmpl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/webmin/files/wbm-deinstall.tmpl  Fri May 19 17:14:53 2006 +0000
@@ -0,0 +1,16 @@
+# $NetBSD: wbm-deinstall.tmpl,v 1.1 2006/05/19 17:14:53 jlam Exp $
+
+case "${STAGE}" in
+DEINSTALL)
+       WBMNAME="@WBMNAME@"
+       WEBMIN_DIR="@WEBMIN_DIR@"
+       WEBMIN_CONFIG="${PKG_SYSCONFDIR}"
+       WEBMIN_VAR="@WEBMIN_VARDIR@"
+       ${TEST} ! -f "${WEBMIN_CONFIG}/var-path" ||
+               WEBMIN_VAR=`${CAT} ${WEBMIN_CONFIG}/var-path`
+       export WEBMIN_CONFIG WEBMIN_VAR
+       if ${TEST} -x "${WEBMIN_DIR}/run-uninstalls.pl"; then
+               ( cd ${WEBMIN_DIR} && 
+                 ${WEBMIN_DIR}/run-uninstalls.pl ${WBMNAME} )
+       fi
+esac
diff -r 17c867eef16e -r a79f5af1a5bb sysutils/webmin/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/webmin/patches/patch-ac  Fri May 19 17:14:53 2006 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-ac,v 1.1 2006/05/19 17:14:53 jlam Exp $
+
+--- run-uninstalls.pl.orig     Tue Apr  4 23:12:35 2006
++++ run-uninstalls.pl
+@@ -6,7 +6,14 @@ $no_acl_check++;
+ do './web-lib.pl';
+ &init_config();
+ 
+-foreach $m (&get_all_module_infos()) {
++if (@ARGV > 0) {
++      @mods = map { local %minfo = &get_module_info($_); \%minfo } @ARGV;
++      }
++else {
++      @mods = &get_all_module_infos();
++      }
++
++foreach $m (@mods) {
+       $mdir = &module_root_directory($m->{'dir'});
+       if (&check_os_support($m) &&
+           -r "$mdir/uninstall.pl") {
diff -r 17c867eef16e -r a79f5af1a5bb sysutils/webmin/wbm.mk
--- a/sysutils/webmin/wbm.mk    Fri May 19 16:23:47 2006 +0000
+++ b/sysutils/webmin/wbm.mk    Fri May 19 17:14:53 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: wbm.mk,v 1.3 2006/05/16 16:38:06 jlam Exp $
+# $NetBSD: wbm.mk,v 1.4 2006/05/19 17:14:53 jlam Exp $
 #
 # Makefile fragment for Webmin modules
 
@@ -16,6 +16,7 @@
 EVAL_PREFIX+=  PREFIX.webmin=webmin
 WEBMIN_DIR=    ${PREFIX.webmin}/share/webmin
 WEBMIN_EGDIR=  ${PREFIX.webmin}/share/examples/webmin
+WEBMIN_VARDIR= ${VARBASE}/webmin
 WBM_DIR=       ${PREFIX}/share/webmin
 WBM_EGDIR=     ${PREFIX}/share/examples/webmin
 
@@ -27,6 +28,11 @@
 CONF_FILES_PERMS+=     ${WBM_EGDIR}/${WBMNAME}/config                  \
                        ${PKG_SYSCONFDIR}/${WBMNAME}/config             \
                        ${ROOT_USER} ${ROOT_GROUP} 0600
+FILES_SUBST+=          WBMNAME=${WBMNAME:Q}
+FILES_SUBST+=          WEBMIN_DIR=${WEBMIN_DIR:Q}
+FILES_SUBST+=          WEBMIN_VARDIR=${WEBMIN_VARDIR:Q}
+
+DEINSTALL_TEMPLATE+=   ${PKGSRCDIR}/sysutils/webmin/files/wbm-deinstall.tmpl
 
 # WBMNAME is the name of the module directory
 WBMNAME?=              ${DISTNAME}



Home | Main Index | Thread Index | Old Index