2 2

[alpine-aports] [PATCH] main/rrdtool: [V2] upgrade to 1.5.5, fix makedepends, split to subpackages, remove patches

Valery Kartel
Details
Message ID
<1453802141-25460-1-git-send-email-valery.kartel@gmail.com>
Sender timestamp
1453802141
DKIM signature
missing
Download raw message
Patch: +72 -60
- remove all unneeded patches
- add libxml2-dev to makedepends
- rrdtool library moved to librrd subpackage
- rrdtool_th threaded library moved to librrd-th subpackage
- rrdcgi web-page template parser moved to -cgi subpackage
- rrdcached daemon moved to -cached subpackage with init script and needed folders created
- standalone utilities (rrdcreate,rrdupdate,rrdinfo) are moved to -utils subpackage
---
 main/rrdtool/APKBUILD                 | 79 ++++++++++++++++++++++++-----------
 main/rrdtool/libm-underlinking.patch  | 11 -----
 main/rrdtool/lua-install-cmod.patch   | 13 ------
 main/rrdtool/no-posix-fallocate.patch | 12 ------
 main/rrdtool/rrdcached.initd          | 17 ++++++++
 5 files changed, 72 insertions(+), 60 deletions(-)
 delete mode 100644 main/rrdtool/libm-underlinking.patch
 delete mode 100644 main/rrdtool/lua-install-cmod.patch
 delete mode 100644 main/rrdtool/no-posix-fallocate.patch
 create mode 100644 main/rrdtool/rrdcached.initd

diff --git a/main/rrdtool/APKBUILD b/main/rrdtool/APKBUILD
index 7fa5287..c1d468c 100644
--- a/main/rrdtool/APKBUILD
+++ b/main/rrdtool/APKBUILD
@@ -1,24 +1,23 @@
+# Contributor: Valery Kartel <valery.kartel@gmail.com>
 # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
 pkgname=rrdtool
-pkgver=1.5.4
+pkgver=1.5.5
 pkgrel=0
 pkgdesc="Data logging and graphing application"
 url="http://www.rrdtool.org"
 arch="all"
 license="GPL"
-depends="font-sony-misc"
-makedepends="libart-lgpl-dev libpng-dev freetype-dev perl-dev cairo-dev
-	pango-dev lua lua-dev python-dev groff
-	autoconf automake libtool"
-subpackages="$pkgname-dev $pkgname-doc perl-rrd:perl_rrd lua-rrd:lua_rrd py-rrd:py_rrd"
+depends=
+depends_dev=
+makedepends="$depends_dev groff autoconf automake libtool libart-lgpl-dev libpng-dev freetype-dev
+	perl-dev cairo-dev libxml2-dev pango-dev lua-dev python-dev"
+subpackages="$pkgname-doc $pkgname-dev $pkgname-cached $pkgname-cgi $pkgname-utils
+	 perl-rrd:perl_rrd lua-rrd:lua_rrd py-rrd:py_rrd librrd-th:libth librrd:libs"
 source="http://oss.oetiker.ch/$pkgname/pub/$pkgname-$pkgver.tar.gz
-	lua-install-cmod.patch
-	libm-underlinking.patch
-	no-posix-fallocate.patch
+	rrdcached.initd
 	"
 
 _builddir="$srcdir"/$pkgname-$pkgver
