[Kolab-devel] PEAR packaging problems
Gunnar Wrobel
wrobel at pardus.de
Fri Dec 5 09:22:24 CET 2008
Hi Richard,
Quoting Richard Bos <ml at radoeka.nl>:
> Op Thursday 04 December 2008 08:48:14 schreef Richard Bos:
>> > We experienced some problems with PEAR packaging during preparations for
>> > the next Kolab server release. Maybe some packagers from other distros
>> > have additional insight or can make use of the information.
>>
>> I encounter the same thing.
>> My specfiles contain:
>> # %setup -q -n %{prj}-%{version}
>> # %__cp %{SOURCE0} %{prj}-%{version}.tgz
>>
>> The last line (%__cp) should not be needed as the package is
>> there already, but in an unpackage format. The cp is there
>> because the pear install command expects a package, just
>> as you stated.
>
> Thanks to an example provided by Mathieu P, I was able to improve the rpm
> build (for openSUSE), I added a update to issue 3260
> https://www.intevation.de/roundup/kolab/issue3260 :
>
> I made first the following change:
>
> horde-cli> osc diff horde-cli.spec
> Index: horde-cli.spec
> ===================================================================
> --- horde-cli.spec (revision 1)
> +++ horde-cli.spec (working copy)
> @@ -27,17 +27,17 @@
>
> %prep
> %setup -q -n %{prj}-%{version}
> -%__cp %{SOURCE0} %{prj}-%{version}.tgz
>
> %build
> +%__mv ../package.xml .
>
> %install
> -pear
> install --packagingroot %{buildroot} --nodeps --offline %{prj}-%{version}.tgz
> +pear install --packagingroot %{buildroot} --nodeps package.xml
>
> %__rm -rf %{buildroot}/%{peardir}/.
> {filemap,lock,registry,channels,depdb,depdblock}
>
> %__mkdir_p %{buildroot}%{xmldir}
> -%__cp %{_builddir}/package.xml %{buildroot}%{xmldir}/%{prj}.xml
> +%__cp package.xml %{buildroot}%{xmldir}/%{prj}.xml
>
> %clean
> %__rm -rf %{buildroot}
> @@ -57,6 +57,10 @@
>
>
> %changelog
> +* Thu Dec 04 2008
> +- Changed the build method to use the unpacked tarbal. This will allow the
> + rpm to apply patches against the pristine sources, with the former method
> + this was not possible.
> * Fri Nov 28 2008
> - initial version
>
> This copies the package.xml into the unpacked sources directory, which makes
> it possible to build from the unpacked sources.
>
> Next I tried to build an rpm for a patched pear module. This works quite
> well now :) But it is with some trickery:
>
>
> horde-cli> osc diff
> Index: horde-cli.spec
> ===================================================================
> --- horde-cli.spec (revision 2)
> +++ horde-cli.spec (working copy)
> @@ -13,6 +13,7 @@
> Group: Productivity/Networking/Web/Servers
> Url: http://pear.horde.org/index.php?package=%{prj}
> Source0: %{prj}-%{version}.tgz
> +Patch0: horde.patch
> BuildArch: noarch
> BuildRoot: %{_tmppath}/%{name}-%{version}-build
> PreReq: %{_bindir}/pear
> @@ -27,6 +28,8 @@
>
> %prep
> %setup -q -n %{prj}-%{version}
> +cd ..
> +%patch0 -p0
>
> %build
> %__mv ../package.xml .
>
> The horde.patch file contains 2 patches (in this case); 1 patched pear module
> and a patched package.xml file (providing a updated md5sum for the file).
>
> The patch is obtained using the following commands:
> # (diff -u package.xml package.xml.new; diff -Naur Horde_CLI-0.0.2
> Horde_CLI-0.0.2.new) > horde.patch
>
> The trickery is the line with 'cd ..' as the setup tag moves into the
> unpacked sources directory the only way to patch the package.xml file, is
> to return to the parent directory. This all seems to work well :)
>
> Hopefully this build method can be used by others too.
Thanks for your insight. Also thanks to Mathieu for his comments. I
closed kolab/issue3260 again as it is in fact resolved and opened
kolab/issue3294 (https://www.intevation.de/roundup/kolab/issue3294).
Send upstream a bug report: http://pear.php.net/bugs/bug.php?id=15242
Cheers,
Gunnar
>
> --
> Richard Bos
> We are borrowing the world of our children,
> It is not inherited from our parents.
>
> _______________________________________________
> Kolab-devel mailing list
> Kolab-devel at kolab.org
> https://kolab.org/mailman/listinfo/kolab-devel
>
--
______ http://kdab.com _______________ http://kolab-konsortium.com _
p at rdus Kolab work is funded in part by KDAB and the Kolab Konsortium
____ http://www.pardus.de _________________ http://gunnarwrobel.de _
E-mail : p at rdus.de Dr. Gunnar Wrobel
Tel. : +49 700 6245 0000 Bundesstrasse 29
Fax : +49 721 1513 52322 D-20146 Hamburg
--------------------------------------------------------------------
>> Mail at ease - Rent a kolab groupware server at p at rdus <<
--------------------------------------------------------------------
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digitale PGP-Unterschrift
URL: <http://lists.kolab.org/pipermail/devel/attachments/20081205/0d412774/attachment.sig>
More information about the devel
mailing list