Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37703 - Requesting ebuild for the openca labs
Summary: Requesting ebuild for the openca labs
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement with 1 vote (vote)
Assignee: Default Assignee for New Packages
URL: http://www.openca.org/openca/download...
Whiteboard:
Keywords: EBUILD
Depends on: 309537 54025 309489 309491 309493 309497 309499 309505 309507 309509 309511 309513 309517 309519 309521 309523 309525 309527 309529 309531 309533 309535 356007
Blocks:
  Show dependency tree
 
Reported: 2004-01-09 08:40 UTC by A J
Modified: 2015-03-15 13:32 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
openca-0.9.2_p1.ebuild (openca-0.9.2_p1.ebuild,4.46 KB, text/plain)
2005-01-19 05:54 UTC, François MASSON
Details
mysql-setup.sql.in (mysql-setup.sql.in,188 bytes, application/octet-stream)
2005-01-19 05:55 UTC, François MASSON
Details
openca-0.9.2_noldap.patch (openca-0.9.2_noldap.patch,819 bytes, patch)
2005-01-19 05:56 UTC, François MASSON
Details | Diff
openca-0.9.2_p1-r1.ebuild (openca-0.9.2_p1-r1.ebuild,4.47 KB, text/plain)
2005-08-17 09:55 UTC, Wulf Krueger (RETIRED)
Details
openca 0.9.3-r1 ebuild (openca-0.9.3_rc1.ebuild,4.52 KB, text/plain)
2007-04-05 03:40 UTC, Andrea Cerrito
Details
new version (2008 g.) ebuild (openca-base-1.0.2.ebuild,5.74 KB, text/plain)
2010-03-14 19:35 UTC, Andreis Vinogradovs ( slepnoga )
Details
Set file for portage 2.2 (openca-perl,453 bytes, text/plain)
2010-03-15 14:07 UTC, Andreis Vinogradovs ( slepnoga )
Details
openca-base-1.1.0.ebuild (openca-base-1.1.0.ebuild,4.19 KB, text/plain)
2010-06-09 13:14 UTC, Andreis Vinogradovs ( slepnoga )
Details
Modified ebuild to not request OpenCA perl modules externally (openca-base-1.1.0.ebuild,3.89 KB, text/plain)
2010-06-10 06:01 UTC, MCassaniti
Details
Patch to prevent non OpenCA modules from being built by this ebuild directly. (no-ext-perl-modules-1.1.0.patch,1.17 KB, patch)
2010-06-10 06:06 UTC, MCassaniti
Details | Diff
openca-base-1.1.1-r1.ebuild (openca-base-1.1.1-r1.ebuild,4.72 KB, text/plain)
2010-11-09 09:16 UTC, Andreis Vinogradovs ( slepnoga )
Details
openca-base-1.1.1-r2.ebuild (openca-base-1.1.1-r2.ebuild,5.26 KB, text/plain)
2011-03-08 21:38 UTC, Petric Frank
Details
initServer-1.1.1.patch (initServer-1.1.1.patch,1.45 KB, patch)
2011-03-08 21:41 UTC, Petric Frank
Details | Diff
openca.init (openca.init,1.16 KB, text/plain)
2011-03-08 21:43 UTC, Petric Frank
Details
configure-disable-version-check.patch (configure-disable-version-check.patch,889 bytes, patch)
2011-03-08 21:45 UTC, Petric Frank
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description A J 2004-01-09 08:40:44 UTC
There seem to be no ebuilds for the openca releases, but only perl modules for openca. The above link lists the latest releases for openca.
thanks!
Comment 1 Michael Cummings (RETIRED) gentoo-dev 2004-08-05 18:44:12 UTC
I and a few others have struggled to come up with a feasible schema for implenting openca in gentoo and have come up emptyhanded. Bug-Wranglers - if you know someone willing to tackle the improbable, please pass this to them. Openca has nill to do with perl itself, we just have some modules that support it.
Comment 2 François MASSON 2005-01-19 05:54:26 UTC
Created attachment 48941 [details]
openca-0.9.2_p1.ebuild
Comment 3 François MASSON 2005-01-19 05:55:18 UTC
Created attachment 48942 [details]
mysql-setup.sql.in
Comment 4 François MASSON 2005-01-19 05:56:04 UTC
Created attachment 48943 [details, diff]
openca-0.9.2_noldap.patch
Comment 5 François MASSON 2005-01-19 06:01:53 UTC
Here is something like a working ebuild.
It doesn't fully support all IUSE, but a least work with DBM and without
ldap support.
There is some more work to be done before this ebuild will be fully fonctionnal but I want receive report early.

PS: DEPEND on CGI::Session
You may use http://bugs.gentoo.org/show_bug.cgi?id=54025
or better use g-perl.pl

Comment 6 François MASSON 2005-01-19 09:08:24 UTC
Comment on attachment 48941 [details]
openca-0.9.2_p1.ebuild

# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit eutils flag-o-matic gcc
MY_P=${P/_p/-}
MY_P2=${P/_p/.}

DESCRIPTION="The OpenCA Project is a collaborative effort to develop a robust,
full-featured and Open Source out-of-the-box Certification Authority
implementing the most used protocols with full-strength cryptography
world-wide."
HOMEPAGE="http://www.openca.org/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~x86"
IUSE="uclibc doc dbm mysql postgres ldap vhosts"

RDEPEND="virtual/libc"
DEPEND="${RDEPEND}
	!dev-perl/OpenCA-X509
	!dev-perl/OpenCA-REQ
	!dev-perl/OpenCA-OpenSSL
	!dev-perl/OpenCA-CRL
	>=dev-libs/openssl-0.9.7
	net-www/apache
	>=dev-perl/MIME-Base64-2.20
	>=dev-perl/Digest-HMAC-1.01
	>=dev-perl/Digest-SHA1-2.02
	>=dev-perl/Digest-MD5-2.24
	>=dev-perl/libintl-perl-1.10
	>=dev-perl/IO-stringy-2.108
	>=dev-perl/MIME-Lite-3.01
	>=dev-perl/MIME-tools-5.411
	>=dev-perl/MailTools-1.58
	>=dev-perl/Parse-RecDescent-1.94
	>=dev-perl/X500-DN-0.28
	>=dev-perl/XML-Twig-3.09
	>=dev-perl/CGI-Session-3.95
	>=dev-perl/net-server-0.86
	>=dev-perl/Convert-ASN1-0.18
	dbm? ( dev-perl/DB_File )
	mysql? ( dev-perl/DBD-mysql )
	postgres? ( dev-perl/DBD-Pg )
	!mysql? ( !postgres? ( dev-perl/DB_File ) )
	ldap? ( net-nds/openldap
		>=perl-ldap-0.28
		>=dev-perl/IO-Socket-SSL-0.92
		>=dev-perl/URI-1.23
		)
	sasl? ( >=dev-perl/Authen-SASL-2.04 )
	!uclibc? ( sys-devel/bc )"

S=${WORKDIR}/${MY_P2}

src_unpack() {
	unpack ${A}
	cd ${S}
	if !(use ldap); then
		epatch ${FILESDIR}/openca-0.9.2_noldap.patch
	fi

	case $( gcc-version ) in
		3.4 | 3.3 | 3.2 )
			filter-flags -fprefetch-loop-arrays -freduce-all-givs
-funroll-loops
		;;
	esac
	econf
}

