bookmark_borderHowto: Packaging 3rd party pear channel software with %php_pear_gen_filelist macro

The %php_pear_gen_filelist macro, maintained by Christian Wittmer, is really handy for packaging php pear software packages. It generates rpmlint-happy filelists and if you manage to get the dependencies right, packaging pear stuff for rpm is really a no-brainer. But the standard recipe for using this macro has one drawback: It’s ignorant of installed 3rd party roles and channels. 3rd party pear packages which depend on their channel being registered normally fail.

The workaround is easy: Copy the channel file to the build location.

Example:

#
# spec file for package php5-pear-Horde_Auth (Version 1.0.3)
#
# Copyright (c) 2011 Ralf Lang.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An “Open Source License” is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative
# Please submit bugfixes or comments via http://bugs.opensuse.org/

# norootforbuild

Name: php5-pear-Horde_Auth
%define pear_name Horde_Auth
%define pear_sname horde_auth
Summary: PEAR: Horde Authentication API
Version: 1.0.3
Release: 1
License: LGPL
Group: Development/Libraries/PHP
Source0: http://pear.horde.org/get/Horde_Auth-%.tgz
BuildRoot: %/%-%-root-%(% -n)
URL: http://pear.horde.org/package/Horde_Auth
BuildRequires: php5-pear >= 1.4.7
Requires: php5-pear-Horde_Exception < 2.0.0, php5-pear-Horde_Util < 2.0.0, php5-pear >= 1.7.0
Conflicts: php5-pear-Horde_Exception = 2.0.0, php5-pear-Horde_Util = 2.0.0
BuildRequires: php5-pear-channel-horde
Requires: php5-pear-channel-horde
BuildArch: noarch
BuildRequires: php-macros

# Fix for renaming (package convention)
Provides: php5-pear-% = %
Provides: php-pear-% = %
Provides: pear-% = %
Obsoletes: php5-pear-% < %
Obsoletes: php-pear-% < %
Obsoletes: pear-% < %

%description
The Horde_Auth package provides a common interface into the various
backends for the Horde authentication system.

%prep
%setup -c

%build
%install
% package*.xml %-%
cd %-%
PHP_PEAR_PHP_BIN=”$(which php) -d memory_limit=50m”
% %%/.channels/
% %/.channels/pear.horde.org.reg \
%%/.channels/

% -v \
-d doc_dir=/doc \
-d bin_dir=% \
-d data_dir=%/data \
-d test_dir=%/tests \
install –offline –nodeps -R “%” package.xml

% -D -m 0644 package.xml %%/%.xml

% -rf %/{doc,tmp}
% -rf %%/.{filemap,lock,registry,channels,depdb,depdblock}

cd ..

%php_pear_gen_filelist

%clean
rm -rf %

%post
if [ “$1” = “1” ]; then
% install –nodeps –soft –force –register-only %/%.xml
fi
if [ “$1” = “2” ]; then
% upgrade –offline –register-only %/%.xml
fi

%postun
if [ “$1” = “0” ]; then
% uninstall –nodeps –ignore-errors –register-only pear.horde.org/%
fi

%files -f %.files
%defattr(-,root,root)

Two parts are marked black: First you have to include the channel package with “BuildRequires:”. Second marked part copies the channel file from the installed location to the buildroot location.
Feel free to reuse or criticise this solution.

Jean claude van damme bodybuilding workout dianabol of dbol training met de beste bodybuilding-supplementen – fitness fectory.

bookmark_borderHorde 4 release date announced — Horde 3 made it into openSUSE Factory

Michael Rubinsky of the Horde Core team yesterday officially announced a release date for Horde 4

“Horde 4 and groupware apps will be released on April 5th, 2011.”

Horde 4 is a complete re-design of the Horde Framework and will be accompanied by new major releases of the Horde-based groupware Apps like Imp 5 (Webmail), Kronolith (Calendar) and Turba (Address book).

The community has been waiting quite some time but the horde developers emphasized quality over speed. Horde is currently discussing a fixed release scheme of a new minor or major release every six months, with bugfixes and security fixes whenever they feel appropriate.

Horde 4 will be completely pear-based. Gunnar Wrobel stated that Horde 4 will consist of something around 80 pear packages and that Horde apps will be released as pear packages, too.

Beginning with the first release candidates, I will provide rpm packages for openSUSE build service. By the way, the Horde RPMs for openSUSE have been included into openSUSE Factory last weekend and might get shipped with openSUSE 11.4

bookmark_borderEleusis Password App for Horde3 now in OpenSUSE

The Eleusis Password App by Andre Pawlowski allows keeping passwords and login credentials in a secure way. Encrypted storage and enforced HTTPS transfer provide a secure environment for you to store all those passwords you cannot remember but would never dare to write down. Other than your laptop’s password safe, Eleusis is always there for you anywhere you can get a secure web access, be it your phone, PDA or guest login on a public terminal.

Eleusis password decrypting screen

Eleusis is based on the Horde 3 Framework and can easily be integrated into your existing Horde Webmail or Horde Groupware. To make installation even more convenient, I packaged Eleusis for SLES and OpenSUSE in the Build Service repository server:php:applications. Click here for download

bookmark_borderHorde Updates: Base module 3.3.10 RPMs for SLES and OpenSUSE

New Horde Version available as OpenSUSE package

Horde just released version 3.3.10 of their base application along with some minor updates to imp and dimp. After 3.3.9 had some regressions that caused trouble editing preferences, I decided to upgrade the horde RPMs forĀ OpenSUSE and SLES 11 to the new release. This also removed the dependency on PHP versions lower than 5.3 as the package is now working with the default openSUSE 11.3 php package.

SplittingĀ  into vanilla horde and Kolab patched version

Releases of the horde rpm and some application packages contained some dated patches for working together with the Kolab groupware server. I asked upstream Kolab author Gunnar Wrobel and he suggest a clean split between a standard and a kolab version of the horde package. Beginning with the next updates of the package I will implement this split offering two conflicting versions.

Turba LDAP driver patch

The LDAP backend driver for the Turba Contact Manager makes some optimistic assumptions on the privileges (ACLs) 0f the binding LDAP user. By default, it assumes it can add new contacts (which is not true for typical company addressbooks) and if you have ACLs to only some attributes of an entry, for example your own work phone but not your name or job title, Turba tries to write the whole entry.
I submitted a patch for the Turba LDAP driver which makes Turba only try to write attributes which have actually changed.