www/otrs: add missing dependencies, and missing DBUpdateTo6 scripts

- Add missing dependencies
- Attempt to run otrs.SetPermissions.pl script on install. It is going
  to work if there is an existing otrs user from the previous
  installation. Users installing the port for the first time should
  run it manually as stated in pkg-message.
- Install DBUpdateTo6 scripts

PR:		227924, 228106
Reported by:	jonaspalm@posteo.de
Submitted by:	m.tsatsenko@gmail.com (maintainer), Felix J. Ogris <fjo@ogris.de>
This commit is contained in:
Kurt Jaeger 2018-05-15 13:37:05 +00:00
parent 303fad494e
commit cb539c5c7f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=470015
3 changed files with 69 additions and 10 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= otrs PORTNAME= otrs
PORTVERSION= 6.0.6 PORTVERSION= 6.0.6
PORTREVISION= 1
CATEGORIES= www CATEGORIES= www
MAINTAINER= m.tsatsenko@gmail.com MAINTAINER= m.tsatsenko@gmail.com
@ -43,7 +44,9 @@ BUILD_DEPENDS= p5-Archive-Zip>=0:archivers/p5-Archive-Zip \
p5-CGI>=0:www/p5-CGI \ p5-CGI>=0:www/p5-CGI \
p5-Lingua-Translit>=0:devel/p5-Lingua-Translit \ p5-Lingua-Translit>=0:devel/p5-Lingua-Translit \
p5-Pod-Strip>=0:textproc/p5-Pod-Strip \ p5-Pod-Strip>=0:textproc/p5-Pod-Strip \
p5-Template-Toolkit>=0:www/p5-Template-Toolkit p5-Template-Toolkit>=0:www/p5-Template-Toolkit \
p5-XML-LibXML>=0:textproc/p5-XML-LibXML \
p5-Sisimai>=0:mail/p5-Sisimai
RUN_DEPENDS:= ${BUILD_DEPENDS} RUN_DEPENDS:= ${BUILD_DEPENDS}
USES= cpe shebangfix perl5 tar:bzip2 USES= cpe shebangfix perl5 tar:bzip2
@ -169,16 +172,15 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/scripts/database/*.* ${STAGEDIR}${OTRSDIR}/scripts/database/ ${INSTALL_DATA} ${WRKSRC}/scripts/database/*.* ${STAGEDIR}${OTRSDIR}/scripts/database/
${INSTALL_SCRIPT} ${WRKSRC}/scripts/test/*.t ${STAGEDIR}${OTRSDIR}/scripts/test/ ${INSTALL_SCRIPT} ${WRKSRC}/scripts/test/*.t ${STAGEDIR}${OTRSDIR}/scripts/test/
${INSTALL_SCRIPT} ${WRKSRC}/scripts/tools/*.pl ${STAGEDIR}${OTRSDIR}/scripts/tools/ ${INSTALL_SCRIPT} ${WRKSRC}/scripts/tools/*.pl ${STAGEDIR}${OTRSDIR}/scripts/tools/
(cd ${WRKSRC}/scripts && ${PAX} -r -w DBUpdateTo6 ${STAGEDIR}${OTRSDIR}/scripts)
${FIND} ${CRON_SCRIPTS} -type f -name *.dist | ${SED} -e "p;s/\.dist//" | ${XARGS} -n2 ${MV} ${FIND} ${CRON_SCRIPTS} -type f -name *.dist | ${SED} -e "p;s/\.dist//" | ${XARGS} -n2 ${MV}
${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/var/article ${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/var/article
${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/var/httpd/htdocs/js/js-cache/ ${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/var/httpd/htdocs/js/js-cache/
${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/var/tmp ${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/var/tmp
# Attemt to set permissions for OTRS. It will fail if there is no pre-existing otrs user
# otrs.SetPermissions.pl does not work in stage environment due to missing otrs user cd ${STAGEDIR}/${OTRSDIR} && ${PERL} ./bin/otrs.SetPermissions.pl \
#post-install: --web-group=${WWWOWN} \
# cd ${STAGEDIR}/${OTRSDIR} && ${PERL} ./bin/otrs.SetPermissions.pl \ --otrs-user=${PORTNAME} \
# --web-group=${WWWOWN} \ --admin-group=wheel ${STAGEDIR}${OTRSDIR} || true
# --otrs-user=${PORTNAME} \
# --admin-group=wheel ${STAGEDIR}${OTRSDIR}
.include <bsd.port.post.mk> .include <bsd.port.post.mk>

View File

@ -8,7 +8,8 @@ and/or documentation in %%DOCSDIR%% for further instructions, particularly
regarding configuring your web server, database, cron scripts, and regarding configuring your web server, database, cron scripts, and
receiving emails. receiving emails.
Do not forget to run otrs.SetPermissions.pl script. Do not forget to run otrs.SetPermissions.pl script when installing OTRS
for the first time.
For example: For example:
# %%PREFIX%%/otrs/bin/otrs.SetPermissions.pl \ # %%PREFIX%%/otrs/bin/otrs.SetPermissions.pl \
--web-group=%%WWWOWN%% --otrs-user=%%OTRS_USER%% \ --web-group=%%WWWOWN%% --otrs-user=%%OTRS_USER%% \

View File

@ -1,4 +1,4 @@
@owner %%OTRS_USER%% @owner otrs
@group %%WWWOWN%% @group %%WWWOWN%%
@sample otrs/.fetchmailrc.dist otrs/.fetchmailrc @sample otrs/.fetchmailrc.dist otrs/.fetchmailrc
@sample otrs/.mailfilter.dist otrs/.mailfilter @sample otrs/.mailfilter.dist otrs/.mailfilter
@ -1301,6 +1301,62 @@ otrs/bin/otrs.PostMaster.pl
otrs/bin/otrs.SetPermissions.pl otrs/bin/otrs.SetPermissions.pl
otrs/scripts/DBUpdate-to-6.pl otrs/scripts/DBUpdate-to-6.pl
otrs/scripts/DBUpdateTo6.pm otrs/scripts/DBUpdateTo6.pm
otrs/scripts/DBUpdateTo6/AddAppointmentCalendarNotification.pm
otrs/scripts/DBUpdateTo6/Base.pm
otrs/scripts/DBUpdateTo6/CacheCleanup.pm
otrs/scripts/DBUpdateTo6/CleanGroupUserPermissionValue.pm
otrs/scripts/DBUpdateTo6/CreateAppointmentCalendarTables.pm
otrs/scripts/DBUpdateTo6/CreateFormDraftTables.pm
otrs/scripts/DBUpdateTo6/CreateTicketNumberCounterTables.pm
otrs/scripts/DBUpdateTo6/DatabaseBackupCheck.pm
otrs/scripts/DBUpdateTo6/DatabaseCharsetCheck.pm
otrs/scripts/DBUpdateTo6/DatabaseVersionCheck.pm
otrs/scripts/DBUpdateTo6/DropObjectLockState.pm
otrs/scripts/DBUpdateTo6/FrameworkVersionCheck.pm
otrs/scripts/DBUpdateTo6/InitializeDefaultCronjobs.pm
otrs/scripts/DBUpdateTo6/MigrateChatData.pm
otrs/scripts/DBUpdateTo6/MigrateArticleData.pm
otrs/scripts/DBUpdateTo6/MigrateArticleSearchIndex.pm
otrs/scripts/DBUpdateTo6/MigrateConfigEffectiveValues.pm
otrs/scripts/DBUpdateTo6/MigrateGenericAgentJobs.pm
otrs/scripts/DBUpdateTo6/MigratePackageRepositoryConfiguration.pm
otrs/scripts/DBUpdateTo6/MigratePossibleNextActions.pm
otrs/scripts/DBUpdateTo6/MigratePostMasterData.pm
otrs/scripts/DBUpdateTo6/MigrateProcessManagementData.pm
otrs/scripts/DBUpdateTo6/MigrateTicketAppointments.pm
otrs/scripts/DBUpdateTo6/MigrateTicketFrontendCustomerInfoZoom.pm
otrs/scripts/DBUpdateTo6/MigrateTicketMergedHistory.pm
otrs/scripts/DBUpdateTo6/MigrateTicketNotifications.pm
otrs/scripts/DBUpdateTo6/TaskConfig/MigrateArticleData.yml.dist
otrs/scripts/DBUpdateTo6/MigrateTicketStats.pm
otrs/scripts/DBUpdateTo6/MigrateTicketStorageModule.pm
otrs/scripts/DBUpdateTo6/MigrateTimeZoneConfiguration.pm
otrs/scripts/DBUpdateTo6/MigrateWebServiceConfiguration.pm
otrs/scripts/DBUpdateTo6/MigrateZoomExpandConfig.pm
otrs/scripts/DBUpdateTo6/PerlModulesCheck.pm
otrs/scripts/DBUpdateTo6/PerlVersionCheck.pm
otrs/scripts/DBUpdateTo6/PostArticleTableStructureChanges.pm
otrs/scripts/DBUpdateTo6/RebuildConfig.pm
otrs/scripts/DBUpdateTo6/SysConfigCheck.pm
otrs/scripts/DBUpdateTo6/UninstallMergedFeatureAddOns.pm
otrs/scripts/DBUpdateTo6/UpdateAppointmentCalendarFutureTasks.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/ArticleTableChangesPostRename.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/ArticleTableChangesPreRename.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/ArticleTableChangesRename.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/CommunicationLogs.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/DynamicFieldChanges.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/NewArticleSearchIndexTable.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/NewChatDataTable.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/NewCommunicationChannelTable.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/NewCustomerRelationTables.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/NewSysconfigTables.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/PasswordColumnChanges.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/RemoveMD5Columns.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/TicketDropCreateTimeUnix.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/TicketHistoryTableChanges.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/TicketIndexUpdate.pm
otrs/scripts/DBUpdateTo6/UpgradeDatabaseStructure/UpdateNotificationTables.pm
otrs/scripts/apache2-httpd-plack-proxy.conf otrs/scripts/apache2-httpd-plack-proxy.conf
otrs/scripts/apache2-httpd.include.conf otrs/scripts/apache2-httpd.include.conf
otrs/scripts/apache2-perl-startup.pl otrs/scripts/apache2-perl-startup.pl