On 05/04/14 10:36, Joachim Schipper wrote: > On Sat, May 03, 2014 at 04:52:29PM +0200, Marc Peters wrote: >> Hi, >> >> this update needs a new file in /usr/local/openfire/conf and a new patch >> for this new file. It is /usr/local/openfire/conf/security.xml and i >> wanted to clear the value for <property>, so that any user can define >> him-/herself, what will be encrypted by openfire at the next start. >> >> I would like to know, how to include this new file in PLIST and add a >> patches directory with a new file, so that openfire will start without >> any further user intevention after upgrade. > > Just: > + add the file to do-install (look at the existing openfire.xml?) > + make update-plist, and ensure security.xml is added > + copy the security.xml under the source directory to security.xml.orig > + make the changes you want > + make update-patches > > That said, all else being equal, it's better for ports to behave as the > author intended/as they work elsewhere. > > Joachim
The new file security.xml, can be used to encrypt properties in the openfire.xml. The downside is, that openfire won't start without it, and i was not able to found any documentation about it. Just one post in the communityforum, where it broke authenticatin of another user, because of the default listing in it. http://community.igniterealtime.org/message/238720 Therefore i patch the initial list out (list can be edited at runtime via the "System Properties" page in the Openfire console) and add the file to the correct directory for a smoother upgrade than i initially had ;). Should this issue be mentioned in the README? I rearranged the examples section a bit. Patch is attached. Comments, OKs?
Index: Makefile =================================================================== RCS file: /cvs/ports/net/openfire/Makefile,v retrieving revision 1.30 diff -u -p -u -p -r1.30 Makefile --- Makefile 16 Mar 2014 01:34:31 -0000 1.30 +++ Makefile 5 May 2014 08:38:52 -0000 @@ -1,7 +1,7 @@ # $OpenBSD: Makefile,v 1.30 2014/03/16 01:34:31 sthen Exp $ COMMENT= XMPP real time collaboration server -V= 3.9.1 +V= 3.9.2 DISTNAME= openfire_src_${V:S/./_/g} PKGNAME= openfire-$V CATEGORIES= net @@ -44,8 +44,11 @@ do-install: ${INSTALL_DATA} ${WRKDIST}/documentation/docs/database.html \ ${PREFIX}/share/doc/openfire ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/openfire/security + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/openfire/conf ${INSTALL_DATA} ${WRKDIST}/target/openfire/conf/openfire.xml \ - ${PREFIX}/share/examples/openfire + ${PREFIX}/share/examples/openfire/conf + ${INSTALL_DATA} ${WRKDIST}/target/openfire/conf/security.xml \ + ${PREFIX}/share/examples/openfire/conf ${INSTALL_DATA} ${WRKBUILD}/security/* \ ${PREFIX}/share/examples/openfire/security Index: distinfo =================================================================== RCS file: /cvs/ports/net/openfire/distinfo,v retrieving revision 1.6 diff -u -p -u -p -r1.6 distinfo --- distinfo 16 Mar 2014 01:34:31 -0000 1.6 +++ distinfo 5 May 2014 08:38:52 -0000 @@ -1,2 +1,2 @@ -SHA256 (openfire_src_3_9_1.tar.gz) = aCV26hahETdHNc+TvV5ET+7m0LcUsQlDaqfgx3XzAg0= -SIZE (openfire_src_3_9_1.tar.gz) = 123053536 +SHA256 (openfire_src_3_9_2.tar.gz) = fKMZSjL9AGGsW8MPHVm0g7uUXXvk0+Ayx0k/jgBwx0I= +SIZE (openfire_src_3_9_2.tar.gz) = 80845988 Index: patches/patch-src_conf_security_xml =================================================================== RCS file: patches/patch-src_conf_security_xml diff -N patches/patch-src_conf_security_xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_conf_security_xml 5 May 2014 08:38:52 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ +--- src/conf/security.xml.orig Mon May 5 09:15:16 2014 ++++ src/conf/security.xml Mon May 5 09:15:31 2014 +@@ -50,12 +50,6 @@ + (already in the database) can be added to this list at runtime via the + "System Properties" page in the Openfire console. + --> +- <name>database.defaultProvider.username</name> +- <name>database.defaultProvider.password</name> +- <name>ldap.adminDN</name> +- <name>ldap.adminPassword</name> +- <name>clearspace.uri</name> +- <name>clearspace.sharedSecret</name> + </property> + </encrypt> + Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/net/openfire/pkg/PLIST,v retrieving revision 1.6 diff -u -p -u -p -r1.6 PLIST --- pkg/PLIST 16 Mar 2014 01:34:31 -0000 1.6 +++ pkg/PLIST 5 May 2014 08:38:52 -0000 @@ -394,6 +394,7 @@ share/doc/openfire/translator-guide.html share/doc/openfire/upgrade-guide.html share/doc/pkg-readmes/${FULLPKGNAME} share/examples/openfire/ +share/examples/openfire/conf/ @mode 775 @owner root @group _openfire @@ -401,11 +402,13 @@ share/examples/openfire/ @mode @owner @group -share/examples/openfire/openfire.xml +share/examples/openfire/conf/openfire.xml +@sample openfire/conf/openfire.xml @mode 660 @owner root @group _openfire -@sample openfire/conf/openfire.xml +share/examples/openfire/conf/security.xml +@sample openfire/conf/security.xml @mode @owner @group