src_compile() {
	cd ${S}
	einfo "Compiling ${P}"
	myconf="--with-openca-user=openca \
		--with-openca-group=openca \
		--with-htdocs-fs-prefix=/var/www/localhost/htdocs/openca \
		--with-cgi-fs-prefix=/var/www/localhost/cgi-bin \
		--with-etc-prefix=/etc/openca \
		--with-var-prefix=/var/openca \
		--with-lib-prefix=/usr/lib/openca \
		--with-httpd-user=apache \
		--with-httpd-group=apache \
		--disable-external-modules"
	if !(use vhosts); then
		myconf="${myconf} --with-htdocs-url-prefix=/openca"
	fi
	if use ldap; then
		myconf="${myconf} --with-ldap-port=389 \
			--with-ldap-root='cn=Manager,o=OpenCA,c=IT' \
			--with-ldap-root-pwd='openca'"
	else
		myconf="${myconf} --disable-ldap"
	fi
	if !(use mysql) && !(use postgres) || (use dbm); then
		myconf="${myconf} --enable-db"
	else
		myconf="${myconf} --disable-db"
	fi
	if use mysql; then
		einfo "Setting random user/password details for the mysql
database"
		local dbpass="${RANDOM}${RANDOM}${RANDOM}${RANDOM}"
		sed -e "s/@dbpass@/${dbpass}/g" \
			${FILESDIR}/mysql-setup.sql.in > ${T}/mysql-setup.sql

		myconf="${myconf}  --enable-dbi \
			--with-db-type=mysql \
			--with-db-name=openca \
			--with-db-host=localhost \
			--with-db-port=3306 \
			--with-db-user=openca \
			--with-db-passwd='${dbpass}'"
	fi
	if use postgres; then
		einfo "Setting random user/password details for the postgres
database"
		local dbpass="${RANDOM}${RANDOM}${RANDOM}${RANDOM}"
#		sed -e "s/@dbpass@/${dbpass}/g" \
#			${FILESDIR}/postgres-setup.sql.in >
${T}/posgres-setup.sql

		myconf="${myconf}  --enable-dbi \
			--with-db-type=Pg \
			--with-db-name=openca \
			--with-db-host=localhost \
			--with-db-port=5432 \
			--with-db-user=openca \
			--with-db-passwd='${dbpass}'"
	fi

	econf ${myconf}
	emake || die
}

