~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
1

[alpine-devel] [PATCH] testing/next3-{grsec,vserver}: new aport

Details
Message ID
<1292987142-11325-1-git-send-email-mcs@darkregion.net>
Sender timestamp
1292987142
DKIM signature
missing
Download raw message
Patch: +172 -0
---
 testing/next3-grsec/APKBUILD   |   86 ++++++++++++++++++++++++++++++++++++++++
 testing/next3-vserver/APKBUILD |   86 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 172 insertions(+), 0 deletions(-)
 create mode 100644 testing/next3-grsec/APKBUILD
 create mode 100644 testing/next3-vserver/APKBUILD

diff --git a/testing/next3-grsec/APKBUILD b/testing/next3-grsec/APKBUILD
new file mode 100644
index 0000000..7f70088
--- /dev/null
+++ b/testing/next3-grsec/APKBUILD
@@ -0,0 +1,86 @@
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer:  Matt Smith <mcs@darkregion.net>
# Based off of aports/main/dahdi-linux-grsec/APKBUILD by Timo Teras

_flavor=grsec

# source the kernel version
if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then
	. ../../main/linux-${_flavor}/APKBUILD
fi

_kernelver="$pkgver-r$pkgrel"
_abi_release=${pkgver}-${_flavor}
_kpkgrel=$pkgrel
_realname=next3

pkgname=${_realname}-${_flavor}
pkgver=$pkgver
# when changing _next3ver we *must* bump _mypkgrel
_next3ver=1.0.13-rc6
_mypkgrel=0
pkgrel=$(( $_kpkgrel + $_mypkgrel ))
pkgdesc="NEXT3(TM) is a flavor of the widely used Ext3 file system with built-in support for snapshots."
url="http://www.ctera.com/home/next3.html"
arch="all"
license="GPL"
depends="linux-${_flavor}=${_kernelver}"
makedepends="linux-${_flavor}-dev=${_kernelver} wget coreutils"
install=
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/${_realname}/${_realname}-${_next3ver}.tar.gz"

_builddir="$srcdir"/${_realname}-${_next3ver}

prepare() {
	cd "$_builddir"

	# modify the Makefile to use install from coreutils
	sed -ri "s;(install -T);/bin/\1;" Makefile

	# modify the Makefile, add necessary options to mkfs.next3
	# during make test (these are also necessary for normal use)
	# See the CHANGELOG for Dec 13, 2010.
	sed -ri "s;(mkfs.next3) (test.img);\1 -O exclude_inode,has_snapshot \2;" Makefile

	# modify the Makefile, change INSTALL_DIR
	sed -ri "s;^(INSTALL_DIR=).*$;\1"$pkgdir"/lib/modules/${_abi_release}/fs/next3;" Makefile

	# modify the Makefile, update the depmod line to only run when root
	# and run it against the $_abi_release kernel version
	sed -ri "s;(/sbin/depmod -a);\[ \`id -u\` = 0 \] \&\& \1 ${_abi_release} || :;" Makefile

	# modify the Makefile, remove the modprobe line
	sed -ri "s;(/sbin/modprobe next3);;" Makefile

	# modify the Makefile, update the install lines for 'make install'
	sed -ri "s;(install) (.*) (/sbin);\1 -m755 \2 "$pkgdir"\3;" Makefile
}

build() {
	cd "$_builddir"

	# Build Next3
	make KVERS="${_abi_release}" || return 1

	# Test Next3
	sudo make KVERS="${_abi_release}" test || return 1
}

package() {
	cd "$_builddir"

	# Install Next3 into $pkgdir
	make KVERS="${_abi_release}" install || return 1
}

doc() {
	cd "$_builddir"

	mkdir -p "$subpkgdir"/usr/share/doc/next3/
	for _doc in BUGS CHANGELOG COPYING HOWTO INDEX INSTALL README TODO; do
		install -Dm644 $_doc "$subpkgdir"/usr/share/doc/next3/$_doc
	done
}

md5sums="dacbc80fbeac6347b987fabbab62f22e  next3-1.0.13-rc6.tar.gz"
diff --git a/testing/next3-vserver/APKBUILD b/testing/next3-vserver/APKBUILD
new file mode 100644
index 0000000..7ad93b4
--- /dev/null
+++ b/testing/next3-vserver/APKBUILD
@@ -0,0 +1,86 @@
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer:  Matt Smith <mcs@darkregion.net>
# Based off of aports/main/dahdi-linux-grsec/APKBUILD by Timo Teras

