Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing gnupg with pecl fails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
KintaroBC
n00b
n00b


Joined: 15 Feb 2014
Posts: 63
Location: Australia

PostPosted: Thu Sep 04, 2014 4:13 am    Post subject: Installing gnupg with pecl fails Reply with quote

PHP 5.3 has reached EOL and there are a few modules I use, which are not in portage. I have installed dev-php/PEAR-PEAR and I am trying to get the packages with pecl. However pecl does not seem to be working, and it seems to think the package archives are not valid.

Code:

# pecl install gnupg
downloading gnupg-1.3.3.tgz ...
Starting to download gnupg-1.3.3.tgz (19,141 bytes)
......done: 19,141 bytes
could not extract the package.xml file from "/var/tmp/pear/gnupg-1.3.3.tgz"
Download of "pecl/gnupg" succeeded, but it is not a valid package archive
Error: cannot download "pecl/gnupg"
Download failed
install failed


It does have a package.xml...
Code:

# tar -zxvf /var/tmp/pear/gnupg-1.3.3.tgz
package.xml
gnupg-1.3.3/tests/gnupg_oo_0001_import.phpt
gnupg-1.3.3/tests/gnupg_oo_encrypt.phpt
gnupg-1.3.3/tests/gnupg_oo_encryptsign.phpt
gnupg-1.3.3/tests/gnupg_oo_export.phpt
gnupg-1.3.3/tests/gnupg_oo_keyinfo.phpt
gnupg-1.3.3/tests/gnupg_oo_listsignatures.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_clear.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_detach.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_detach_nonarmor.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_normal.phpt
gnupg-1.3.3/tests/gnupg_oo_sign_normal_noarmor.phpt
gnupg-1.3.3/tests/gnupg_oo_zzz_deletekey.phpt
gnupg-1.3.3/tests/gnupg_res_0001_import.phpt
gnupg-1.3.3/tests/gnupg_res_encrypt.phpt
gnupg-1.3.3/tests/gnupg_res_encryptsign.phpt
gnupg-1.3.3/tests/gnupg_res_export.phpt
gnupg-1.3.3/tests/gnupg_res_keyinfo.phpt
gnupg-1.3.3/tests/gnupg_res_listsignatures.phpt
gnupg-1.3.3/tests/gnupg_res_sign_clear.phpt
gnupg-1.3.3/tests/gnupg_res_sign_detach.phpt
gnupg-1.3.3/tests/gnupg_res_sign_detach_nonarmor.phpt
gnupg-1.3.3/tests/gnupg_res_sign_normal.phpt
gnupg-1.3.3/tests/gnupg_res_sign_normal_noarmor.phpt
gnupg-1.3.3/tests/gnupg_res_zzz_deletekey.phpt
gnupg-1.3.3/tests/vars.inc
gnupg-1.3.3/config.m4
gnupg-1.3.3/EXPERIMENTAL
gnupg-1.3.3/gnupg.c
gnupg-1.3.3/gnupg_keylistiterator.c
gnupg-1.3.3/LICENSE
gnupg-1.3.3/php_gnupg.h
gnupg-1.3.3/php_gnupg_keylistiterator.h
gnupg-1.3.3/README


I really need this to work so I can migrate to PHP 5.5 before it is too late. A google search for this problem was very discouraging. This package has been in pecl since 2013, so the problem must be something else.
Back to top
View user's profile Send private message
KintaroBC
n00b
n00b


Joined: 15 Feb 2014
Posts: 63
Location: Australia

PostPosted: Thu Sep 04, 2014 5:50 am    Post subject: Reply with quote

I worked out how to build it manually...

Extract the pecl module and run this in the directory...

Code:

phpize
aclocal
libtoolize --force
autoheader
autoconf
./configure
make
sudo make install
Back to top
View user's profile Send private message
jebriggsy
n00b
n00b


Joined: 22 Aug 2013
Posts: 26
Location: USA

PostPosted: Tue Sep 16, 2014 4:55 pm    Post subject: Reply with quote

I ran into the same problem and made an ebuild for my local overlay instead of installing manually. First create a local overlay, I use this guide.

Create a file called pecl-gnupg-1.3.3.ebuild:
Code:

# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-php/pecl-gnupg/pecl-gnupg-1.3.2-r1.ebuild,v 1.3 2013/03/05 11:14:33 olemarkus Exp $

EAPI="5"

PHP_EXT_NAME="gnupg"
PHP_EXT_INI="yes"
PHP_EXT_ZENDEXT="no"

# Added to compile against > php5-3
USE_PHP="php5-3 php5-4 php5-5"

inherit php-ext-pecl-r2

KEYWORDS="~amd64 ~x86"
DESCRIPTION="PHP wrapper around the gpgme library"
LICENSE="BSD-2"
SLOT="0"
IUSE=""

DEPEND="app-crypt/gpgme"
RDEPEND="${DEPEND}"

src_prepare() {
        for slot in $(php_get_slots); do
                php_init_slot_env ${slot}
                epatch "${FILESDIR}/${PV}"/01-large_file_system.patch
        done

        php-ext-source-r2_src_prepare
}



Copy that to your local overlay cat/package directory. Should look something like /usr/local/portage/dev-php/pecl-gnupg/pecl-gnupg-1.3.3.ebuild. Then copy metadata.xml and the files folder from /usr/portage/dev-php/pecl-gnupg to your local overlay cat/package directory.

Should look something like this:
Code:

# ls -l /usr/local/portage/dev-php/pecl-gnupg
-rw-r--r-- 1 portage portage  156 Sep 16 18:09 metadata.xml
-rw-r--r-- 1 portage portage  723 Sep 16 18:18 pecl-gnupg-1.3.3.ebuild
drwxr-xr-x 3 portage portage 4096 Sep 16 18:28 files


Then rename the folder in "files" (1.3.2) to 1.3.3.
Code:

# mv /usr/local/portage/dev-php/pecl-gnupg/files/1.3.2 /usr/local/portage/dev-php/pecl/gnupg/file/
# ls -l /usr/local/portage/dev-php/pecl-gnupg/files
drwxr-xr-x 2 portage portage 4096 Sep 16 18:10 1.3.3


Then the normal steps to finalize the ebuild:
Code:

pushd /usr/local/portage/dev-php/pecl-gnupg
repoman manifest
popd
chown -R portage:portage /usr/local/portage


Now you should be able to emerge dev-php/pecl-gnupg with PHP_TARGETS 5.5, 5.4, and 5.3
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum