Bug 196516 - [New Port] mail/openemm2013 OpenEMM a email marketing enterprise app
Summary: [New Port] mail/openemm2013 OpenEMM a email marketing enterprise app
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-05 15:21 UTC by horst.leitenmueller
Modified: 2015-10-24 18:39 UTC (History)
2 users (show)

See Also:


Attachments
openemm2013.shar includes complete port (490.14 KB, application/x-shar)
2015-01-05 15:21 UTC, horst.leitenmueller
no flags Details
openemm2013-R2.log poudriere bulk -t -f ... (303.19 KB, text/plain)
2015-01-05 15:22 UTC, horst.leitenmueller
no flags Details
shar-v2 (487.43 KB, text/plain)
2015-10-11 18:19 UTC, Kurt Jaeger
no flags Details
patch-pkg-message (737 bytes, patch)
2015-10-24 08:24 UTC, horst.leitenmueller
no flags Details | Diff
patch-Makefile (4.22 KB, patch)
2015-10-24 08:24 UTC, horst.leitenmueller
no flags Details | Diff
new file files/pkg-message.in (3.24 KB, patch)
2015-10-24 14:21 UTC, horst.leitenmueller
no flags Details | Diff
changed pkg-message to have value replacements (734 bytes, patch)
2015-10-24 14:23 UTC, horst.leitenmueller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description horst.leitenmueller 2015-01-05 15:21:02 UTC
Created attachment 151359 [details]
openemm2013.shar includes complete port

i have some additional question on porting an java application:


0) do-install
	copytree_share to exclude documentation directory not working (moved doc one level up in do-build: )
	do-build:
        ${MV} ${WRKSRC}/target/USR_SHARE ${WRKSRC}/USR_SHARE

	do-install
        ${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}
        (cd ${WRKSRC}/target/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${PREFIX}/${PORTNAME} "! -name USR_SHARE*")

	post-install
		# update also /usr/local/share with the docs
        ${MKDIR} ${STAGEDIR}${DOCSDIR}
        (cd ${WRKSRC}/USR_SHARE/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})

	is there a better solution for this ?


1) pkg-plist 
	documentation with 

	i added for all entries in the Docsdir 
	%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.txt  

	but i get a warning that 
	
	portlint -A
	WARN: /usr/ports/mail/openemm2013/pkg-plist: Both ``%%PORTDOCS%%@dirrm %%DOCSDIR%%'' and ``%%PORTDOCS%%@unexec %D/%%DOCSDIR%% 2>/dev/null || true'' are missing.  At least one should be used.

	and in portershandbook https://www.freebsd.org/doc/en/books/porters-handbook/plist-keywords.html  7.6.7.10. @dirrm directory (Deprecated)

	so now what i have to add :-)


2) License if not defined in freebsd.lic db mk
	and building with poudriere will fail if the license must be accepted, how can this be solved ?

LICENSE=        MPL
#LICENSE=       CPAL
#LICENSE_COMB=   multi
#LICENSE_NAME=  Common Public Attribution License Version 1.0 (CPAL)
#LICENSE_FILE=   ${DOCSDIR}/LICENSE.txt  
#LICENSE_PERMS_OpenEMM= auto-accept # dist-mirror pkg-mirror auto-accept

is there a best practice to transfer all lic to the correct place of freebsd
post-install:

        # TODO LEI
        # move the licenses to the correct place
        # /usr/local/share/doc/openemm2013/LICENSE.txt
        # /usr/local/share/doc/openemm2013/ThirdPartyLicences/*



3) devel/libslang2 name for lib dependency (LIB_DEPENDS)

   but libslang.so is the one which must be declared otherwise it will be never found is it normal in this way ?

   LIB_DEPENDS=    libslang.so:${PORTSDIR}/devel/libslang2


4) USES python best way to define dynamically RUN_DEPENDS  for db (py27-MySQLdb56 )

RUN_DEPENDS=    ${TOMCATHOME}/bin/bootstrap.jar:${PORTSDIR}/www/tomcat8 py27-MySQLdb56>=1.2.3:${PORTSDIR}/databases/py-MySQLdb56
....

USES=   python:2.7,run
.... 




5) best way to reinplace_cmd for paths in the target system
	example 

	@${REINPLACE_CMD} -e 's|$$HOME|\${PREFIX}\/\${PORTNAME}|g' -e 's|-L INFO|-L INFO -s /var/run/openemm/bav.sock|' ${WRKSRC}/src/script/control/bounce.sh
       
	to hardcode /var/run will not be the best or ?

also portlint is complaining
root@openemm:/usr/ports/mail/openemm2013 # portlint
WARN: Makefile: possible use of absolute pathname "/var".


6) not able to replace

	i have a few problems with the REINPLACE_CMD 
		i thougt special character escaping is working as normal example \$ would escapce $ but it's not $$ escapes it 
		problem here a can't escape the single quote only in this way it's working...
		another problem i wanted to use grouping but this was also not working
			LHS |(base=)os.envirion.*| and on RHS |\1=${PREFIX}...| 

	@${REINPLACE_CMD} -e "s|base = os.environ\['HOME'\]| base = '${PREFIX}\/${PORTNAME}'|g" -e "s|lockpath = os.environ\['LOCK_HOME'\]|lockpath = '/var/run/openemm'|g" ${WRKSRC}/src/script/lib/agn.py

7) symlink for pyhton 

	the application refers to the /usr/local/bin/python path installation of pyhton is only with version Nr
        # TODO LEI
        #${LN} -sf /usr/local/bin/python2.7 /usr/local/bin/python

	how can this be done ?, (btw.: app has no variable for current pyhton path)

8) portlint and position of LIB_DEPENDS / BUILD_DEPENDS / RUN_DEPENDS
portlint complains about position of following

WARN: Makefile: "BUILD_DEPENDS" has to appear earlier.
WARN: Makefile: "RUN_DEPENDS" has to appear earlier.

i have tried now all positions before ... but without success, where should it be placed (i would love to have a xsd for that to know WHAT is wrong and where it should be...)


9) portlint -A was complaing about not using PREFIX in pkg-message
	i thougt it will be replaced ? but this is not working as expected; is there a other way to get this solved 
    or is the only way to hardcode it ?
Comment 1 horst.leitenmueller 2015-01-05 15:22:37 UTC
Created attachment 151360 [details]
openemm2013-R2.log  poudriere bulk -t -f ...
Comment 2 Kurt Jaeger freebsd_committer freebsd_triage 2015-01-05 15:27:02 UTC
Testing @work
Comment 3 Kurt Jaeger freebsd_committer freebsd_triage 2015-01-05 19:24:00 UTC
works on 10.1-amd64, 9.3-amd64, fails on 8.4-i386:

http://people.freebsd.org/~pi/logs/mail__openemm2013-84i-1420482638.txt

looking at the questions posed by submitter @ work.
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2015-10-11 17:40:08 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203702

adds CPAL-1.0 to bsd.licenses.db.mk
Comment 5 Kurt Jaeger freebsd_committer freebsd_triage 2015-10-11 18:19:55 UTC
Created attachment 161921 [details]
shar-v2

Modified, test-builds on 11a, 10.2a+i, 9.3
Comment 6 commit-hook freebsd_committer freebsd_triage 2015-10-17 16:42:28 UTC
A commit references this bug:

Author: pi
Date: Sat Oct 17 16:41:32 UTC 2015
New revision: 399542
URL: https://svnweb.freebsd.org/changeset/ports/399542

Log:
  New port: mail/openemm2013

  OpenEMM is a feature-rich web-based enterprise application for email
  marketing, newsletters and service mails (transaction mails and
  event or time triggered mails). OpenEMM offers a great user interface,
  sophisticated bounce management, link tracking, lots of graphical
  realtime statistics, a CMS module and a scripting feature to implement
  individual tasks.

  OpenEMM is the first open source application for e-mail marketing.
  Its code base has been developed since 1999 and is used - as part
  of the commercial software product E-Marketing Manager (EMM) - by
  companies like IBM, Daimler, Siemens and Deutsche Telekom.

  OpenEMM offers already more than 95% of the functionality of most
  commercial products and some features most commercial products do
  not offer right now (for example MySQL support and CMS functionality).

  WWW: http://www.openemm.org

  PR:		196516
  Submitted by:	Horst Leitenmueller <horst.leitenmueller@liwest.at>

Changes:
  head/mail/Makefile
  head/mail/openemm2013/
  head/mail/openemm2013/Makefile
  head/mail/openemm2013/distinfo
  head/mail/openemm2013/files/
  head/mail/openemm2013/files/openemm2013.in
  head/mail/openemm2013/files/patch-openemm_build.xml
  head/mail/openemm2013/files/patch-src__c__bav__GNUmakefile
  head/mail/openemm2013/files/patch-src__c__bav__bav.c
  head/mail/openemm2013/files/patch-src__c__lib__GNUmakefile
  head/mail/openemm2013/files/patch-src__c__lib__agn.h
  head/mail/openemm2013/files/patch-src__c__tools__GNUmakefile
  head/mail/openemm2013/files/patch-src__c__xmlback__GNUmakefile
  head/mail/openemm2013/files/patch-src__c__xmlback__eval.c
  head/mail/openemm2013/files/patch-src__c__xmlback__grammar__GNUmakefile
  head/mail/openemm2013/files/patch-src__java__org__agnitas__backend__StringOps.java
  head/mail/openemm2013/files/patch-src__java__org__agnitas__beans__FailedLoginData.java
  head/mail/openemm2013/files/patch-src__java__org__agnitas__beans__ImageButton.java
  head/mail/openemm2013/files/patch-src__java__org__agnitas__dao__LoginTrackDao.java
  head/mail/openemm2013/files/patch-src__java__org__agnitas__util__CharacterEncodingValidator.java
  head/mail/openemm2013/files/patch-src__java__org__agnitas__util__CharacterEncodingValidatorImpl.java
  head/mail/openemm2013/files/patch-src__java__org__agnitas__util__TextTable.java
  head/mail/openemm2013/files/patch-src__jsp__WEB-INF__web.xml
  head/mail/openemm2013/files/patch-src__script__lib__config.sh
  head/mail/openemm2013/files/patch-src_java_org_agnitas_beans_impl_FailedLoginDataImpl.java
  head/mail/openemm2013/files/patch-src_java_org_agnitas_dao_impl_LoginTrackDaoImpl.java
  head/mail/openemm2013/files/patch-src_java_org_agnitas_emm_extension_listener_ExtensionSystemInitializationContextListener.java
  head/mail/openemm2013/pkg-descr
  head/mail/openemm2013/pkg-message
  head/mail/openemm2013/pkg-plist
Comment 7 Kurt Jaeger freebsd_committer freebsd_triage 2015-10-17 16:45:21 UTC
Committed, thanks.

I'll keep this open for run-test experiences etc for a while.

Any volunteers to port the 2015 version of this 8-) ?
Comment 8 horst.leitenmueller 2015-10-18 07:10:16 UTC
i already finished porting openemm2015, but have to check the differences; then i will upload the openemm2015, as a "new port" request

i will also check this one if correct runnable 

BEST thanx in advance for this help here :-)
Comment 9 horst.leitenmueller 2015-10-24 08:22:09 UTC
added 2 patches for correct running

patch-Makefile
post-patch for all .py files to be independent of the path defined in the files
missing log files (and .log is java specific ... there i keep the ending on the files)

patch-pkg-message
pkg-message changed path to /etc/rc.d/sendmail   was init.d 
added info for replacement of chunk which must be added to server.xml
Comment 10 horst.leitenmueller 2015-10-24 08:24:16 UTC
Created attachment 162407 [details]
patch-pkg-message
Comment 11 horst.leitenmueller 2015-10-24 08:24:46 UTC
Created attachment 162408 [details]
patch-Makefile
Comment 12 horst.leitenmueller 2015-10-24 14:21:38 UTC
Created attachment 162420 [details]
new file files/pkg-message.in

old file in root dir must be removed

don't know howto make this...

rm mail/openemm2013/pkg-message
Comment 13 horst.leitenmueller 2015-10-24 14:23:09 UTC
Created attachment 162421 [details]
changed pkg-message to have value replacements

belongs to patch 162420 files/pkg-message.in
Comment 14 commit-hook freebsd_committer freebsd_triage 2015-10-24 18:27:21 UTC
A commit references this bug:

Author: pi
Date: Sat Oct 24 18:26:49 UTC 2015
New revision: 400134
URL: https://svnweb.freebsd.org/changeset/ports/400134

Log:
  mail/openemm2013: cleanup

  - fix .py files
  - logdir added
  - pkg-message enhanced with variables for some pathes

  PR:		196516
  Submitted by:	Horst Leitenmueller <horst.leitenmueller@liwest.at> (maintainer)

Changes:
  head/mail/openemm2013/Makefile
  head/mail/openemm2013/files/pkg-message.in
  head/mail/openemm2013/pkg-message
  head/mail/openemm2013/pkg-plist
Comment 15 Kurt Jaeger freebsd_committer freebsd_triage 2015-10-24 18:39:26 UTC
Test-builds are fine. Committed, thanks very much for the fixes!