_flavor=vserver

# source the kernel version
if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then
	. ../../main/linux-${_flavor}/APKBUILD
fi

_kernelver="$pkgver-r$pkgrel"
_abi_release=${pkgver}-${_flavor}
_kpkgrel=$pkgrel
_realname=next3

pkgname=${_realname}-${_flavor}
pkgver=$pkgver
# when changing _next3ver we *must* bump _mypkgrel
_next3ver=1.0.13-rc6
_mypkgrel=0
pkgrel=$(( $_kpkgrel + $_mypkgrel ))
pkgdesc="NEXT3(TM) is a flavor of the widely used Ext3 file system with built-in support for snapshots."
url="http://www.ctera.com/home/next3.html"
arch="all"
license="GPL"
depends="linux-${_flavor}=${_kernelver}"
makedepends="linux-${_flavor}-dev=${_kernelver} wget coreutils"
install=
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/${_realname}/${_realname}-${_next3ver}.tar.gz"

_builddir="$srcdir"/${_realname}-${_next3ver}

prepare() {
	cd "$_builddir"

	# modify the Makefile to use install from coreutils
	sed -ri "s;(install -T);/bin/\1;" Makefile

	# modify the Makefile, add necessary options to mkfs.next3
	# during make test (these are also necessary for normal use)
	# See the CHANGELOG for Dec 13, 2010.
	sed -ri "s;(mkfs.next3) (test.img);\1 -O exclude_inode,has_snapshot \2;" Makefile

	# modify the Makefile, change INSTALL_DIR
	sed -ri "s;^(INSTALL_DIR=).*$;\1"$pkgdir"/lib/modules/${_abi_release}/fs/next3;" Makefile

	# modify the Makefile, update the depmod line to only run when root
	# and run it against the $_abi_release kernel version
	sed -ri "s;(/sbin/depmod -a);\[ \`id -u\` = 0 \] \&\& \1 ${_abi_release} || :;" Makefile

	# modify the Makefile, remove the modprobe line
	sed -ri "s;(/sbin/modprobe next3);;" Makefile

	# modify the Makefile, update the install lines for 'make install'
	sed -ri "s;(install) (.*) (/sbin);\1 -m755 \2 "$pkgdir"\3;" Makefile
}

build() {
	cd "$_builddir"

	# Build Next3
	make KVERS="${_abi_release}" || return 1

	# Test Next3
	sudo make KVERS="${_abi_release}" test || return 1
}

package() {
	cd "$_builddir"

	# Install Next3 into $pkgdir
	make KVERS="${_abi_release}" install || return 1
}

doc() {
	cd "$_builddir"

	mkdir -p "$subpkgdir"/usr/share/doc/next3/
	for _doc in BUGS CHANGELOG COPYING HOWTO INDEX INSTALL README TODO; do
		install -Dm644 $_doc "$subpkgdir"/usr/share/doc/next3/$_doc
	done
}

md5sums="dacbc80fbeac6347b987fabbab62f22e  next3-1.0.13-rc6.tar.gz"
-- 
1.7.3.3



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<1293008217.23040.19.camel@ncopa-desktop.nor.wtbts.net>
In-Reply-To
<1292987142-11325-1-git-send-email-mcs@darkregion.net> (view parent)
Sender timestamp
1293008217
DKIM signature
missing
Download raw message
On Tue, 2010-12-21 at 21:05 -0600, Matt Smith wrote:

Please include the pkgdesc and url in commit message so you quickly can
get info on what the new aport is about.

For example:
http://git.alpinelinux.org/cgit/aports/commit/?id=7269013bc00062d01ca5bb2ad4fd55cf5bcd9887

This is not a show-stopper but is nice.

