diff options
author | Andreas Grapentin | 2016-10-21 19:20:06 +0200 |
---|---|---|
committer | Andreas Grapentin | 2016-10-21 19:20:06 +0200 |
commit | bf87864bde222ad28ca68eebd1e6a3b63afbb524 (patch) | |
tree | eff30da2aa0f83260791701e501518874690e0b0 | |
download | aur-bf87864bde222ad28ca68eebd1e6a3b63afbb524.tar.gz |
prepared vmdebootstrap-1.6 for arch, with patches
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | PKGBUILD | 48 | ||||
-rw-r--r-- | default_arch.patch | 21 | ||||
-rw-r--r-- | fix_path.patch | 12 | ||||
-rw-r--r-- | python_version.patch | 69 |
6 files changed, 185 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..99e0207ff2fb --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = vmdebootstrap + pkgdesc = debootstrap installs a basic Debian system into a directory, for use with chroot(8). vmdeboostrap is a wrapper around it to install Debian into a disk image, which can be used with a virtual machine (such as KVM). + pkgver = 1.6 + pkgrel = 1 + url = http://liw.fi/vmdebootstrap/ + arch = i686 + arch = x86_64 + license = GPL3 + depends = debootstrap + depends = syslinux + depends = qemu + depends = parted + depends = multipath-tools + depends = python2-cliapp + depends = distro-info + source = http://git.liw.fi/cgi-bin/cgit/cgit.cgi/vmdebootstrap/snapshot/vmdebootstrap-1.6.tar.gz + source = python_version.patch + source = default_arch.patch + source = fix_path.patch + md5sums = 90dd5a8aff602273c76644dda166e3e7 + md5sums = 9ec42862d167c76139f453ed9651dd8e + md5sums = 3c3d9df067faa0d742011ad0943427e9 + md5sums = 806fd64966193e9ae0fb4ab56ab7f3f9 + +pkgname = vmdebootstrap + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..c151098473f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ + +.BUILDINFO +.MTREE +.PKGINFO + +pkg/ +src/ +*.pkg.tar.xz +*.tar.gz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..9c5c0ca021bf --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Andreas Grapentin <andreas@grapentin.org> +pkgname=vmdebootstrap +pkgver=1.6 +pkgrel=1 +pkgdesc="debootstrap installs a basic Debian system into a directory, for use with chroot(8). vmdeboostrap is a wrapper around it to install Debian into a disk image, which can be used with a virtual machine (such as KVM)." +arch=('i686' 'x86_64') + +url="http://liw.fi/vmdebootstrap/" +license=('GPL3') + +depends=('debootstrap' + 'syslinux' + 'qemu' + 'parted' + 'multipath-tools' + 'python2-cliapp' + 'distro-info') + +source=("http://git.liw.fi/cgi-bin/cgit/cgit.cgi/$pkgname/snapshot/$pkgname-$pkgver.tar.gz" + 'python_version.patch' + 'default_arch.patch' + 'fix_path.patch') + +md5sums=('90dd5a8aff602273c76644dda166e3e7' + '9ec42862d167c76139f453ed9651dd8e' + '3c3d9df067faa0d742011ad0943427e9' + '806fd64966193e9ae0fb4ab56ab7f3f9') + + +prepare() { + cd "$pkgname-$pkgver" + + patch -p1 < ../python_version.patch + patch -p1 < ../default_arch.patch + patch -p1 < ../fix_path.patch +} + +package() { + cd "$pkgname-$pkgver" + + python2 setup.py install --root="${pkgdir}/" --optimize=1 + mkdir -p ${pkgdir}/usr/share/doc/$pkgname + cp COPYING ${pkgdir}/usr/share/doc/$pkgname + cp README ${pkgdir}/usr/share/doc/$pkgname + mkdir -p ${pkgdir}/usr/share/licenses/$pkgname + cd ${pkgdir}/usr/share/licenses/$pkgname + ln -s ../../doc/$pkgname/COPING COPYING +} diff --git a/default_arch.patch b/default_arch.patch new file mode 100644 index 000000000000..dd2cef35a33c --- /dev/null +++ b/default_arch.patch @@ -0,0 +1,21 @@ +diff -rupN vmdebootstrap-1.6/bin/vmdebootstrap vmdebootstrap-1.6.new/bin/vmdebootstrap +--- vmdebootstrap-1.6/bin/vmdebootstrap 2016-08-11 23:13:45.000000000 +0200 ++++ vmdebootstrap-1.6.new/bin/vmdebootstrap 2016-08-23 14:59:27.576772785 +0200 +@@ -19,6 +19,7 @@ + # pylint: disable=wrong-import-order + + import os ++import re + import sys + import time + import shutil +@@ -66,7 +67,8 @@ class VmDebootstrap(cliapp.Application): + + def add_settings(self): + # deliberately long lines for clarity. +- default_arch = subprocess.check_output(["dpkg", "--print-architecture"]).decode('utf-8').strip() ++ arch = subprocess.check_output(['uname', '-m']).decode('utf-8').strip() ++ default_arch = 'amd64' if arch == 'x86_64' else 'i386' if re.match('i[3-8]86', arch) else arch + + self.settings.boolean(['verbose'], 'report what is going on') + self.settings.string(['image'], 'put created disk image in FILE', metavar='FILE') diff --git a/fix_path.patch b/fix_path.patch new file mode 100644 index 000000000000..5fb59e51323e --- /dev/null +++ b/fix_path.patch @@ -0,0 +1,12 @@ +diff -rupN vmdebootstrap-1.6/bin/vmdebootstrap vmdebootstrap-1.6.new/bin/vmdebootstrap +--- vmdebootstrap-1.6/bin/vmdebootstrap 2016-08-11 23:13:45.000000000 +0200 ++++ vmdebootstrap-1.6.new/bin/vmdebootstrap 2016-08-23 16:18:06.949870328 +0200 +@@ -44,6 +44,8 @@ __version__ = '1.6' + # pylint: disable=invalid-name,line-too-long + # pylint: disable=missing-docstring,too-many-statements + ++os.environ['PATH'] = '/bin:/sbin:/usr/bin:/usr/sbin:' + os.environ['PATH'] ++ + + class VmDebootstrap(cliapp.Application): # pylint: disable=too-many-public-methods + diff --git a/python_version.patch b/python_version.patch new file mode 100644 index 000000000000..70d1e4b3a3e5 --- /dev/null +++ b/python_version.patch @@ -0,0 +1,69 @@ +diff -rupN vmdebootstrap-1.6/bin/vmdebootstrap vmdebootstrap-1.6.new/bin/vmdebootstrap +--- vmdebootstrap-1.6/bin/vmdebootstrap 2016-08-11 23:13:45.000000000 +0200 ++++ vmdebootstrap-1.6.new/bin/vmdebootstrap 2016-08-23 12:34:23.979524142 +0200 +@@ -1,4 +1,4 @@ +-#! /usr/bin/python ++#! /usr/bin/python2 + # Copyright 2011-2013 Lars Wirzenius + # Copyright 2012 Codethink Limited + # Copyright 2014-2015 Neil Williams <codehelp@debian.org> +diff -rupN vmdebootstrap-1.6/doc/conf.py vmdebootstrap-1.6.new/doc/conf.py +--- vmdebootstrap-1.6/doc/conf.py 2016-08-11 23:13:45.000000000 +0200 ++++ vmdebootstrap-1.6.new/doc/conf.py 2016-08-23 12:34:38.249608970 +0200 +@@ -55,7 +55,7 @@ copyright = '2015 Neil Williams' + # built documents. + # + # The short X.Y version. +-version = subprocess.Popen(['python', 'setup.py', '-V'], cwd=r'..', stdout=subprocess.PIPE).stdout.read().rstrip() ++version = subprocess.Popen(['python2', 'setup.py', '-V'], cwd=r'..', stdout=subprocess.PIPE).stdout.read().rstrip() + # The full version, including alpha/beta/rc tags. + release = version + +diff -rupN vmdebootstrap-1.6/examples/lava-submit.py vmdebootstrap-1.6.new/examples/lava-submit.py +--- vmdebootstrap-1.6/examples/lava-submit.py 2016-08-11 23:13:45.000000000 +0200 ++++ vmdebootstrap-1.6.new/examples/lava-submit.py 2016-08-23 12:34:14.232799577 +0200 +@@ -1,4 +1,4 @@ +-#! /usr/bin/python ++#! /usr/bin/python2 + # -*- coding: utf-8 -*- + # + # lava-submit.py +diff -rupN vmdebootstrap-1.6/man/conf.py vmdebootstrap-1.6.new/man/conf.py +--- vmdebootstrap-1.6/man/conf.py 2016-08-11 23:13:45.000000000 +0200 ++++ vmdebootstrap-1.6.new/man/conf.py 2016-08-23 12:33:56.296026448 +0200 +@@ -49,7 +49,7 @@ copyright = u'2015, Neil Williams' + # built documents. + # + # The short X.Y version. +-version = subprocess.Popen(['python', 'setup.py', '-V'], cwd=r'..', stdout=subprocess.PIPE).stdout.read() ++version = subprocess.Popen(['python2', 'setup.py', '-V'], cwd=r'..', stdout=subprocess.PIPE).stdout.read() + # The full version, including alpha/beta/rc tags. + release = version + +diff -rupN vmdebootstrap-1.6/setup.py vmdebootstrap-1.6.new/setup.py +--- vmdebootstrap-1.6/setup.py 2016-08-11 23:13:45.000000000 +0200 ++++ vmdebootstrap-1.6.new/setup.py 2016-08-23 12:33:34.665898221 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python2 + # -*- coding: utf-8 -*- + # + # setup.py +diff -rupN vmdebootstrap-1.6/vmextract.py vmdebootstrap-1.6.new/vmextract.py +--- vmdebootstrap-1.6/vmextract.py 2016-08-11 23:13:45.000000000 +0200 ++++ vmdebootstrap-1.6.new/vmextract.py 2016-08-23 12:33:34.665898221 +0200 +@@ -1,4 +1,4 @@ +-#! /usr/bin/python ++#! /usr/bin/python2 + # -*- coding: utf-8 -*- + # + # Copyright 2015 Neil Williams <codehelp@debian.org> +diff -rupN vmdebootstrap-1.6/vmsquashtar.py vmdebootstrap-1.6.new/vmsquashtar.py +--- vmdebootstrap-1.6/vmsquashtar.py 2016-08-11 23:13:45.000000000 +0200 ++++ vmdebootstrap-1.6.new/vmsquashtar.py 2016-08-23 12:33:34.665898221 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python2 + # -*- coding: utf-8 -*- + # + # vmsquash-tar.py |