From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Mar 18 18:30:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCC13E01 for ; Tue, 18 Mar 2014 18:30:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A2848AE0 for ; Tue, 18 Mar 2014 18:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s2IIU0M8028619 for ; Tue, 18 Mar 2014 18:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s2IIU09t028618; Tue, 18 Mar 2014 18:30:00 GMT (envelope-from gnats) Resent-Date: Tue, 18 Mar 2014 18:30:00 GMT Resent-Message-Id: <201403181830.s2IIU09t028618@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Scot Hetzel Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A96BFA2E for ; Tue, 18 Mar 2014 18:21:28 +0000 (UTC) Received: from mail-ig0-x229.google.com (mail-ig0-x229.google.com [IPv6:2607:f8b0:4001:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 748149E8 for ; Tue, 18 Mar 2014 18:21:28 +0000 (UTC) Received: by mail-ig0-f169.google.com with SMTP id h18so11716854igc.0 for ; Tue, 18 Mar 2014 11:21:28 -0700 (PDT) Received: from fbsd11 ([206.126.209.6]) by mx.google.com with ESMTPSA id gd5sm28370683igd.5.2014.03.18.11.21.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Mar 2014 11:21:26 -0700 (PDT) Received: from fbsd11 (localhost [127.0.0.1]) by fbsd11 (8.14.7/8.14.7) with ESMTP id s2IILOYb004218 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 18 Mar 2014 13:21:24 -0500 (CDT) (envelope-from root@fbsd11) Received: (from root@localhost) by fbsd11 (8.14.7/8.14.7/Submit) id s2IILN82004217; Tue, 18 Mar 2014 13:21:23 -0500 (CDT) (envelope-from root) Message-Id: <201403181821.s2IILN82004217@fbsd11> Date: Tue, 18 Mar 2014 13:21:23 -0500 (CDT) From: Scot Hetzel To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: ports/187703: net-im/prosody: Convert to stage X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Scot Hetzel List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Mar 2014 18:30:00 -0000 >Number: 187703 >Category: ports >Synopsis: net-im/prosody: Convert to stage >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Mar 18 18:30:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Scot Hetzel >Release: FreeBSD 11.0-CURRENT i386 >Organization: >Environment: System: FreeBSD fbsd11 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r258293M: Tue Nov 19 00:38:47 CST 2013 root@fbsd10:/usr/obj/usr/src/sys/GENERIC i386 >Description: The attached patch provides the following changes for net-im/prosody: - convert to using the stage directory - Change USES_GMAKE to USES= gmake - Use the shebangfix to replace the LUA_CMD in prosody and prosodyctl - Use USERS and GROUPS to create the prosody user and group - Change to pkg-plist -- add prosodyctl.1 man page -- change ${PREFIX}/var/lib/prosody user/group to prosody on install -- remove the empty ${PREFIX}/var/lib/prosody directory on uninstall - remove files/pkg-install.in (no longer needed) NOTE: can't add USES+= lua:51 due to differences between Uses/lua.mk and bsd.lua.mk >How-To-Repeat: >Fix: After applying the below patch, don't forget to remove files/pkg-install.in. --- prosody.diff begins here --- index: Makefile =================================================================== --- Makefile (revision 348215) +++ Makefile (working copy) @@ -19,27 +19,26 @@ LIB_DEPENDS= idn:${PORTSDIR}/dns/libidn +USERS= prosody +GROUPS= ${USERS} + USE_RC_SUBR= prosody -MAN1= prosodyctl.1 MANCOMPRESSED= no +USES= gmake shebangfix USE_LUA= 5.1 WANT_LUA_VER= 5.1 -USE_GMAKE= yes +SHEBANG_LANG= lua +SHEBANG_FILES= prosody prosodyctl +lua_OLD_CMD= ${SETENV} lua +lua_CMD= ${LUA_CMD} HAS_CONFIGURE= yes CONFIGURE_ARGS+= --ostype=freebsd --c-compiler="${CC}" --linker="${LD}" CONFIGURE_ENV+= LOCALBASE="${LOCALBASE}" PREFIX="${PREFIX}" LUA_SUFFIX="-${LUA_VER}" LUA_LIBDIR="${LUA_LIBDIR}" LUA_INCDIR="${LUA_INCDIR}" -SUB_FILES= pkg-install pkg-deinstall +SUB_FILES= deinstall +SUB_LIST= USERS=${USERS} GROUPS=${GROUPS} +PLIST_SUB= PROSODY_USER=${USERS} PROSODY_GROUP=${GROUPS} -NO_STAGE= yes -pre-install: - ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - ${REINPLACE_CMD} -e 's|/usr/bin/env lua|${LUA_CMD}|' ${WRKSRC}/prosody.install ${WRKSRC}/prosodyctl.install - -post-install: - ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - @${CAT} ${PKGMESSAGE} - .include Index: files/patch-Makefile =================================================================== --- files/patch-Makefile (revision 348215) +++ files/patch-Makefile (working copy) @@ -1,5 +1,5 @@ ---- Makefile.orig 2013-12-08 19:05:39.000000000 +0100 -+++ Makefile 2014-02-06 23:24:12.000000000 +0100 +--- Makefile.orig 2014-01-12 05:41:40.000000000 -0600 ++++ Makefile 2014-03-15 11:58:25.725744098 -0500 @@ -6,7 +6,7 @@ MODULES = $(DESTDIR)$(PREFIX)/lib/prosody/modules SOURCE = $(DESTDIR)$(PREFIX)/lib/prosody @@ -9,11 +9,12 @@ INSTALLEDSOURCE = $(PREFIX)/lib/prosody INSTALLEDCONFIG = $(SYSCONFDIR) -@@ -40,6 +40,7 @@ +@@ -40,7 +40,7 @@ umask 0022 && cp -r plugins/* $(MODULES) install -m644 certs/* $(CONFIG)/certs install -m644 man/prosodyctl.man $(MAN)/man1/prosodyctl.1 +- test -e $(CONFIG)/prosody.cfg.lua || install -m644 prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua + install -m644 prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua.sample - test -e $(CONFIG)/prosody.cfg.lua || install -m644 prosody.cfg.lua.install $(CONFIG)/prosody.cfg.lua test -e prosody.version && install -m644 prosody.version $(SOURCE)/prosody.version || true $(MAKE) install -C util-src + Index: files/pkg-deinstall.in =================================================================== --- files/pkg-deinstall.in (revision 348215) +++ files/pkg-deinstall.in (working copy) @@ -10,17 +10,15 @@ echo " Note:" echo " Prosody related user accounts and groups were not removed." echo "" - echo " To remove the 'prosody' user and the 'prosody' group which were" - echo " created by a default installation of this package, run:" + echo " To remove the user and group which were created by " + echo " the installation of this package, run:" echo "" - echo " pw userdel -n prosody" - echo " pw groupdel -n prosody" + echo " pw userdel -n %%USERS%%" + echo " pw groupdel -n %%GROUPS%%" echo "" - echo " and to remove all server data:" - echo " rm -rf /usr/local/var/lib/prosody" - echo "" + echo " and to remove all server data:" + echo " rm -rf /usr/local/var/lib/prosody" + echo "" ;; -*) - ;; esac exit 0 Index: pkg-plist =================================================================== --- pkg-plist (revision 348215) +++ pkg-plist (working copy) @@ -136,6 +136,7 @@ lib/prosody/util/sasl/plain.lua lib/prosody/util/sasl/scram.lua lib/prosody/util/sasl_cyrus.lua +man/man1/prosodyctl.1.gz @dirrmtry etc/prosody/certs @dirrmtry etc/prosody @dirrm lib/prosody/util/sasl @@ -149,3 +150,7 @@ @dirrm lib/prosody/modules @dirrm lib/prosody/core @dirrm lib/prosody +@exec chown -R %%PROSODY_USER%%:%%PROSODY_GROUP%% %D/var/lib/prosody +@dirrmtry var/lib/prosody +@dirrmtry var/lib +@dirrmtry var --- prosody.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: