Mail archive
alpine-devel

Re: [alpine-devel] [PATCH] main/syslog-ng: new package

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Thu, 23 May 2013 21:58:20 +0200

On Wed, 22 May 2013 11:44:16 +0200
Jens Vehlhaber <jens_at_eisfair.org> wrote:

> Hello developers,

Hi!

> interested in a syslog-ng package with configuration templates?

Thank you very much!

I have a few comments...

...
> diff --git a/main/libeventlog/APKBUILD b/main/libeventlog/APKBUILD
> new file mode 100644
> index 0000000..b85f21e
> --- /dev/null
> +++ b/main/libeventlog/APKBUILD

New packages should be added to testing subdirectory. Once its tested
we move it to main.


> _at_@ -0,0 +1,37 @@
> +# Contributor: jv jens_at_eisfair.org
> +# Maintainer: jv jens_at_eisfair.org
> +pkgname=libeventlog
> +pkgver=0.2.12
> +pkgrel=0
> +pkgdesc="Syslog event logger library"
> +url="http://www.balabit.com"
> +arch="all"
> +license="GNU"

GPL/GPLv2/GPLv2+/GPL3/LGPL?

> +depends=""
> +depends_dev=""
> +makedepends="$depends_dev"
> +install=""
> +subpackages="$pkgname-dev"
> +source="http://www.balabit.com/downloads/files?path=/syslog-ng/sources/3.3.9/source/eventlog_${pkgver}.tar.gz"
> +
> +_builddir="$srcdir/eventlog-$pkgver"
> +
> +prepare() {
> + cd "$_builddir"
> +}
> +
> +build() {
> + cd "$_builddir"
> + ./configure --prefix=/usr || return 1
> + make || return 1
> +}
> +
> +package() {
> + cd "$_builddir"
> + make -j1 DESTDIR="$pkgdir" install || return 1
> + rm -f ${pkgdir}/usr/lib/*.la
> + strip -R .note -R .comment ${pkgdir}/usr/lib/*.so.*

abuild will strip.
http://git.alpinelinux.org/cgit/abuild/tree/abuild.in#n1568


> + return 0
> +}
> +
> +md5sums="7d95392a6618437a0404a3fadb49f53e eventlog_0.2.12.tar.gz"
> diff --git a/main/syslog-ng/APKBUILD b/main/syslog-ng/APKBUILD
> new file mode 100644
> index 0000000..6a2d385
> --- /dev/null
> +++ b/main/syslog-ng/APKBUILD
> _at_@ -0,0 +1,66 @@
> +# Contributor: jv <jens_at_eisfair.org>
> +# Maintainer: jv <jens_at_eisfair.org>
> +pkgname=syslog-ng
> +pkgver=2.1.4
> +pkgrel=0
> +pkgdesc="Syslog-NG"
> +url="http://www.balabit.com"
> +arch="all"
> +license="GNU"
> +depends="glib libeventlog"

You don't need add those to depends. abuild will use scanelf to
automatically detect the elf dependencies.

> +depends_dev="glib-dev libeventlog-dev"
> +makedepends="$depends_dev"
> +install="$pkgname.pre-install $pkgname.post-install
> $pkgname.pre-deinstall $pkgname.pre-upgrade $pkgname.post-upgrade"
> +subpackages=""

...
> diff --git a/main/syslog-ng/syslog-ng.initd
> b/main/syslog-ng/syslog-ng.initd new file mode 100644
> index 0000000..a98def2
> --- /dev/null
> +++ b/main/syslog-ng/syslog-ng.initd
> _at_@ -0,0 +1,76 @@
> +#!/sbin/runscript
> +# Copyright 1999-2007 Gentoo Foundation
> +# Distributed under the terms of the GNU General Public License v2

Reuse of gentoo's init.d. good!

> diff --git a/main/syslog-ng/syslog-ng.post-install
> b/main/syslog-ng/syslog-ng.post-install
> new file mode 100644
> index 0000000..c21ac31
> --- /dev/null
> +++ b/main/syslog-ng/syslog-ng.post-install
> _at_@ -0,0 +1,11 @@
> +#!/bin/sh
> +
> +/etc/init.d/syslog stop
> +[ -e /etc/runlevels/boot/syslog ] && /sbin/rc-update del syslog boot
> +[ -e /etc/runlevels/boot/sysctl ] && /sbin/rc-update del sysctl boot
> +/sbin/rc-update add syslog-ng boot

I don't like this. we should not change what services to start from
install scripts.

Care to fix those thing up and send a new?

Thanks!


-nc


---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Thu May 23 2013 - 21:58:20 UTC