X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@lists.alpinelinux.org Received: from smtp141.iad.emailsrvr.com (smtp141.iad.emailsrvr.com [207.97.245.141]) by lists.alpinelinux.org (Postfix) with ESMTP id 194671EB587 for ; Tue, 28 Dec 2010 06:39:49 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp44.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 2431E128B5F; Tue, 28 Dec 2010 01:39:49 -0500 (EST) X-Virus-Scanned: OK Received: from dynamic1.wm-web.iad.mlsrvr.com (dynamic1.wm-web.iad1a.rsapps.net [192.168.2.150]) by smtp44.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id F1040128B19; Tue, 28 Dec 2010 01:39:48 -0500 (EST) Received: from darkregion.net (localhost [127.0.0.1]) by dynamic1.wm-web.iad.mlsrvr.com (Postfix) with ESMTP id DFC0DC98070; Tue, 28 Dec 2010 01:39:48 -0500 (EST) Received: by apps.rackspace.com (Authenticated sender: mcs@darkregion.net, from: mcs@darkregion.net) with HTTP; Tue, 28 Dec 2010 00:39:48 -0600 (CST) Date: Tue, 28 Dec 2010 00:39:48 -0600 (CST) Subject: Re: [alpine-devel] [PATCH] testing/next3-{grsec,vserver}: new aport From: "Matt Smith" To: "Natanael Copa" Cc: alpine-devel@lists.alpinelinux.org X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain;charset=UTF-8 Content-Transfer-Encoding: quoted-printable Importance: Normal X-Priority: 3 (Normal) X-Type: plain Message-ID: <1293518388.914132154@192.168.2.227> X-Mailer: webmail8 On Wednesday, December 22, 2010 2:56am, "Natanael Copa" said:=0A> On Tue, 2010-12-21 at 21:05 -0600, Matt Smith wrote:=0A> =0A= > Please include the pkgdesc and url in commit message so you quickly can= =0A> get info on what the new aport is about.=0A> =0A> For example:=0A> htt= p://git.alpinelinux.org/cgit/aports/commit/?id=3D7269013bc00062d01ca5bb2ad4= fd55cf5bcd9887=0A> =0A> This is not a show-stopper but is nice.=0A=0AThat's= a good idea, thanks.=0A=0A>> ---=0A>> testing/next3-grsec/APKBUILD | = 86 ++++++++++++++++++++++++++++++++++++++++=0A>> testing/next3-vserver/APK= BUILD | 86 ++++++++++++++++++++++++++++++++++++++++=0A>> 2 files changed= , 172 insertions(+), 0 deletions(-)=0A>> create mode 100644 testing/next3-= grsec/APKBUILD=0A>> create mode 100644 testing/next3-vserver/APKBUILD=0A>>= =0A>> diff --git a/testing/next3-grsec/APKBUILD b/testing/next3-grsec/APKBU= ILD=0A>> new file mode 100644=0A>> index 0000000..7f70088=0A>> --- /dev/nul= l=0A>> +++ b/testing/next3-grsec/APKBUILD=0A>> @@ -0,0 +1,86 @@=0A>> +# Con= tributor: Matt Smith =0A>> +# Maintainer: Matt Smith <= mcs@darkregion.net>=0A>> +# Based off of aports/main/dahdi-linux-grsec/APKB= UILD by Timo Teras=0A>> +=0A>> +_flavor=3Dgrsec=0A>> +=0A>> +# source the k= ernel version=0A>> +if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then=0A= >> +=09. ../../main/linux-${_flavor}/APKBUILD=0A>> +fi=0A>> +=0A>> +_kernel= ver=3D"$pkgver-r$pkgrel"=0A>> +_abi_release=3D${pkgver}-${_flavor}=0A>> +_k= pkgrel=3D$pkgrel=0A>> +_realname=3Dnext3=0A>> +=0A>> +pkgname=3D${_realname= }-${_flavor}=0A>> +pkgver=3D$pkgver=0A>> +# when changing _next3ver we *mus= t* bump _mypkgrel=0A>> +_next3ver=3D1.0.13-rc6=0A>> +_mypkgrel=3D0=0A>> +pk= grel=3D$(( $_kpkgrel + $_mypkgrel ))=0A>> +pkgdesc=3D"NEXT3(TM) is a flavor= of the widely used Ext3 file system with built-in=0A>> support for snapsho= ts."=0A>> +url=3D"http://www.ctera.com/home/next3.html"=0A>> +arch=3D"all"= =0A>> +license=3D"GPL"=0A>> +depends=3D"linux-${_flavor}=3D${_kernelver}"= =0A>> +makedepends=3D"linux-${_flavor}-dev=3D${_kernelver} wget coreutils"= =0A>> +install=3D=0A>> +subpackages=3D"$pkgname-doc"=0A>> +source=3D"http:/= /downloads.sourceforge.net/${_realname}/${_realname}-${_next3ver}.tar.gz"= =0A>> +=0A>> +_builddir=3D"$srcdir"/${_realname}-${_next3ver}=0A>> +=0A>> += prepare() {=0A>> +=09cd "$_builddir"=0A>> +=0A>> +=09# modify the Makefile = to use install from coreutils=0A>> +=09sed -ri "s;(install -T);/bin/\1;" Ma= kefile=0A> =0A> when coreutils is installed, will it not automatically use = coreutils'=0A> install? thats a bug in bb/coreutils then.=0A=0ANo, 'install= --help' reports busybox, even when logging back in. I'll file a=0Abug rep= ort, if not already done.=0A=0A>> +=09# modify the Makefile, add necessary = options to mkfs.next3=0A>> +=09# during make test (these are also necessary= for normal use)=0A>> +=09# See the CHANGELOG for Dec 13, 2010.=0A>> +=09se= d -ri "s;(mkfs.next3) (test.img);\1 -O exclude_inode,has_snapshot \2;"=0A>>= Makefile=0A> =0A> see below about 'make test'=0A> =0A>> +=09# modify the M= akefile, change INSTALL_DIR=0A>> +=09sed -ri=0A>> "s;^(INSTALL_DIR=3D).*$;\= 1"$pkgdir"/lib/modules/${_abi_release}/fs/next3;"=0A>> Makefile=0A> =0A> ca= n you do 'make install INSTALL_DIR=3D......' without modifying the=0A> Make= file?=0A=0AYeah, you're right. I did have problems at first, but it's work= ing now. It=0Awill be in my next update.=0A=0A>> +=0A>> +=09# modify the M= akefile, update the depmod line to only run when root=0A>> +=09# and run it= against the $_abi_release kernel version=0A>> +=09sed -ri "s;(/sbin/depmod= -a);\[ \`id -u\` =3D 0 \] \&\& \1 ${_abi_release} || :;"=0A>> Makefile=0A>= =0A> How about patching the Makefile to something like:=0A> DEPMOD =3D /sb= in/depmod=0A> ...=0A> $(DEPMOD) -a=0A> =0A> and then do: 'make DEPMOD=3D:'= =0A> =0A> I suppose checking if run as root works too.=0A> =0A> This should= be fixed upstream btw...=0A=0AGood point. I'll see about notifying them a= bout the necessary changes.=0A=0A>> +=0A>> +=09# modify the Makefile, remov= e the modprobe line=0A>> +=09sed -ri "s;(/sbin/modprobe next3);;" Makefile= =0A>> +=0A>> +=09# modify the Makefile, update the install lines for 'make = install'=0A>> +=09sed -ri "s;(install) (.*) (/sbin);\1 -m755 \2 "$pkgdir"\3= ;" Makefile=0A>> +}=0A>> +=0A>> +build() {=0A>> +=09cd "$_builddir"=0A>> += =0A>> +=09# Build Next3=0A>> +=09make KVERS=3D"${_abi_release}" || return 1= =0A>> +=0A>> +=09# Test Next3=0A>> +=09sudo make KVERS=3D"${_abi_release}" = test || return 1=0A> =0A> this is a no-no. Do not ever run sudo from your A= PKBUILD. Do not ever=0A> touch anything outside the build dir itself.=0A=0A= Ok. I think this would be more suitable for APTS.=0A=0A>> +}=0A>> +=0A>> += package() {=0A>> +=09cd "$_builddir"=0A>> +=0A>> +=09# Install Next3 into $= pkgdir=0A>> +=09make KVERS=3D"${_abi_release}" install || return 1=0A>> +}= =0A>> +=0A>> +doc() {=0A>> +=09cd "$_builddir"=0A>> +=0A>> +=09mkdir -p "$s= ubpkgdir"/usr/share/doc/next3/=0A>> +=09for _doc in BUGS CHANGELOG COPYING = HOWTO INDEX INSTALL README TODO; do=0A>> +=09=09install -Dm644 $_doc "$subp= kgdir"/usr/share/doc/next3/$_doc=0A>> +=09done=0A>> +}=0A>> +=0A>> +md5sums= =3D"dacbc80fbeac6347b987fabbab62f22e next3-1.0.13-rc6.tar.gz"=0A>> diff --= git a/testing/next3-vserver/APKBUILD b/testing/next3-vserver/APKBUILD=0A> = =0A> The above applies to the next3-vserver too.=0A> =0A> Can you fix the t= hings I mentioned and send a new patch?=0A> =0A> Thanks!=0A> =0A> -nc=0A=0A= No problem. I'll submit the patches soon.=0A=0ABy the way, what all would = be necessary in order to convert the root ext3 part-=0Aition of an Alpine L= inux system to Next3? So far I have:=0A=0A(These may be out of order; this= is mostly from memory at the moment.)=0A=0A- Added 'next3' to the 'feature= s=3D' line of /etc/mkinitfs/mkinitfs.conf, eg:=0A features=3D"ata base b= ootchart cdrom cramfs ext2 ext3 ext4 next3 floppy raid scsi usb virtio"=0A-= Created file /etc/mkinitfs/modules.d/next3 with content 'fs/next3'=0A- Cre= ate an initramfs, something like this:=0A $ sudo mkinitfs -o /boot/initr= amfs-2.6.35.10-grsec-next3 2.6.35.10-grsec=0A $ sudo rm /boot/initramfs-= grsec=0A $ sudo ln -s /boot/initramfs-2.6.35.10-grsec-next3 /boot/initra= mfs-grsec=0A- Created an ISO using alpine-iso and my locally-generated next= 3-grsec apk=0A- Rebooted my Alpine Linux development VM with the new ISO in= serted.=0A- Mount root partition from the HDD and update it's /etc/fstab fo= r Next3 on the=0A root partition.=0A- Unmount root partition (umount /mnt)= and convert HDD's root ext3 partition to=0A Next3.=0A- Reboot without the= ISO and it should boot up via the Next3 root partition.=0A=0ABut I have a = problem:=0AIt attempts to mount the root partition as ext3 which semi-fails= , mounting it as=0Aext3/read-only, when it should be mounting it as next3/r= ead-write.=0A=0AFrom there, I've tried the following and variations of it:= =0A# mount -t next3 -o remount,rw /dev/sda3 /=0A=0AI forget the error messa= ges, but this doesn't work either.=0A=0AAny ideas what I'm doing wrong?=0A= =0AThanks in advance,=0AMatt --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---