Bug 190920 - [Stage by maintainer] security/p5-openxpki-deployment
Summary: [Stage by maintainer] security/p5-openxpki-deployment
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-11 09:38 UTC by Sergei Vyshenski
Modified: 2014-06-12 09:42 UTC (History)
1 user (show)

See Also:


Attachments
patch to add staging (15.56 KB, patch)
2014-06-11 12:15 UTC, Sergei Vyshenski
no flags Details | Diff
new (corrected) patch (3.65 KB, patch)
2014-06-12 09:35 UTC, Sergei Vyshenski
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Vyshenski 2014-06-11 09:38:26 UTC
This port has two long-standing and non-related problems: 
	1) not staged,
	2) does not compile on FreeBSD-10+ (this is controled by the IGNORE
		constuct in port security/p5-openxpki, from which we depend).

	This patch deals with the first promlem only, the second problem will 
	be solved in the next version of the openxpki port suite. 

	This patch:

	- adds staging support to Makefile
	- increments PORTREVISION
	- adds LICENSE
	- fixes pkg-plist to include man pages
	- fixes rc.d script to new rules

	Please note that the line in the Makefile 

	CONFIGURE_ARGS= --prefix ${PREFIX}

	should be left intact, that is without incerting STAGEDIR, because here
	we do not specify "destination" of the port, but rather a special
	configuration option of the original software.

Fix:
diff -ruN security/p5-openxpki-deployment.orig/Makefile security/p5-openxpki-deployment/Makefile
--- security/p5-openxpki-deployment.orig/Makefile	1970-01-01 03:00:00.000000000 +0300
+++ security/p5-openxpki-deployment/Makefile	2014-06-11 13:19:05.000000000 +0400
@@ -0,0 +1,46 @@
+# Created by: Sergei Vyshenski <svysh.fbsd@gmail.com>
+# $FreeBSD: head/security/p5-openxpki-deployment/Makefile 355321 2014-05-26 12:50:40Z miwi $
+
+PORTNAME=	openxpki-deployment
+PORTVERSION=	0.9.1386
+PORTREVISION=	2
+CATEGORIES=	security perl5
+MASTER_SITES=	SF/openxpki/openxpki/0.9.1300
+PKGNAMEPREFIX=	p5-
+DIST_SUBDIR=	openxpki
+
+MAINTAINER=	svysh.fbsd@gmail.com
+COMMENT=	Perl based enterprise class trustcenter software for PKI
+
+LICENSE=	ART20
+
+BUILD_DEPENDS=	\
+	p5-openxpki-client>=0:${PORTSDIR}/security/p5-openxpki-client \
+	p5-Config-Std>=0:${PORTSDIR}/devel/p5-Config-Std \
+	p5-Template-Toolkit>=0:${PORTSDIR}/www/p5-Template-Toolkit \
+	bash:${PORTSDIR}/shells/bash
+RUN_DEPENDS:=	${BUILD_DEPENDS}
+
+USES=		perl5 gmake
+USE_RC_SUBR=	openxpki
+HAS_CONFIGURE=	yes
+CONFIGURE_ARGS=	--prefix ${PREFIX}
+# Do not prepend PREFIX with STAGEDIR here, it is not a "destination".
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|>/dev/null 2>&1 | |' ${WRKSRC}/configure
+
+post-install:
+	@${ECHO_MSG} ""
+	@${ECHO_MSG} "================================ A piece of advice ==================================="
+	@${ECHO_MSG} "===> Install your favorite database (enable utf-8 support if needed) and a web server."
+	@${ECHO_MSG} "===> Perform deployment procedure for openxpki in a regular way."
+	@${ECHO_MSG} "===> When asked for the name of the \"openxpki user\" answer \"openxpki\","
+	@${ECHO_MSG} "===> and do not forget to add a line: \"User openxpki\" to the zone of your"
+	@${ECHO_MSG} "===> OpenXPI-related (virtual) web server in your Apache configuration file."
+	@${ECHO_MSG} ""
+.if !defined(BATCH)
+	@sleep 9
+.endif
+
+.include <bsd.port.mk>
diff -ruN security/p5-openxpki-deployment.orig/Makefile.orig security/p5-openxpki-deployment/Makefile.orig
--- security/p5-openxpki-deployment.orig/Makefile.orig	2014-05-26 16:50:40.000000000 +0400
+++ security/p5-openxpki-deployment/Makefile.orig	1970-01-01 03:00:00.000000000 +0300
@@ -1,49 +0,0 @@
-# Created by: Sergei Vyshenski <svysh@pn.sinp.msu.ru>
-# $FreeBSD: head/security/p5-openxpki-deployment/Makefile 355321 2014-05-26 12:50:40Z miwi $
-
-PORTNAME=	openxpki-deployment
-PORTVERSION=	0.9.1386
-PORTREVISION=	1
-CATEGORIES=	security perl5
-MASTER_SITES=	SF/openxpki/openxpki/0.9.1300
-PKGNAMEPREFIX=	p5-
-DIST_SUBDIR=	openxpki
-
-MAINTAINER=	svysh.fbsd@gmail.com
-COMMENT=	Perl based enterprise class trustcenter software for PKI
-
-BROKEN=		not staged
-BUILD_DEPENDS=	\
-	p5-openxpki-client>=0:${PORTSDIR}/security/p5-openxpki-client \
-	p5-Config-Std>=0:${PORTSDIR}/devel/p5-Config-Std \
-	p5-Template-Toolkit>=0:${PORTSDIR}/www/p5-Template-Toolkit \
-	bash:${PORTSDIR}/shells/bash
-RUN_DEPENDS:=	${BUILD_DEPENDS}
-
-MAN1=	openxpki-configure.1 \
-	openxpki-metaconf.1 \
-	openxpkiadm.1 \
-	openxpkictl.1
-USES=		perl5 gmake
-USE_RC_SUBR=	openxpki
-HAS_CONFIGURE=	yes
-CONFIGURE_ARGS=	--prefix ${PREFIX}
-
-NO_STAGE=	yes
-post-patch:
-	@${REINPLACE_CMD} -e 's|>/dev/null 2>&1 | |' ${WRKSRC}/configure
-
-post-install:
-	@${ECHO_MSG} ""
-	@${ECHO_MSG} "================================ A piece of advice ==================================="
-	@${ECHO_MSG} "===> Install your favorite database (enable utf-8 support if needed) and a web server."
-	@${ECHO_MSG} "===> Perform deployment procedure for openxpki in a regular way."
-	@${ECHO_MSG} "===> When asked for the name of the \"openxpki user\" answer \"openxpki\","
-	@${ECHO_MSG} "===> and do not forget to add a line: \"User openxpki\" to the zone of your"
-	@${ECHO_MSG} "===> OpenXPI-related (virtual) web server in your Apache configuration file."
-	@${ECHO_MSG} ""
-.if !defined(BATCH)
-	@sleep 9
-.endif
-
-.include <bsd.port.mk>
diff -ruN security/p5-openxpki-deployment.orig/files/openxpki.in security/p5-openxpki-deployment/files/openxpki.in
--- security/p5-openxpki-deployment.orig/files/openxpki.in	1970-01-01 03:00:00.000000000 +0300
+++ security/p5-openxpki-deployment/files/openxpki.in	2014-06-11 02:27:33.000000000 +0400
@@ -0,0 +1,32 @@
+#!/bin/sh
+# $FreeBSD: head/security/p5-openxpki-deployment/files/openxpki.in 340872 2014-01-24 00:14:07Z mat $
+
+# PROVIDE: openxpki
+# REQUIRE: LOGIN
+# REQUIRE: postgresql
+# REQUIRE: mysql
+# KEYWORD: shutdown
+
+# Define this variable in the file /etc/rc.conf:
+# openxpki_enable="YES"
+# to ensure that openxpki starts at boot time.
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+# SET THEM IN THE /etc/rc.conf FILE
+#
+
+. /etc/rc.subr
+
+name=openxpki
+rcvar=openxpki_enable
+load_rc_config $name
+command="%%PREFIX%%/bin/openxpkictl"
+
+openxpki_enable="${openxpki_enable-NO}"
+openxpki_pidfile="%%PREFIX%%/var/openxpki/openxpki.pid"
+
+procname=openxpkid
+
+pidfile=${openxpki_pidfile}
+
+run_rc_command "$1"
diff -ruN security/p5-openxpki-deployment.orig/files/openxpki.in.orig security/p5-openxpki-deployment/files/openxpki.in.orig
--- security/p5-openxpki-deployment.orig/files/openxpki.in.orig	2014-01-24 04:14:07.000000000 +0400
+++ security/p5-openxpki-deployment/files/openxpki.in.orig	1970-01-01 03:00:00.000000000 +0300
@@ -1,36 +0,0 @@
-#!/bin/sh
-# $FreeBSD: head/security/p5-openxpki-deployment/files/openxpki.in 340872 2014-01-24 00:14:07Z mat $
-
-# PROVIDE: openxpki
-# REQUIRE: LOGIN
-# REQUIRE: postgresql
-# REQUIRE: mysql
-# KEYWORD: shutdown
-
-# Define this variable in the file /etc/rc.conf:
-# openxpki_enable="YES"
-# to ensure that openxpki starts at boot time.
-#
-# DO NOT CHANGE THESE DEFAULT VALUES HERE
-#
-# openxpki_flags	(Set as needed)
-
-openxpki_enable="${openxpki_enable-NO}"
-openxpki_pidfile="%%PREFIX%%/var/openxpki/openxpki.pid"
-
-case "$1" in 
-    *start) command_args="start";;
-esac
-
-. /etc/rc.subr
-
-name="openxpki"
-rcvar=openxpki_enable
-command="%%PREFIX%%/bin/openxpkictl"
-procname="openxpkid"
-
-load_rc_config $name
-
-pidfile="${openxpki_pidfile}"
-
-run_rc_command "$1"
diff -ruN security/p5-openxpki-deployment.orig/pkg-plist security/p5-openxpki-deployment/pkg-plist
--- security/p5-openxpki-deployment.orig/pkg-plist	1970-01-01 03:00:00.000000000 +0300
+++ security/p5-openxpki-deployment/pkg-plist	2014-06-11 01:06:00.000000000 +0400
@@ -0,0 +1,78 @@
+bin/openxpki-configure
+bin/openxpki-metaconf
+bin/openxpkiadm
+bin/openxpkictl
+man/man1/openxpki-configure.1.gz
+man/man1/openxpki-metaconf.1.gz
+man/man1/openxpkiadm.1.gz
+man/man1/openxpkictl.1.gz
+share/openxpki/templates/default/acl.xml
+share/openxpki/templates/default/auth.xml
+share/openxpki/templates/default/config.xml
+share/openxpki/templates/default/database.xml
+share/openxpki/templates/default/ldappublic.xml
+share/openxpki/templates/default/log.conf
+share/openxpki/templates/default/log_database.xml
+share/openxpki/templates/default/notification.xml
+share/openxpki/templates/default/notification/en/certificate_issued_correspond.txt
+share/openxpki/templates/default/notification/en/csr_approvals_canceled_comment.txt
+share/openxpki/templates/default/notification/en/csr_approved_comment.txt
+share/openxpki/templates/default/notification/en/csr_created_comment.txt
+share/openxpki/templates/default/notification/en/csr_created_correspond.txt
+share/openxpki/templates/default/notification/en/csr_rejected_correspond.txt
+share/openxpki/templates/default/openxpki.conf
+share/openxpki/templates/default/profile.xml
+share/openxpki/templates/default/token.xml
+share/openxpki/templates/default/workflow.xml
+share/openxpki/templates/default/workflow_activity_certificate_issuance.xml
+share/openxpki/templates/default/workflow_activity_certificate_ldap_publishing.xml
+share/openxpki/templates/default/workflow_activity_certificate_revocation_request.xml
+share/openxpki/templates/default/workflow_activity_certificate_signing_request.xml
+share/openxpki/templates/default/workflow_activity_crl_issuance.xml
+share/openxpki/templates/default/workflow_activity_dataexchange.xml
+share/openxpki/templates/default/workflow_activity_null.xml
+share/openxpki/templates/default/workflow_activity_password_safe.xml
+share/openxpki/templates/default/workflow_activity_scep_request.xml
+share/openxpki/templates/default/workflow_activity_smartcard_personalization.xml
+share/openxpki/templates/default/workflow_condition.xml
+share/openxpki/templates/default/workflow_def_certificate_issuance.xml
+share/openxpki/templates/default/workflow_def_certificate_ldap_publishing.xml
+share/openxpki/templates/default/workflow_def_certificate_revocation_request.xml
+share/openxpki/templates/default/workflow_def_certificate_signing_request.xml
+share/openxpki/templates/default/workflow_def_crl_issuance.xml
+share/openxpki/templates/default/workflow_def_password_safe.xml
+share/openxpki/templates/default/workflow_def_scep_request.xml
+share/openxpki/templates/default/workflow_def_smartcard_personalization.xml
+share/openxpki/templates/default/workflow_validator_certificate_revocation_request.xml
+share/openxpki/templates/default/workflow_validator_certificate_signing_request.xml
+share/openxpki/templates/default/workflow_validator_password_safe.xml
+share/openxpki/templates/quickstart/acl.xml
+share/openxpki/templates/quickstart/auth.xml
+share/openxpki/templates/quickstart/config.xml
+share/openxpki/templates/quickstart/database.xml
+share/openxpki/templates/quickstart/log.conf
+share/openxpki/templates/quickstart/log_database.xml
+share/openxpki/templates/quickstart/notification.xml
+share/openxpki/templates/quickstart/openxpki.conf
+share/openxpki/templates/quickstart/profile.xml
+share/openxpki/templates/quickstart/token.xml
+share/openxpki/templates/quickstart/workflow.xml
+share/openxpki/templates/quickstart/workflow_activity_certificate_issuance.xml
+share/openxpki/templates/quickstart/workflow_activity_certificate_revocation_request.xml
+share/openxpki/templates/quickstart/workflow_activity_certificate_signing_request.xml
+share/openxpki/templates/quickstart/workflow_activity_crl_issuance.xml
+share/openxpki/templates/quickstart/workflow_activity_null.xml
+share/openxpki/templates/quickstart/workflow_condition.xml
+share/openxpki/templates/quickstart/workflow_def_certificate_issuance.xml
+share/openxpki/templates/quickstart/workflow_def_certificate_revocation_request.xml
+share/openxpki/templates/quickstart/workflow_def_certificate_signing_request.xml
+share/openxpki/templates/quickstart/workflow_def_crl_issuance.xml
+share/openxpki/templates/quickstart/workflow_validator_certificate_revocation_request.xml
+share/openxpki/templates/quickstart/workflow_validator_certificate_signing_request.xml
+@dirrmtry share/openxpki/templates/default/notification/en
+@dirrmtry share/openxpki/templates/default/notification
+@dirrmtry share/openxpki/templates/default
+@dirrmtry share/openxpki/templates/quickstart/notification
+@dirrmtry share/openxpki/templates/quickstart
+@dirrmtry share/openxpki/templates
+@dirrmtry share/openxpki
diff -ruN security/p5-openxpki-deployment.orig/pkg-plist.orig security/p5-openxpki-deployment/pkg-plist.orig
--- security/p5-openxpki-deployment.orig/pkg-plist.orig	2014-01-22 19:16:56.000000000 +0400
+++ security/p5-openxpki-deployment/pkg-plist.orig	1970-01-01 03:00:00.000000000 +0300
@@ -1,74 +0,0 @@
-bin/openxpki-configure
-bin/openxpki-metaconf
-bin/openxpkiadm
-bin/openxpkictl
-share/openxpki/templates/default/acl.xml
-share/openxpki/templates/default/auth.xml
-share/openxpki/templates/default/config.xml
-share/openxpki/templates/default/database.xml
-share/openxpki/templates/default/ldappublic.xml
-share/openxpki/templates/default/log.conf
-share/openxpki/templates/default/log_database.xml
-share/openxpki/templates/default/notification.xml
-share/openxpki/templates/default/notification/en/certificate_issued_correspond.txt
-share/openxpki/templates/default/notification/en/csr_approvals_canceled_comment.txt
-share/openxpki/templates/default/notification/en/csr_approved_comment.txt
-share/openxpki/templates/default/notification/en/csr_created_comment.txt
-share/openxpki/templates/default/notification/en/csr_created_correspond.txt
-share/openxpki/templates/default/notification/en/csr_rejected_correspond.txt
-share/openxpki/templates/default/openxpki.conf
-share/openxpki/templates/default/profile.xml
-share/openxpki/templates/default/token.xml
-share/openxpki/templates/default/workflow.xml
-share/openxpki/templates/default/workflow_activity_certificate_issuance.xml
-share/openxpki/templates/default/workflow_activity_certificate_ldap_publishing.xml
-share/openxpki/templates/default/workflow_activity_certificate_revocation_request.xml
-share/openxpki/templates/default/workflow_activity_certificate_signing_request.xml
-share/openxpki/templates/default/workflow_activity_crl_issuance.xml
-share/openxpki/templates/default/workflow_activity_dataexchange.xml
-share/openxpki/templates/default/workflow_activity_null.xml
-share/openxpki/templates/default/workflow_activity_password_safe.xml
-share/openxpki/templates/default/workflow_activity_scep_request.xml
-share/openxpki/templates/default/workflow_activity_smartcard_personalization.xml
-share/openxpki/templates/default/workflow_condition.xml
-share/openxpki/templates/default/workflow_def_certificate_issuance.xml
-share/openxpki/templates/default/workflow_def_certificate_ldap_publishing.xml
-share/openxpki/templates/default/workflow_def_certificate_revocation_request.xml
-share/openxpki/templates/default/workflow_def_certificate_signing_request.xml
-share/openxpki/templates/default/workflow_def_crl_issuance.xml
-share/openxpki/templates/default/workflow_def_password_safe.xml
-share/openxpki/templates/default/workflow_def_scep_request.xml
-share/openxpki/templates/default/workflow_def_smartcard_personalization.xml
-share/openxpki/templates/default/workflow_validator_certificate_revocation_request.xml
-share/openxpki/templates/default/workflow_validator_certificate_signing_request.xml
-share/openxpki/templates/default/workflow_validator_password_safe.xml
-share/openxpki/templates/quickstart/acl.xml
-share/openxpki/templates/quickstart/auth.xml
-share/openxpki/templates/quickstart/config.xml
-share/openxpki/templates/quickstart/database.xml
-share/openxpki/templates/quickstart/log.conf
-share/openxpki/templates/quickstart/log_database.xml
-share/openxpki/templates/quickstart/notification.xml
-share/openxpki/templates/quickstart/openxpki.conf
-share/openxpki/templates/quickstart/profile.xml
-share/openxpki/templates/quickstart/token.xml
-share/openxpki/templates/quickstart/workflow.xml
-share/openxpki/templates/quickstart/workflow_activity_certificate_issuance.xml
-share/openxpki/templates/quickstart/workflow_activity_certificate_revocation_request.xml
-share/openxpki/templates/quickstart/workflow_activity_certificate_signing_request.xml
-share/openxpki/templates/quickstart/workflow_activity_crl_issuance.xml
-share/openxpki/templates/quickstart/workflow_activity_null.xml
-share/openxpki/templates/quickstart/workflow_condition.xml
-share/openxpki/templates/quickstart/workflow_def_certificate_issuance.xml
-share/openxpki/templates/quickstart/workflow_def_certificate_revocation_request.xml
-share/openxpki/templates/quickstart/workflow_def_certificate_signing_request.xml
-share/openxpki/templates/quickstart/workflow_def_crl_issuance.xml
-share/openxpki/templates/quickstart/workflow_validator_certificate_revocation_request.xml
-share/openxpki/templates/quickstart/workflow_validator_certificate_signing_request.xml
-@dirrmtry share/openxpki/templates/quickstart/notification
-@dirrmtry share/openxpki/templates/quickstart
-@dirrmtry share/openxpki/templates/default/notification/en
-@dirrmtry share/openxpki/templates/default/notification
-@dirrmtry share/openxpki/templates/default
-@dirrmtry share/openxpki/templates
-@dirrmtry share/openxpki
Comment 1 Sergei Vyshenski 2014-06-11 12:15:30 UTC
Created attachment 143672 [details]
patch to add staging
Comment 2 Sergei Vyshenski 2014-06-11 19:24:20 UTC
This patch has passed tests on FreeBSD-9.3-beta2 (i386) as follows:

1) with rclint,
2) with ports-mgmt/porttools running "port test security/p5-openxpki-deployment",
3) building, installing and deinstalling a package as a non-root user.
Comment 3 Sergei Vyshenski 2014-06-12 09:35:46 UTC
Created attachment 143702 [details]
new (corrected) patch

New (corrected) patch. Please use only this one.
Patch in a text of PR, and previously attached patch are both wrongly prepared.
But the essence content of the patch is the same as before.