diff options
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 49 | ||||
-rw-r--r-- | bitmsglib_location.patch | 15 | ||||
-rw-r--r-- | pybitmessage.profile | 39 |
4 files changed, 55 insertions, 56 deletions
@@ -1,8 +1,8 @@ # Generated by mksrcinfo v8 -# Fri Feb 16 01:10:36 UTC 2018 +# Wed Feb 28 14:43:19 UTC 2018 pkgbase = pybitmessage-dev-git pkgdesc = Decentralized and trustless P2P communications protocol for sending encrypted messages to another person or to many subscribers - pkgver = 0.6.3.2.r0.g634a49cd + pkgver = 0.6.3.2.r16.g0da0c109 pkgrel = 1 url = https://github.com/Bitmessage/PyBitmessage arch = i686 @@ -15,9 +15,9 @@ pkgbase = pybitmessage-dev-git optdepends = alsa-utils: WAV sounds support provides = pybitmessage source = pybitmessage-dev-git::git+https://github.com/Bitmessage/PyBitmessage.git#branch=v0.6 - source = bitmsglib_location.patch + source = pybitmessage.profile sha256sums = SKIP - sha256sums = 0759dbb2dab909940fb5f4c4121c620351efdedb296a335155f535540dfdd8f2 + sha256sums = 4029157df5179a487107ffb63358fc15c77e1395a765bbd957e89468669b414d pkgname = pybitmessage-dev-git @@ -2,7 +2,7 @@ # Maintainer: David Parrish <BM-2cU1Bk3fXVo9VrGpo2YQFJ1it31gSuAy5j> pkgname=pybitmessage-dev-git -pkgver=0.6.3.2.r0.g634a49cd +pkgver=0.6.3.2.r16.g0da0c109 pkgrel=1 pkgdesc="Decentralized and trustless P2P communications protocol for sending encrypted messages to another person or to many subscribers" arch=('i686' 'x86_64') @@ -12,63 +12,38 @@ optdepends=('mpg123: MP3 sounds support' url="https://github.com/Bitmessage/PyBitmessage" license=('MIT') source=("${pkgname}::git+https://github.com/Bitmessage/PyBitmessage.git#branch=v0.6" - "bitmsglib_location.patch") + "pybitmessage.profile") sha256sums=('SKIP' - '0759dbb2dab909940fb5f4c4121c620351efdedb296a335155f535540dfdd8f2') + '4029157df5179a487107ffb63358fc15c77e1395a765bbd957e89468669b414d') provides=('pybitmessage') pkgver() { - cd "$pkgname" + cd "$pkgname" || exit git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } -prepare() { - msg 'Creating shell executable' - echo -e '#!/bin/sh\ncd /usr/share/'${pkgname}'\nexec python2 bitmessagemain.py' > pybitmessage.sh - chmod +x pybitmessage.sh - - msg 'Patching bitmsglib location...' - patch -d "$pkgname" -p1 <bitmsglib_location.patch - - cd "$pkgname" - - msg 'Fixing Python version...' - find . -type f -print0 | xargs -0 sed -i 's#/usr/bin/python$#/usr/bin/python2#g' - find . -type f -print0 | xargs -0 sed -i 's#/usr/bin/env python$#/usr/bin/env python2#g' -} - build() { - cd "$srcdir/$pkgname/src/bitmsghash" - make + cd "$srcdir/$pkgname" || exit + python2 setup.py build } package() { - cd "$pkgname" - - msg 'Installing shared files...' - mkdir -p "$pkgdir"/usr/share/$pkgname - cp -R src/* "$pkgdir"/usr/share/$pkgname - # exclude bitmsghash.so and bitmsghash.o - rm "$pkgdir"/usr/share/$pkgname/bitmsghash/bitmsghash.so - rm "$pkgdir"/usr/share/$pkgname/bitmsghash/bitmsghash.o - - msg 'Installing lib files...' - mkdir -p "$pkgdir"/usr/lib/$pkgname - cp -R src/bitmsghash/bitmsghash.so "$pkgdir"/usr/lib/$pkgname + cd "$pkgname" || exit + python2 setup.py install --root="$pkgdir" --optimize=1 msg 'Installing desktop icons...' - install -D -m644 desktop/pybitmessage.desktop "$pkgdir/usr/share/applications/pybitmessage.desktop" install -D -m644 src/images/can-icon-24px.png "$pkgdir/usr/share/icons/hicolor/24x24/apps/pybitmessage.png" install -D -m644 desktop/can-icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/pybitmessage.svg" install -D -m644 desktop/can-icon.svg "$pkgdir/usr/share/pixmaps/pybitmessage.svg" - msg 'Installing executable...' - install -D -m755 $srcdir/pybitmessage.sh "$pkgdir/usr/bin/pybitmessage" - msg 'Installing man page...' mkdir -p "$pkgdir/usr/share/man/man1" install -m644 man/pybitmessage.1.gz "$pkgdir/usr/share/man/man1" + msg 'Installing Firejail profile...' + mkdir -p "$pkgdir/etc/firejail" + install -m644 "$srcdir/pybitmessage.profile" "$pkgdir/etc/firejail" + msg 'Installing license...' mkdir -p "$pkgdir/usr/share/licenses/$pkgname" install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" diff --git a/bitmsglib_location.patch b/bitmsglib_location.patch deleted file mode 100644 index e88c9121b25c..000000000000 --- a/bitmsglib_location.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/proofofwork.py b/src/proofofwork.py -index df6ed295..a033e8d1 100644 ---- a/src/proofofwork.py -+++ b/src/proofofwork.py -@@ -270,7 +270,9 @@ def init(): - bso = None - else: - try: -- bso = ctypes.CDLL(os.path.join(paths.codePath(), "bitmsghash", bitmsglib)) -+ # Modified by Arch Linux PKGBUILD -+ # https://aur.archlinux.org/packages/pybitmessage-git/ -+ bso = ctypes.CDLL(os.path.join("/usr/lib/pybitmessage-git", bitmsglib)) - except OSError: - import glob - try: diff --git a/pybitmessage.profile b/pybitmessage.profile new file mode 100644 index 000000000000..999dd1f7f169 --- /dev/null +++ b/pybitmessage.profile @@ -0,0 +1,39 @@ +# Firejail profile for PyBitmessage +# This file is overwritten after every install/update +# Persistent local customizations +include /etc/firejail/pybitmessage.local +# Persistent global definitions +include /etc/firejail/globals.local + +noblacklist ${HOME}/.config/PyBitmessage +noblacklist ${HOME}/PyBitmessage/src/bitmessagemain.py + +include /etc/firejail/disable-common.inc +include /etc/firejail/disable-devel.inc +include /etc/firejail/disable-passwdmgr.inc +include /etc/firejail/disable-programs.inc + +mkdir ~/.config/PyBitmessage +whitelist ~/.config/PyBitmessage +include /etc/firejail/whitelist-common.inc + +caps.drop all +netfilter +no3d +nodvd +nogroups +nonewprivs +noroot +notv +novideo +protocol unix,inet,inet6 +seccomp +shell none + +disable-mnt +private-dev +private-bin pybitmessage,python,python2,python2.7,sh,ldconfig +private-tmp + +noexec ${HOME} +noexec /tmp |