~alpine/devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
3 2

[alpine-devel] [PATCH] main/nginx New package

Cameron Banta <cbanta@gmail.com>
Details
Message ID
<1288624808-1532-1-git-send-email-cbanta@gmail.com>
Sender timestamp
1288624808
DKIM signature
missing
Download raw message
Patch: +127 -0
---
 main/nginx/APKBUILD    |   58 ++++++++++++++++++++++++++++++++++++++++++++
 main/nginx/nginx.confd |    7 +++++
 main/nginx/nginx.initd |   62 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 127 insertions(+), 0 deletions(-)
 create mode 100644 main/nginx/APKBUILD
 create mode 100644 main/nginx/nginx.confd
 create mode 100644 main/nginx/nginx.initd

diff --git a/main/nginx/APKBUILD b/main/nginx/APKBUILD
new file mode 100644
index 0000000..b35beab
--- /dev/null
+++ b/main/nginx/APKBUILD
@@ -0,0 +1,58 @@
# Contributor: Cameron Banta <cbanta@gmail.com>
# Maintainer: Cameron Banta <cbanta@gmail.com>
pkgname=nginx
pkgver=0.8.53
pkgrel=0
pkgdesc="nginx [engine x] is a HTTP and reverse proxy server"
url="nginx.org"
license="Custom"
depends=
makedepends="pcre-dev openssl-dev libcrypto1.0 zlib-dev"
#install="$pkgname.pre-install $pkgname.post-install"
install=
subpackages=
source="http://nginx.org/download/$pkgname-$pkgver.tar.gz
	nginx.initd
	nginx.confd
	$install
	"

# append extra dependencies to -dev subpackage
# remove if not used.
# depends_dev="somepackage-dev"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	# apply patches here
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--conf-path=/etc/$pkgname/$pkgname.conf \
		--pid-path=/var/run/$pkgname.pid \
		--lock-path=/var/run/$pkgname.lock \
		--error-log-path=/var/log/$pkgname/error.log \
		--http-log-path=/var/log/$pkgname/access.log \
		--with-http_ssl_module \
		--with-http_gzip_static_module \
		--http-client-body-temp-path=/tmp/$pkgname/client-body \
		--http-proxy-temp-path=/tmp/$pkgname/proxy \
		--http-fastcgi-temp-path=/tmp/$pkgname/fastcgi \
		|| return 1 
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install

	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}

md5sums="717eaea1b34e8663849f64b9aa05a9da  nginx-0.8.53.tar.gz
17e4af92572333c32fed04e2e0fc9b7e  nginx.initd
cbcac88f5b728b1441891947a4babbcb  nginx.confd"
diff --git a/main/nginx/nginx.confd b/main/nginx/nginx.confd
new file mode 100644
index 0000000..486252b
--- /dev/null
+++ b/main/nginx/nginx.confd
@@ -0,0 +1,7 @@
# Sample conf.d file for alpine linux

#
# Specify daemon options here.
#

sample_opts=""
diff --git a/main/nginx/nginx.initd b/main/nginx/nginx.initd
new file mode 100644
index 0000000..0464f5c
--- /dev/null
+++ b/main/nginx/nginx.initd
@@ -0,0 +1,62 @@
#! /bin/sh

### BEGIN INIT INFO
# Provides:          nginx
# Required-Start:    $all
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts the nginx web server
# Description:       starts nginx using start-stop-daemon
### END INIT INFO

PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/nginx
NAME=nginx
DESC=nginx

test -x $DAEMON || exit 0

# Include nginx defaults if available
if [ -f /etc/conf.d/nginx ] ; then
        . /etc/conf.d/nginx
fi

set -e