src_install() {
	cd ${S}
	make install-online install-ca DESTDIR=${D} || die

	dodir /var/openca/tmp
	keepdir /var/openca/tmp
	dosym /var/openca/log /var/log/openca
	keepdir /var/openca/log
	dodir /var/openca/log/xml
	dodir /var/openca/log/xml/time
	dodir /var/openca/log/xml/class
	dodir /var/openca/log/xml/level
	dodir /var/openca/log/xml/session
	keepdir /var/openca/log/xml/time
	keepdir /var/openca/log/xml/class
	keepdir /var/openca/log/xml/level
	keepdir /var/openca/log/xml/session

	dodoc CHANGES* LICENSE README
	dodoc docs/*.txt
	doman docs/man3/*.3
	if use doc; then
		dohtml -r docs/guide
		dohtml -r docs/howto
		docinto shared
		dodocs docs/shared/*.txt
	fi
	if use ldap; then
		docinto openldap
		dodocs contrib/openldap/openca.schema
	fi
	if !(use mysql) && !(use postgres) || (use dbm); then
		dodir /var/openca/db
		keepdir /var/openca/db
	fi
	if use vhosts; then
		insinto /etc/apache2/conf/vhosts
		#***more to come***
	fi
	dosym /etc/openca/openca_rc /etc/init.d/openca
}

pkg_setup() {
	enewgroup openca
	enewuser openca -1 -1 /dev/null openca
}

pkg_postinst() {
	einfo "Please check file '/etc/openca/config.xml'"
	einfo "Then run '/etc/openca/configure_etc.sh' script"
}
Comment 7 François MASSON 2005-01-19 09:13:53 UTC
Sorry for comment #6 , I intended to update the ebuild, not post a new comment :s
Comment 8 Joshua Broussard 2005-08-17 08:06:22 UTC
ebuild reports 'emerge: there are no ebuilds to satisfy
">=dev-perl/MIME-Base64-2.20"'
Comment 9 Wulf Krueger (RETIRED) gentoo-dev 2005-08-17 09:12:17 UTC
Change the dependency. It should be:

>=perl-core/MIME-Base64-2.20
Comment 10 Wulf Krueger (RETIRED) gentoo-dev 2005-08-17 09:55:25 UTC
Created attachment 66149 [details]
openca-0.9.2_p1-r1.ebuild

I've changed the dependencies and cleaned up the ebuild a *little*.

For the curious:

--- /usr/local/overlays/portage/www-apps/openca/openca-0.9.2_p1.ebuild 
2005-05-26 11:00:28.000000000 +0200
+++ /usr/local/overlays/portage/www-apps/openca/openca-0.9.2_p1-r1.ebuild      
2005-08-17 18:46:11.000000000 +0200
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $

-inherit eutils flag-o-matic gcc
+inherit eutils flag-o-matic toolchain
 MY_P=${P/_p/-}
 MY_P2=${P/_p/.}

@@ -38,12 +38,12 @@
	>=dev-perl/CGI-Session-3.95
	>=dev-perl/net-server-0.86
	>=dev-perl/Convert-ASN1-0.18
-	dbm? ( dev-perl/DB_File )
+	dbm? ( perl-core/DB_File )
	mysql? ( dev-perl/DBD-mysql )
	postgres? ( dev-perl/DBD-Pg )
-	!mysql? ( !postgres? ( dev-perl/DB_File ) )
+	!mysql? ( !postgres? ( perl-core/DB_File ) )
	ldap? ( net-nds/openldap
-		>=perl-ldap-0.28
+		>=dev-perl/perl-ldap-0.28
		>=dev-perl/IO-Socket-SSL-0.92
		>=dev-perl/URI-1.23
		)
@@ -55,7 +55,7 @@
 src_unpack() {
	unpack ${A}
	cd ${S}
-	if !(use ldap); then
+	if ! use ldap ; then
		epatch ${FILESDIR}/openca-0.9.2_noldap.patch
	fi

@@ -80,7 +80,7 @@
		--with-httpd-user=apache \
		--with-httpd-group=apache \
		--disable-external-modules"
-	if !(use vhosts); then
+	if ! use vhosts ; then
		myconf="${myconf} --with-htdocs-url-prefix=/openca"
	fi
	if use ldap; then
@@ -90,7 +90,7 @@
	else
		myconf="${myconf} --disable-ldap"
	fi
-	if !(use mysql) && !(use postgres) || (use dbm); then
+	if ! use mysql && ! use postgres || use dbm; then
		myconf="${myconf} --enable-db"
	else
		myconf="${myconf} --disable-db"
@@ -152,7 +152,7 @@
		docinto openldap
		dodocs contrib/openldap/openca.schema
	fi
-	if !(use mysql) && !(use postgres) || (use dbm); then
+	if ! use mysql && ! use postgres || use dbm ; then
		dodir /var/openca/db
		keepdir /var/openca/db
	fi
Comment 11 Andrea Cerrito 2007-04-05 03:38:55 UTC
I've corrected the ebuild to work with versione 0.9.3-r1 (it was anyway missing
a DEPEND against dev-perl/XML-Parser).
Comment 12 Andrea Cerrito 2007-04-05 03:40:38 UTC
Created attachment 115485 [details]
openca 0.9.3-r1 ebuild
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2007-09-14 15:28:34 UTC
Either find a maintainer, or if you want to maintain it yourself, feel free to reopen and join project sunrise, details here:

http://www.gentoo.org/proj/en/sunrise

Thanks. 

WONTFIX meanwhile.
Comment 14 Peter Volkov (RETIRED) gentoo-dev 2010-03-14 19:04:21 UTC
Reopening per user request (in any case, we do not close requests for new ebuilds until they are fixed or obsoleted).
Comment 15 Andreis Vinogradovs ( slepnoga ) 2010-03-14 19:35:36 UTC
Created attachment 223545 [details]
new version (2008 g.)  ebuild
Comment 16 Andreis Vinogradovs ( slepnoga ) 2010-03-14 20:01:31 UTC
upstream relized new version - 1.1.0. Ebuild in progress
Comment 17 Andreis Vinogradovs ( slepnoga ) 2010-03-15 14:07:30 UTC
Created attachment 223729 [details]
Set file for portage 2.2
Comment 18 MCassaniti 2010-06-09 02:39:31 UTC
How is the new 1.1.0 ebuild coming along slepnoga?
Comment 19 Andreis Vinogradovs ( slepnoga ) 2010-06-09 13:14:16 UTC
Created attachment 234705 [details]
openca-base-1.1.0.ebuild

Not tested :)
Comment 20 MCassaniti 2010-06-10 06:01:46 UTC
Created attachment 234817 [details]
Modified ebuild to not request OpenCA perl modules externally

I believe that the upstream modules for OpenCA are no longer available via search.cpan.org. The modules could be built by patching the Makefile at <workdir>/src/Makefile and prevent it from building the external modules, but build the bundled modules. I have written a patch for this, but I cannot determine how to get the build to install the Perl packages to the correct location (/usr/lib64/perl5/5.8.8/x86_64-linux). Naturally this would require some additonal patching or modifications to the ebuild.

Attached is the new ebuild. I will also attach the patch.
Comment 21 MCassaniti 2010-06-10 06:06:13 UTC
Created attachment 234819 [details, diff]
Patch to prevent non OpenCA modules from being built by this ebuild directly.

Patch to pervent external modules from being built. These Perl modules are pulled in as part of the build.
During a normal build of OpenCA modules for Perl that the ebuild is pulling in on its own will get built. These are what I'm referring to as external modules. During a normal build modules for Perl that relate to OpenCA only are also built. These modules will still be built.
Comment 22 Andreis Vinogradovs ( slepnoga ) 2010-11-09 09:16:57 UTC
Created attachment 253723 [details]
openca-base-1.1.1-r1.ebuild
Comment 23 Petric Frank 2011-02-22 10:36:55 UTC
Has anyone tried to test openca-base-1.1.1-r1 ebuild using the "install_online" USE flag ?

It will not work.

Here the change (missing make call):
---------------------------- cut -------------------------
--- openca-base-1.1.1-r1.ebuild.orig    2011-02-22 10:24:58.836001311 +0100
+++ openca-base-1.1.1-r1.ebuild 2011-02-22 10:18:33.730000283 +0100
@@ -150,7 +150,7 @@
        fi

        if use install-online ;then
-       DEST_DIR="${D}"  install-online ||die "install failed"
+       make DEST_DIR="${D}"  install-online ||die "install failed"
        fi

        if use install-ext;then
---------------------------- cut -------------------------

Also the digests of the source files should be updated at the RION overlay - they don't match the ones on the SF-server.

Hope that helps.
Comment 24 Andreis Vinogradovs ( slepnoga ) 2011-02-22 12:01:17 UTC
tnx.
http://code.google.com/p/rion-overlay/issues/detail?id=131
Comment 25 Petric Frank 2011-03-08 21:38:58 UTC
Created attachment 265227 [details]
openca-base-1.1.1-r2.ebuild

This is an update to the latest patches available on the OpenCA wiki.

Following are supplementary files:
- patch to initServer (from wiki)
- first version on an init script to be placed in /etc/init.d
- patch to disable query to openca.org server for the latest release
  otherwise the configure will hang forever if there is no direct internet access
- changed some install locations (esp. htdocs & cgi-bin).

I have installed this version on a gentoo stable system. The only additions i used are
- RION overlay
- own overlay with updated ebuilds as i placed in bugs
  * 309489 (OpenCA-AC)
  * 309493 (OpenCA-CRL)
  * 309499 (OpenCA-Crypto)
  * 309507 (OpenCA-DBI)
  * 309513 (OpenCA-OpenSSL)
  * 309521 (OpenCA-REQ)
  * 309533 (OpenCA-X509)
  * 356007 (OpenCA-User)

Enabled were USE-flags mysql, install-offline, install-online.

Remark: Someone with knowledge in making an ebuild to support webapp (i.e. usage of webapp eclass) should have an eye on this. Currently the web-part is directly placed into /var/www/localhost/{cgi-bin|htdocs}
Comment 26 Petric Frank 2011-03-08 21:41:46 UTC
Created attachment 265229 [details, diff]
initServer-1.1.1.patch

Patch to initServer derived from openca wiki
Comment 27 Petric Frank 2011-03-08 21:43:05 UTC
Created attachment 265231 [details]
openca.init

Init script to start the openca server.
Comment 28 Petric Frank 2011-03-08 21:45:24 UTC
Created attachment 265233 [details, diff]
configure-disable-version-check.patch

Patch to disable the version check during configure run. Otherwise configure will hang forever if there is no internet connection available.
Comment 29 Andreas K. Hüttel archtester gentoo-dev 2014-10-15 21:10:03 UTC
Is anyone still interested in this? If yes, please say so here and now!
Comment 30 Alois Schmid 2014-10-16 07:51:45 UTC
Still using OpenCA, although having it compiled manually for quite a long time, as version 1.5.1 never made it into the portage tree.
Actually having some problems with the change to perl 5.18.x