-
 prepare() {
 	cd "$_builddir"
 	for i in $source; do
@@ -42,6 +41,7 @@ build() {
 		--enable-perl-site-install \
 		--enable-lua-site-install \
 		--with-perl-options="INSTALLDIRS=vendor" \
+		--with-pic \
 		|| return 1
 	make || return 1 
 }
@@ -52,12 +52,37 @@ package() {
 	make DESTDIR="$pkgdir" install || return 1
 	find "$pkgdir" -name '.packlist' -delete
 	find "$pkgdir" -name 'perllocal.pod' -delete
+	rm "$pkgdir"/usr/lib/*.la
 }
 
 dev() {
 	default_dev
-	mkdir -p "$subpkgdir"/usr/share/$pkgname
-	mv "$pkgdir"/usr/share/$pkgname/examples "$subpkgdir"/usr/share/$pkgname/
+	mkdir -p "$subpkgdir"/usr/share
+	mv "$pkgdir"/usr/share/$pkgname "$subpkgdir"/usr/share
+}
+
+cached() {
+	pkgdesc="RRDtool data caching daemon"
+	mkdir -p "$subpkgdir"/usr/sbin \
+		"$subpkgdir"/var/lib/rrdcached/db \
+		"$subpkgdir"/var/lib/rrdcached/journal
+	mv "$pkgdir"/usr/bin/rrdcached "$subpkgdir"/usr/sbin
+	install -Dm755 "$srcdir"/rrdcached.initd "$subpkgdir"/etc/init.d/rrdcached
+}
+
+cgi() {
+	pkgdesc="create web pages containing RRD graphs based on templates"
+	mkdir -p "$subpkgdir"/usr/bin
+	mv "$pkgdir"/usr/bin/rrdcgi "$subpkgdir"/usr/bin
+}
+
+utils() {
+	pkgdesc="RRDtool standalone create,update,info utilities"
+	mkdir -p "$subpkgdir"/usr/bin
+	mv "$pkgdir"/usr/bin/rrdinfo \
+		"$pkgdir"/usr/bin/rrdcreate \
+		"$pkgdir"/usr/bin/rrdupdate \
+		"$subpkgdir"/usr/bin
 }
 
 perl_rrd() {
@@ -80,15 +105,21 @@ py_rrd() {
 	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
 }
 
-md5sums="4daea1e628e1c70d91800d6a06427dc1  rrdtool-1.5.4.tar.gz
-f94e916381af48dcf5687aa046b35aac  lua-install-cmod.patch
-ab92a2b87f71d59e3830dac3b227c357  libm-underlinking.patch
-e14d13f10fa575733e791bcb8b0711fe  no-posix-fallocate.patch"
-sha256sums="3feea3da87c02128a27083f1c7b2cb797ef673e946564c0ce008c1c25a5c3f99  rrdtool-1.5.4.tar.gz
-1e49eeca4561d29da3975f84e06b27f0f305e566bb26922397d938eede678b71  lua-install-cmod.patch
-0495bd122941bcd635ca2a2b7c3f01a6eb3ca3e00b7e40c257862b7071b7738a  libm-underlinking.patch
-8b32dcf1b8c7f9967934e25ab05ef6a9384cb6096d32dd5d63046bafd7cac1ad  no-posix-fallocate.patch"
-sha512sums="1b28db23d138677210e396c2eea48f88839847d0e08a7048b6ffa83384de612c1e71cfd10da0ef59ebc87a2707a72b226153f0d73c78c74f68bb9f721b7ad665  rrdtool-1.5.4.tar.gz
-0be4ebb864233cf32fa70c872f5421b2da50ad39d6a265c2f5869337b40647c0b88011ccf41fe17a8d35de915ca1c38d04d67696118e1e32ff774221b1816ab6  lua-install-cmod.patch
-94449972ccc7d1a057c2b827c041a16de1667c280a47ef30c1323ec9168812a96374704cc42dd832a30b8cc08d7fad94da44ff3695c66f3a0d324a87158fc23c  libm-underlinking.patch
-00d079161551a75f8d4fe5085741d45d9c6b06be0a5163090143c6ab47710e29633414bee4dd68bbf950bf0ba1796bf4623b4f307477265a48f49514c8b790ab  no-posix-fallocate.patch"
+libth() {
+	pkgdesc="$pkgdesc (multi-threaded libraries)"
+	mkdir -p "$subpkgdir"/usr/lib
+	mv "$pkgdir"/usr/lib/librrd_th.so* "$subpkgdir"/usr/lib
+}
+
+libs() {
+	default_libs
+	depends="font-sony-misc"
+	rmdir "$pkgdir"/usr/lib
+}
+
+md5sums="d8b3dcb3d193c2d6ad0a282bde69ee11  rrdtool-1.5.5.tar.gz
+d1a4b08c484b9dfd120c9691f8204919  rrdcached.initd"
+sha256sums="3a286d449c05d657e3fc3adcaa5cb4f0cfac8f465324b14f364a45d4ff8ca6f6  rrdtool-1.5.5.tar.gz
+b05b61a7d2ef4db480b276c1351b50eea5d73c9d0c0223d32ab548d6476926f7  rrdcached.initd"
+sha512sums="07fb0edb5fbc0b491f8a40844d4a914f26c6269b2d07ab91f4d54fdcfeb7899348362044ac632223341f30fc10e6748a59863977496801530f5cdd2d61f0e88c  rrdtool-1.5.5.tar.gz
+c0c27b2c2dfa8e7ec1cb1160d2bda8d7996bbea67f4ce7779da029f583c35e5e415cf46e2a1e5cb8ed2e63d2c58a68fd7471ee6bd820db4c0f4eeeb5c252f8a3  rrdcached.initd"
diff --git a/main/rrdtool/libm-underlinking.patch b/main/rrdtool/libm-underlinking.patch
deleted file mode 100644
index 8fa33da..0000000
--- a/main/rrdtool/libm-underlinking.patch
@@ -1,11 +0,0 @@
---- ./src/Makefile.am.orig	2013-07-24 09:38:33.088184877 +0000
-+++ ./src/Makefile.am	2013-07-24 09:38:48.788333567 +0000
-@@ -111,7 +111,7 @@
- 
- rrdtool_SOURCES = rrd_tool.c
- rrdtool_DEPENDENCIES = librrd.la
--rrdtool_LDADD	= librrd.la
-+rrdtool_LDADD	= librrd.la -lm
- 
- rrdcached_SOURCES = rrd_daemon.c
- rrdcached_DEPENDENCIES = librrd_th.la
diff --git a/main/rrdtool/lua-install-cmod.patch b/main/rrdtool/lua-install-cmod.patch
deleted file mode 100644
index 672aea7..0000000
--- a/main/rrdtool/lua-install-cmod.patch
@@ -1,13 +0,0 @@
---- ./configure.orig
-+++ ./configure
-@@ -29330,7 +29330,9 @@
- $as_echo "$as_me: WARNING: Setting Lua include and lib flags to defaults in compat-5.1 and lua 5.1 sources" >&2;}
-           LUA_CFLAGS="-I/usr/local/include -I/usr/local/include/lua -I/usr/local/include/lua/$lua_vdot"
-           LUA_LFLAGS="-L/usr/local/lib -L/usr/local/lib/lua -L/usr/local/lib/lua/$lua_vdot $lua_libs"
--          LUA_INSTALL_CMOD="/usr/local/lib/lua/$lua_vdot"
-+	  if test -z "$LUA_INSTALL_CMOD"; then
-+            LUA_INSTALL_CMOD="/usr/local/lib/lua/$lua_vdot"
-+	  fi
-         fi
- 
-                                 # Check whether --enable-lua-site-install was given.
diff --git a/main/rrdtool/no-posix-fallocate.patch b/main/rrdtool/no-posix-fallocate.patch
deleted file mode 100644
index c34c5a1..0000000
--- a/main/rrdtool/no-posix-fallocate.patch
@@ -1,12 +0,0 @@
---- rrdtool-1.4.8.orig/configure.ac
-+++ rrdtool-1.4.8/configure.ac
-@@ -280,9 +280,6 @@
- #include <fcntl.h>])
- AC_CHECK_FUNCS(posix_fadvise)
- 
--dnl can we use posix_fallocate
--AC_CHECK_FUNCS(posix_fallocate)
--
- CONFIGURE_PART(Libintl Processing)
- 
- AM_GNU_GETTEXT_VERSION(0.17)
diff --git a/main/rrdtool/rrdcached.initd b/main/rrdtool/rrdcached.initd
new file mode 100644
index 0000000..6459d1f
--- /dev/null
+++ b/main/rrdtool/rrdcached.initd
@@ -0,0 +1,17 @@
+#!/sbin/openrc-run
+
+description="RRDtool data caching daemon"
+pidfile=${pidfile:-/run/rrdcached/rrdcached.pid}
+socket=${socket:-unix:/run/rrdcached/rrdcached.sock}
+command="/usr/sbin/rrdcached"
+command_args="-l $socket -j /var/lib/rrdcached/journal/ -F -b /var/lib/rrdcached/db/ -B -p $pidfile"
+start_stop_daemon_args="--quiet"
+
+depend() {
+    need localmount net
+    use logger
+}
+
+start_pre() {
+	checkpath --directory ${pidfile%/*}
+}
-- 
2.7.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Natanael Copa
Details
Message ID
<20160202153907.76279b47@ncopa-desktop.alpinelinux.org>
In-Reply-To
<1453802141-25460-1-git-send-email-valery.kartel@gmail.com> (view parent)
Sender timestamp
1454423947
DKIM signature
missing
Download raw message
On Tue, 26 Jan 2016 11:55:41 +0200
Valery Kartel <valery.kartel@gmail.com> wrote:

> - remove all unneeded patches
> - add libxml2-dev to makedepends
> - rrdtool library moved to librrd subpackage
> - rrdtool_th threaded library moved to librrd-th subpackage
> - rrdcgi web-page template parser moved to -cgi subpackage
> - rrdcached daemon moved to -cached subpackage with init script and needed folders created
> - standalone utilities (rrdcreate,rrdupdate,rrdinfo) are moved to -utils subpackage
> ---
>  main/rrdtool/APKBUILD                 | 79 ++++++++++++++++++++++++-----------
>  main/rrdtool/libm-underlinking.patch  | 11 -----
>  main/rrdtool/lua-install-cmod.patch   | 13 ------
>  main/rrdtool/no-posix-fallocate.patch | 12 ------
>  main/rrdtool/rrdcached.initd          | 17 ++++++++
>  5 files changed, 72 insertions(+), 60 deletions(-)
>  delete mode 100644 main/rrdtool/libm-underlinking.patch
>  delete mode 100644 main/rrdtool/lua-install-cmod.patch
>  delete mode 100644 main/rrdtool/no-posix-fallocate.patch
>  create mode 100644 main/rrdtool/rrdcached.initd
> 
> diff --git a/main/rrdtool/APKBUILD b/main/rrdtool/APKBUILD
> index 7fa5287..c1d468c 100644
> --- a/main/rrdtool/APKBUILD
> +++ b/main/rrdtool/APKBUILD
> @@ -1,24 +1,23 @@
> +# Contributor: Valery Kartel <valery.kartel@gmail.com>
>  # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
>  pkgname=rrdtool
> -pkgver=1.5.4
> +pkgver=1.5.5
>  pkgrel=0
>  pkgdesc="Data logging and graphing application"
>  url="http://www.rrdtool.org"
>  arch="all"
>  license="GPL"
> -depends="font-sony-misc"
> -makedepends="libart-lgpl-dev libpng-dev freetype-dev perl-dev cairo-dev
> -	pango-dev lua lua-dev python-dev groff
> -	autoconf automake libtool"
> -subpackages="$pkgname-dev $pkgname-doc perl-rrd:perl_rrd lua-rrd:lua_rrd py-rrd:py_rrd"
> +depends=

Is font-sony-misc no longer needed?
https://bugs.alpinelinux.org/issues/1475


> +depends_dev=
> +makedepends="$depends_dev groff autoconf automake libtool libart-lgpl-dev libpng-dev freetype-dev
> +	perl-dev cairo-dev libxml2-dev pango-dev lua-dev python-dev"
> +subpackages="$pkgname-doc $pkgname-dev $pkgname-cached $pkgname-cgi $pkgname-utils
> +	 perl-rrd:perl_rrd lua-rrd:lua_rrd py-rrd:py_rrd librrd-th:libth librrd:libs"
>  source="http://oss.oetiker.ch/$pkgname/pub/$pkgname-$pkgver.tar.gz
> -	lua-install-cmod.patch
> -	libm-underlinking.patch
> -	no-posix-fallocate.patch
> +	rrdcached.initd
>  	"
>  
>  _builddir="$srcdir"/$pkgname-$pkgver
> -
>  prepare() {
>  	cd "$_builddir"
>  	for i in $source; do
> @@ -42,6 +41,7 @@ build() {
>  		--enable-perl-site-install \
>  		--enable-lua-site-install \
>  		--with-perl-options="INSTALLDIRS=vendor" \
> +		--with-pic \

why is --with-pic needed? if gcc does not by default build with pic
then please report it as a bug.

>  		|| return 1
>  	make || return 1 
>  }
> @@ -52,12 +52,37 @@ package() {
>  	make DESTDIR="$pkgdir" install || return 1
>  	find "$pkgdir" -name '.packlist' -delete
>  	find "$pkgdir" -name 'perllocal.pod' -delete
> +	rm "$pkgdir"/usr/lib/*.la

I think recent abuild does this automatically for you.

-nc


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Valery Kartel
Details
Message ID
<CAKTwcDOW2F=_bvQGWpnhhiPwzwD8s1rmN6uzmYsB7inXQ5SrYw@mail.gmail.com>
In-Reply-To
<20160202153907.76279b47@ncopa-desktop.alpinelinux.org> (view parent)
Sender timestamp
1454425327
DKIM signature
missing
Download raw message
I don't think a choosen one font is need to be hardcoded as dependency.
IMHO, it's better to make empty rrdtool-fonts subpackage with font
dependency

About other, I reconsider my own doings ...

2016-02-02 16:39 GMT+02:00 Natanael Copa <ncopa@alpinelinux.org>:

> On Tue, 26 Jan 2016 11:55:41 +0200
> Valery Kartel <valery.kartel@gmail.com> wrote:
>
> > - remove all unneeded patches
> > - add libxml2-dev to makedepends
> > - rrdtool library moved to librrd subpackage
> > - rrdtool_th threaded library moved to librrd-th subpackage
> > - rrdcgi web-page template parser moved to -cgi subpackage
> > - rrdcached daemon moved to -cached subpackage with init script and
> needed folders created
> > - standalone utilities (rrdcreate,rrdupdate,rrdinfo) are moved to -utils
> subpackage
> > ---
> >  main/rrdtool/APKBUILD                 | 79
> ++++++++++++++++++++++++-----------
> >  main/rrdtool/libm-underlinking.patch  | 11 -----
> >  main/rrdtool/lua-install-cmod.patch   | 13 ------
> >  main/rrdtool/no-posix-fallocate.patch | 12 ------
> >  main/rrdtool/rrdcached.initd          | 17 ++++++++
> >  5 files changed, 72 insertions(+), 60 deletions(-)
> >  delete mode 100644 main/rrdtool/libm-underlinking.patch
> >  delete mode 100644 main/rrdtool/lua-install-cmod.patch
> >  delete mode 100644 main/rrdtool/no-posix-fallocate.patch
> >  create mode 100644 main/rrdtool/rrdcached.initd
> >
> > diff --git a/main/rrdtool/APKBUILD b/main/rrdtool/APKBUILD
> > index 7fa5287..c1d468c 100644
> > --- a/main/rrdtool/APKBUILD
> > +++ b/main/rrdtool/APKBUILD
> > @@ -1,24 +1,23 @@
> > +# Contributor: Valery Kartel <valery.kartel@gmail.com>
> >  # Maintainer: Natanael Copa <ncopa@alpinelinux.org>
> >  pkgname=rrdtool
> > -pkgver=1.5.4
> > +pkgver=1.5.5
> >  pkgrel=0
> >  pkgdesc="Data logging and graphing application"
> >  url="http://www.rrdtool.org"
> >  arch="all"
> >  license="GPL"
> > -depends="font-sony-misc"
> > -makedepends="libart-lgpl-dev libpng-dev freetype-dev perl-dev cairo-dev
> > -     pango-dev lua lua-dev python-dev groff
> > -     autoconf automake libtool"
> > -subpackages="$pkgname-dev $pkgname-doc perl-rrd:perl_rrd
> lua-rrd:lua_rrd py-rrd:py_rrd"
> > +depends=
>
> Is font-sony-misc no longer needed?
> https://bugs.alpinelinux.org/issues/1475
>
>
> > +depends_dev=
> > +makedepends="$depends_dev groff autoconf automake libtool
> libart-lgpl-dev libpng-dev freetype-dev
> > +     perl-dev cairo-dev libxml2-dev pango-dev lua-dev python-dev"
> > +subpackages="$pkgname-doc $pkgname-dev $pkgname-cached $pkgname-cgi
> $pkgname-utils
> > +      perl-rrd:perl_rrd lua-rrd:lua_rrd py-rrd:py_rrd librrd-th:libth
> librrd:libs"
> >  source="http://oss.oetiker.ch/$pkgname/pub/$pkgname-$pkgver.tar.gz
> > -     lua-install-cmod.patch
> > -     libm-underlinking.patch
> > -     no-posix-fallocate.patch
> > +     rrdcached.initd
> >       "
> >
> >  _builddir="$srcdir"/$pkgname-$pkgver
> > -
> >  prepare() {
> >       cd "$_builddir"
> >       for i in $source; do
> > @@ -42,6 +41,7 @@ build() {
> >               --enable-perl-site-install \
> >               --enable-lua-site-install \
> >               --with-perl-options="INSTALLDIRS=vendor" \
> > +             --with-pic \
>
> why is --with-pic needed? if gcc does not by default build with pic
> then please report it as a bug.
>
> >               || return 1
> >       make || return 1
> >  }
> > @@ -52,12 +52,37 @@ package() {
> >       make DESTDIR="$pkgdir" install || return 1
> >       find "$pkgdir" -name '.packlist' -delete
> >       find "$pkgdir" -name 'perllocal.pod' -delete
> > +     rm "$pkgdir"/usr/lib/*.la
>
> I think recent abuild does this automatically for you.
>
> -nc
>