case "$1" in
  start)
        echo -n "Starting $DESC: "
        start-stop-daemon --start --quiet --pidfile /var/run/nginx.pid \
                --exec $DAEMON -- $DAEMON_OPTS
        echo "$NAME."
        ;;
  stop)
        echo -n "Stopping $DESC: "
        start-stop-daemon --stop --quiet --pidfile /var/run/nginx.pid \
                --exec $DAEMON
        echo "$NAME."
        ;;
  restart|force-reload)
        echo -n "Restarting $DESC: "
        start-stop-daemon --stop --quiet --pidfile \
                /var/run/nginx.pid --exec $DAEMON
        sleep 1
        start-stop-daemon --start --quiet --pidfile \
                /var/run/nginx.pid --exec $DAEMON -- $DAEMON_OPTS
        echo "$NAME."
        ;;
  reload)
      echo -n "Reloading $DESC configuration: "
      start-stop-daemon --stop --signal HUP --quiet --pidfile /var/run/nginx.pid \
          --exec $DAEMON 
      echo "$NAME."
      ;;
  *)
        N=/etc/init.d/$NAME
        echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
        exit 1   
        ;;
esac

exit 0
-- 
1.7.3.2



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Cameron Banta <cbanta@gmail.com>
Details
Message ID
<4CCEE36E.5090909@gmail.com>
In-Reply-To
<1288625324.16847.8.camel@ncopa-desktop.nor.wtbts.net> (view parent)
Sender timestamp
1288627054
DKIM signature
missing
Download raw message
On 11/01/2010 10:28 AM, Natanael Copa wrote:
> Thanks for the apkbuild.
>
> We are in the middle of the 2.1 release. Is the release worth delaying
> for this package?
>
No, this was intended for 2.2. Should I just keep it locally and wait 
until 2.1 is released before sending it?

> On Mon, 2010-11-01 at 15:20 +0000, Cameron Banta wrote:
>> ---
>>   main/nginx/APKBUILD    |   58 ++++++++++++++++++++++++++++++++++++++++++++
>>   main/nginx/nginx.confd |    7 +++++
>>   main/nginx/nginx.initd |   62 ++++++++++++++++++++++++++++++++++++++++++++++++
>>   3 files changed, 127 insertions(+), 0 deletions(-)
>>   create mode 100644 main/nginx/APKBUILD
>>   create mode 100644 main/nginx/nginx.confd
>>   create mode 100644 main/nginx/nginx.initd
>>
>> diff --git a/main/nginx/APKBUILD b/main/nginx/APKBUILD
> We normally add new packages to testing/ first
>
Sorry, I can move it there.
>> new file mode 100644
>> index 0000000..b35beab
>> --- /dev/null
>> +++ b/main/nginx/APKBUILD
>> @@ -0,0 +1,58 @@
>> +# Contributor: Cameron Banta<cbanta@gmail.com>
>> +# Maintainer: Cameron Banta<cbanta@gmail.com>
>> +pkgname=nginx
>> +pkgver=0.8.53
>> +pkgrel=0
>> +pkgdesc="nginx [engine x] is a HTTP and reverse proxy server"
>> +url="nginx.org"
>> +license="Custom"
>> +depends=
>> +makedepends="pcre-dev openssl-dev libcrypto1.0 zlib-dev"
>> +#install="$pkgname.pre-install $pkgname.post-install"
>> +install=
>> +subpackages=
>> +source="http://nginx.org/download/$pkgname-$pkgver.tar.gz
>> +	nginx.initd
>> +	nginx.confd
>> +	$install
>> +	"
>> +
>> +# append extra dependencies to -dev subpackage
>> +# remove if not used.
>> +# depends_dev="somepackage-dev"
> The 3 comment lines above should be removed.
>
>> +
>> +_builddir="$srcdir"/$pkgname-$pkgver
>> +
> [cutted the part that looked good]
>
>> --- /dev/null
>> +++ b/main/nginx/nginx.initd
>> @@ -0,0 +1,62 @@
>> +#! /bin/sh
> Should be #!/sbin/runscript
>
>> +
>> +### BEGIN INIT INFO
>> +# Provides:          nginx
>> +# Required-Start:    $all
>> +# Required-Stop:     $all
>> +# Default-Start:     2 3 4 5
>> +# Default-Stop:      0 1 6
>> +# Short-Description: starts the nginx web server
>> +# Description:       starts nginx using start-stop-daemon
>> +### END INIT INFO
> No. We use openrc (like gentoo) which does not understand the above
> service dependency info.
>
> The init.d needs to be rewritten to fit the rest of the system.
>
> Thanks!
>
> -nc
>
Ok, I'm looking for the gentoo init script.

