diff --git a/src/binfmt-support/.SRCINFO b/src/binfmt-support/.SRCINFO new file mode 100644 index 0000000..c774557 --- /dev/null +++ b/src/binfmt-support/.SRCINFO @@ -0,0 +1,18 @@ +# Generated by mksrcinfo v8 +# 四 8月 11 02:43:34 UTC 2016 +pkgbase = binfmt-support + pkgdesc = register interpreters for various binary formats + pkgver = 2.1.6 + pkgrel = 1 + url = http://packages.debian.org/en/sid/binfmt-support + arch = i686 + arch = x86_64 + license = GPL + depends = libpipeline + source = http://ftp.de.debian.org/debian/pool/main/b/binfmt-support/binfmt-support_2.1.6.orig.tar.gz + source = binfmt-support.service + md5sums = b3389857d88f35c93b45f99a19a24698 + md5sums = 72df6ac607ebfe9eface932b76b66291 + +pkgname = binfmt-support + diff --git a/src/binfmt-support/PKGBUILD b/src/binfmt-support/PKGBUILD new file mode 100644 index 0000000..133a8dc --- /dev/null +++ b/src/binfmt-support/PKGBUILD @@ -0,0 +1,26 @@ +pkgname=binfmt-support +pkgver=2.1.6 +pkgrel=1 +pkgdesc="register interpreters for various binary formats" +arch=(i686 x86_64) +url="http://packages.debian.org/en/sid/binfmt-support" +license=('GPL') +depends=('libpipeline') +makedepends=() +source=(http://ftp.de.debian.org/debian/pool/main/b/binfmt-support/binfmt-support_$pkgver.orig.tar.gz + binfmt-support.service) +md5sums=('b3389857d88f35c93b45f99a19a24698' + '72df6ac607ebfe9eface932b76b66291') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --libexecdir=/usr/lib --sbindir=/usr/bin --localstatedir=/var + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" install + install -dm0755 $pkgdir/var/lib/binfmts + install -Dm755 $srcdir/binfmt-support.service $pkgdir/usr/lib/systemd/system/binfmt-support.service +} diff --git a/src/binfmt-support/binfmt-support.service b/src/binfmt-support/binfmt-support.service new file mode 100644 index 0000000..b7035d8 --- /dev/null +++ b/src/binfmt-support/binfmt-support.service @@ -0,0 +1,17 @@ +[Unit] +Description=Enable support for additional binary formats. Java, python, etc. +Documentation=man:update-binfmts(8) + +[Service] +Type=oneshot +ExecStart=/usr/bin/update-binfmts --enable +ExecStop=/usr/bin/update-binfmts --disable +KillMode=process +Restart=no +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target + +# This service file writes "enabled" to /proc/sys/fs/binfmt_misc/status, +# and registers all binfmt specifications in /var/lib/binfmts (default) diff --git a/src/qemu-user-static/.SRCINFO b/src/qemu-user-static/.SRCINFO new file mode 100644 index 0000000..93cc2bb --- /dev/null +++ b/src/qemu-user-static/.SRCINFO @@ -0,0 +1,17 @@ +# Generated by mksrcinfo v8 +# Thu Dec 29 12:19:52 UTC 2016 +pkgbase = qemu-user-static + pkgdesc = A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation, statically linked. + pkgver = 2.8 + pkgrel = 1 + url = http://wiki.qemu.org/Index.html + arch = i686 + arch = x86_64 + license = GPL2 + license = LGPL2.1 + optdepends = binfmt-support: to allow handling foreign ELF binaries and executing them via qemu + source = http://ftp.debian.org/debian/pool/main/q/qemu/qemu-user-static_2.8+dfsg-1_i386.deb + sha1sums = 371671a57e287c3363b6b39bcc9fcc9e958b4518 + +pkgname = qemu-user-static + diff --git a/src/qemu-user-static/PKGBUILD b/src/qemu-user-static/PKGBUILD new file mode 100644 index 0000000..177ee51 --- /dev/null +++ b/src/qemu-user-static/PKGBUILD @@ -0,0 +1,93 @@ +# Maintainer: Sergio Tridente +# Contributor: Steven Noonan + +pkgname=qemu-user-static +pkgver=2.8 +pkgrel=1 +pkgdesc="A generic and open source processor emulator which achieves a good emulation speed by using dynamic translation, statically linked." +arch=('i686' 'x86_64') +license=('GPL2' 'LGPL2.1') +url="http://wiki.qemu.org/Index.html" +depends=() +optdepends=('binfmt-support: to allow handling foreign ELF binaries and executing them via qemu') +conflicts=() +_arch=i386 +[ "$CARCH" = 'x86_64' ] && _arch=amd64 +_debsrc=${pkgname}_${pkgver}+dfsg-1_${_arch}.deb +source=(http://ftp.debian.org/debian/pool/main/q/qemu/${_debsrc}) +sha1sums=('371671a57e287c3363b6b39bcc9fcc9e958b4518') +[ "$CARCH" = 'i686' ] && sha1sums=('d4907e884ce34bb33a52608a7d110e69115e252d') + +prepare() { + cd "$srcdir" + ar p ${_debsrc} data.tar.xz | bsdtar xf - +} + +package() { + cd "$pkgdir" + mkdir -p "$pkgdir"/usr/bin/ + mkdir -p "$pkgdir"/usr/share/man/ + mkdir -p "$pkgdir"/var/lib/binfmts/ + + cp "$srcdir"/usr/bin/* "$pkgdir"/usr/bin/ + cp "$srcdir"/usr/share/man/man1 "$pkgdir"/usr/share/man/ -r + + create_binfmts +} + +create_binfmts() { + aarch64_magic='\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7' + aarch64_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff' + alpha_magic='\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90' + alpha_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff' + arm_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00' + arm_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff' + armeb_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28' + armeb_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff' + cris_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x4c\x00' + cris_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff' + m68k_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04' + m68k_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff' + microblaze_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xba\xab' + microblaze_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff' + mips_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08' + mips_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff' + mipsel_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00' + mipsel_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff' + ppc_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14' + ppc_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff' + ppc64_magic='\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15' + ppc64_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff' + ppc64abi32_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15' + ppc64abi32_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff' + s390x_magic='\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16' + s390x_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff' + sh4_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00' + sh4_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff' + sh4eb_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a' + sh4eb_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff' + sparc_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02' + sparc_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff' + sparc32plus_magic='\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x12' + sparc32plus_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff' + sparc64_magic='\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2b' + sparc64_mask='\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff' + + # Drop support for emulating amd64 on i386, http://bugs.debian.org/604712 + fmts="aarch64 alpha arm armeb cris m68k microblaze mips mipsel ppc ppc64 ppc64abi32 s390x sh4 sh4eb sparc sparc32plus sparc64" + + for fmt in $fmts ; do + eval "magic=\"\$${fmt}_magic\" mask=\"\$${fmt}_mask\"" + cat >> "${pkgdir}/var/lib/binfmts/qemu-$fmt" << EOF +qemu-user-static +magic +0 +$magic +$mask +/usr/bin/qemu-$fmt-static + +yes + +EOF + done +}