Kannel daily svn snapshot rpm

петък, октомври 28th, 2011

Currently the current kannel version in epel is 1.4.3 /which according to kannel.org is the latest stable release/. However if you want to use sqlbox and smppbox, the only option is to use svn. So I decided to build my custom kannel rpm by using the source tarball from the daily svn snapshot. My kannel.spec is based on the file from the epel rpm for 1.4.3 version. The changes are minimal:

--- kannel.epel.spec    2011-10-28 16:29:01.000000000 +0300
+++ kannel.spec 2011-10-28 16:31:48.000000000 +0300
@@ -1,18 +1,18 @@
 Summary: WAP and SMS gateway
 Name: kannel
-Version: 1.4.3
-Release: 5%{?dist}
+Version: 1.5.0
+Release: 20111028%{?dist}
 License: BSD
 Group: System Environment/Daemons
 URL: http://www.kannel.org/
-Source0: http://www.kannel.org/download/%{version}/gateway-%{version}.tar.bz2
+Source0: http://www.kannel.org/download/kannel-snapshot.tar.gz
 Source1: kannel.logrotate
 Source2: kannel.init
 Source3: kannel.conf
 Source4: gw-config
 # TODO: a corresponding configure.in patch could be upstreamable?
-Patch0: gateway-1.4.3-ssldetect.patch
-Patch1: gateway-1.4.1-typesh.patch
+#Patch0: gateway-1.4.3-ssldetect.patch
+#Patch1: gateway-1.4.1-typesh.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires: bison, byacc, flex, ghostscript
 BuildRequires: libxml2-devel, openssl-devel, zlib-devel, pcre-devel
@@ -69,9 +69,9 @@
 
 %prep
-%setup -q -n gateway-%{version}
-%patch0 -p1 -b .ssldetect
-%patch1 -p1 -b .typesh
+%setup -q -n kannel-snapshot
+#%patch0 -p1 -b .ssldetect
+#%patch1 -p1 -b .typesh
 %{__chmod} -c -x gwlib/html-entities.def # for -debuginfo, as of 1.4.3
 
@@ -147,6 +147,7 @@
 %{_bindir}/seewbmp
 %{_bindir}/wmlsc
 %{_bindir}/wmlsdasm
+%{_bindir}/decode_emimsg
 %{_sbindir}/*
 %{_mandir}/man?/*
 %attr(0750,kannel,kannel) %dir %{_var}/log/kannel/
@@ -164,6 +165,9 @@

I assumed that the two patches applied to version 1.4.3 are not necessary, because they probably are part of the svn code.

There was a build error on the first run:

RPM build errors:
Installed (but unpackaged) file(s) found: /usr/bin/decode_emimsg

so I had to add „%{_bindir}/decode_emimsg“ in the %files section.
The spec file expect the availability of the following files in the SOURCE directory: kannel.logrotate, kannel.init, kannel.conf, gw-config

The kannel.spec file can be found here.
The command used to build the rpm is:

rpmbuild -ba kannel.spec

Another way to do the trick:
http://www.blogalex.com/archives/23

Нови BG огледала на Fedora и CentOS

понеделник, септември 13th, 2010

Благодарение на Йордан Георгиев и Телепойнт Fedora се сдоби с ново огледало.  Нещо, от което имаше нужда след като fedora.lcpe.uni-sofia.bg и mirrors.evrocom.net доста отдавна вече не са на линия и една от най-популярните дистрибуции  – Fedora се оказа само с едно огледало в България (fedora.linuxman.biz). В този ред на мисли с радост посрещнах новината за mirror.telepoint.bg. Бяха се сетили да включат и EPEL, а освен това след направено допитване и отправено запитване от мен решиха да включат и RPMFusion. Така че почти няма пакет, който да не може да се инсталира със скоростта, която предлага Peering-a.

Огледалото включва и CentOS, което също е голяма благина за мен, тъй като е дистрибуцията, която основно ползвам за сървърни инсталации. Макар и с две официални огледала на CentOS, актуално е само едно, така че присъствието му на сървъра на telepoint е плюс.

Ето и пълен списък на това, което включва mirror.telepoint.bg на този етап:

Най-лесният начин да се използва огледалото под Fedora и CentOS е да се инсталира съответно yum-plugin-fastestmirror и yum-fastestmirror.

Другата възможност е изрично да се зададе за mirror да се ползва mirror.telepoint.bg в repo файловете, което във fedora.repo изглежда по следния начин:

cat /etc/yum.repos.d/fedora.repo
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
baseurl=http://mirror.telepoint.bg/fedora/fedora/linux/releases/$releasever/Everything/$basearch/os/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
metadata_expire=7d
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
Stop ACTA