-Cameron



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<1288625324.16847.8.camel@ncopa-desktop.nor.wtbts.net>
In-Reply-To
<1288624808-1532-1-git-send-email-cbanta@gmail.com> (view parent)
Sender timestamp
1288625324
DKIM signature
missing
Download raw message
Thanks for the apkbuild.

We are in the middle of the 2.1 release. Is the release worth delaying
for this package?

On Mon, 2010-11-01 at 15:20 +0000, Cameron Banta wrote:
> ---
>  main/nginx/APKBUILD    |   58 ++++++++++++++++++++++++++++++++++++++++++++
>  main/nginx/nginx.confd |    7 +++++
>  main/nginx/nginx.initd |   62 ++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 127 insertions(+), 0 deletions(-)
>  create mode 100644 main/nginx/APKBUILD
>  create mode 100644 main/nginx/nginx.confd
>  create mode 100644 main/nginx/nginx.initd
> 
> diff --git a/main/nginx/APKBUILD b/main/nginx/APKBUILD

We normally add new packages to testing/ first


> new file mode 100644
> index 0000000..b35beab
> --- /dev/null
> +++ b/main/nginx/APKBUILD
> @@ -0,0 +1,58 @@
> +# Contributor: Cameron Banta <cbanta@gmail.com>
> +# Maintainer: Cameron Banta <cbanta@gmail.com>
> +pkgname=nginx
> +pkgver=0.8.53
> +pkgrel=0
> +pkgdesc="nginx [engine x] is a HTTP and reverse proxy server"
> +url="nginx.org"
> +license="Custom"
> +depends=
> +makedepends="pcre-dev openssl-dev libcrypto1.0 zlib-dev"
> +#install="$pkgname.pre-install $pkgname.post-install"
> +install=
> +subpackages=
> +source="http://nginx.org/download/$pkgname-$pkgver.tar.gz
> +	nginx.initd
> +	nginx.confd
> +	$install
> +	"
> +
> +# append extra dependencies to -dev subpackage
> +# remove if not used.
> +# depends_dev="somepackage-dev"

The 3 comment lines above should be removed.

> +
> +_builddir="$srcdir"/$pkgname-$pkgver
> +

[cutted the part that looked good]

> --- /dev/null
> +++ b/main/nginx/nginx.initd
> @@ -0,0 +1,62 @@
> +#! /bin/sh

Should be #!/sbin/runscript

> +
> +### BEGIN INIT INFO
> +# Provides:          nginx
> +# Required-Start:    $all
> +# Required-Stop:     $all
> +# Default-Start:     2 3 4 5
> +# Default-Stop:      0 1 6
> +# Short-Description: starts the nginx web server
> +# Description:       starts nginx using start-stop-daemon
> +### END INIT INFO

No. We use openrc (like gentoo) which does not understand the above
service dependency info.

The init.d needs to be rewritten to fit the rest of the system.

Thanks!

-nc



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<1288629925.16847.11.camel@ncopa-desktop.nor.wtbts.net>
In-Reply-To
<4CCEE36E.5090909@gmail.com> (view parent)
Sender timestamp
1288629925
DKIM signature
missing
Download raw message
On Mon, 2010-11-01 at 10:57 -0500, Cameron Banta wrote:
> On 11/01/2010 10:28 AM, Natanael Copa wrote:
> > Thanks for the apkbuild.
> >
> > We are in the middle of the 2.1 release. Is the release worth delaying
> > for this package?
> >
> No, this was intended for 2.2. Should I just keep it locally and wait 
> until 2.1 is released before sending it?

nah... It missed the 2.1 train anyways (I just tagged it and branched it
and is working on setting up the build-2-1 vserver)

Thanks!
-nc



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)