> ---
>  testing/next3-grsec/APKBUILD   |   86 ++++++++++++++++++++++++++++++++++++++++
>  testing/next3-vserver/APKBUILD |   86 ++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 172 insertions(+), 0 deletions(-)
>  create mode 100644 testing/next3-grsec/APKBUILD
>  create mode 100644 testing/next3-vserver/APKBUILD
> 
> diff --git a/testing/next3-grsec/APKBUILD b/testing/next3-grsec/APKBUILD
> new file mode 100644
> index 0000000..7f70088
> --- /dev/null
> +++ b/testing/next3-grsec/APKBUILD
> @@ -0,0 +1,86 @@
> +# Contributor: Matt Smith <mcs@darkregion.net>
> +# Maintainer:  Matt Smith <mcs@darkregion.net>
> +# Based off of aports/main/dahdi-linux-grsec/APKBUILD by Timo Teras
> +
> +_flavor=grsec
> +
> +# source the kernel version
> +if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then
> +	. ../../main/linux-${_flavor}/APKBUILD
> +fi
> +
> +_kernelver="$pkgver-r$pkgrel"
> +_abi_release=${pkgver}-${_flavor}
> +_kpkgrel=$pkgrel
> +_realname=next3
> +
> +pkgname=${_realname}-${_flavor}
> +pkgver=$pkgver
> +# when changing _next3ver we *must* bump _mypkgrel
> +_next3ver=1.0.13-rc6
> +_mypkgrel=0
> +pkgrel=$(( $_kpkgrel + $_mypkgrel ))
> +pkgdesc="NEXT3(TM) is a flavor of the widely used Ext3 file system with built-in support for snapshots."
> +url="http://www.ctera.com/home/next3.html"
> +arch="all"
> +license="GPL"
> +depends="linux-${_flavor}=${_kernelver}"
> +makedepends="linux-${_flavor}-dev=${_kernelver} wget coreutils"
> +install=
> +subpackages="$pkgname-doc"
> +source="http://downloads.sourceforge.net/${_realname}/${_realname}-${_next3ver}.tar.gz"
> +
> +_builddir="$srcdir"/${_realname}-${_next3ver}
> +
> +prepare() {
> +	cd "$_builddir"
> +
> +	# modify the Makefile to use install from coreutils
> +	sed -ri "s;(install -T);/bin/\1;" Makefile

when coreutils is installed, will it not automatically use coreutils'
install? thats a bug in bb/coreutils then.

> +	# modify the Makefile, add necessary options to mkfs.next3
> +	# during make test (these are also necessary for normal use)
> +	# See the CHANGELOG for Dec 13, 2010.
> +	sed -ri "s;(mkfs.next3) (test.img);\1 -O exclude_inode,has_snapshot \2;" Makefile

see below about 'make test'

> +	# modify the Makefile, change INSTALL_DIR
> +	sed -ri "s;^(INSTALL_DIR=).*$;\1"$pkgdir"/lib/modules/${_abi_release}/fs/next3;" Makefile

can you do 'make install INSTALL_DIR=......' without modifying the
Makefile?

> +
> +	# modify the Makefile, update the depmod line to only run when root
> +	# and run it against the $_abi_release kernel version
> +	sed -ri "s;(/sbin/depmod -a);\[ \`id -u\` = 0 \] \&\& \1 ${_abi_release} || :;" Makefile

How about patching the Makefile to something like:
DEPMOD = /sbin/depmod
...
$(DEPMOD) -a

and then do: 'make DEPMOD=:'

I suppose checking if run as root works too.

This should be fixed upstream btw...

> +
> +	# modify the Makefile, remove the modprobe line
> +	sed -ri "s;(/sbin/modprobe next3);;" Makefile
> +
> +	# modify the Makefile, update the install lines for 'make install'
> +	sed -ri "s;(install) (.*) (/sbin);\1 -m755 \2 "$pkgdir"\3;" Makefile
> +}
> +
> +build() {
> +	cd "$_builddir"
> +
> +	# Build Next3
> +	make KVERS="${_abi_release}" || return 1
> +
> +	# Test Next3
> +	sudo make KVERS="${_abi_release}" test || return 1

this is a no-no. Do not ever run sudo from your APKBUILD. Do not ever
touch anything outside the build dir itself.

> +}
> +
> +package() {
> +	cd "$_builddir"
> +
> +	# Install Next3 into $pkgdir
> +	make KVERS="${_abi_release}" install || return 1
> +}
> +
> +doc() {
> +	cd "$_builddir"
> +
> +	mkdir -p "$subpkgdir"/usr/share/doc/next3/
> +	for _doc in BUGS CHANGELOG COPYING HOWTO INDEX INSTALL README TODO; do
> +		install -Dm644 $_doc "$subpkgdir"/usr/share/doc/next3/$_doc
> +	done
> +}
> +
> +md5sums="dacbc80fbeac6347b987fabbab62f22e  next3-1.0.13-rc6.tar.gz"
> diff --git a/testing/next3-vserver/APKBUILD b/testing/next3-vserver/APKBUILD

The above applies to the next3-vserver too.

Can you fix the things I mentioned and send a new patch?

Thanks!

-nc



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