Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
From 63db7e5ce57d2c62b89de8bcb2bf7e03d153e600 Mon Sep 17 00:00:00 2001
From: Aidan Harris <mail@aidanharris.io>
Date: Mon, 8 May 2017 07:38:55 +0100
Subject: [PATCH 1/1] Hacks and Bug Fixes
* Added python-raven to dependencies along with python-setuptools as this is a runtime dependency not just a makedependency.
* Patched the requirements.txt with sed so that gitfs doesn't complain about the newer versions of python packages. I don't know if this has any adverse side effects but seems to be working so far.
* Added a .install file that creates the '/var/lib/gitfs' directory, chowns it as 'root:user' with 775 permissions so that gitfs can be used by regular users (provided 'user_allow_other' is uncommented in /etc/fuse.conf)
---
.SRCINFO | 6 +++---
PKGBUILD | 8 +++++---
gitfs.install | 10 ++++++++++
3 files changed, 18 insertions(+), 6 deletions(-)
create mode 100644 gitfs.install
diff --git a/.SRCINFO b/.SRCINFO
index 8266f23..be95f93 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,16 @@
-# Generated by mksrcinfo v8
-# Thu Dec 8 17:47:17 UTC 2016
pkgbase = gitfs
pkgdesc = Version controlled file system
pkgver = 0.4.5.1
pkgrel = 1
url = http://www.presslabs.com/gitfs/
+ install = gitfs.install
arch = any
license = Apache
- makedepends = python-setuptools
depends = python-atomiclong
depends = python-fusepy
depends = python-pygit2>=0.24.0
+ depends = python-setuptools
+ depends = python-raven
source = gitfs-0.4.5.1.tar.gz::https://github.com/PressLabs/gitfs/archive/0.4.5.1.tar.gz
sha256sums = 6049fd81182d9172e861d922f3e2660f76366f85f47f4c2357f769d24642381c
diff --git a/PKGBUILD b/PKGBUILD
index bed2e85..6faf673 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,13 +7,15 @@ pkgdesc="Version controlled file system"
arch=('any')
url="http://www.presslabs.com/gitfs/"
license=('Apache')
-depends=('python-atomiclong' 'python-fusepy' 'python-pygit2>=0.24.0')
-makedepends=('python-setuptools')
+depends=('python-atomiclong' 'python-fusepy' 'python-pygit2>=0.24.0' 'python-setuptools' 'python-raven')
source=($pkgname-$pkgver.tar.gz::https://github.com/PressLabs/$pkgname/archive/$pkgver.tar.gz)
sha256sums=('6049fd81182d9172e861d922f3e2660f76366f85f47f4c2357f769d24642381c')
+install="gitfs.install"
package() {
cd $pkgname-$pkgver
-
+ sed -i 's/fusepy==/fusepy>=/g' requirements.txt
+ sed -i 's/pygit2==/pygit2>=/g' requirements.txt
+ sed -i 's/raven==/raven>=/g' requirements.txt
python setup.py install --root="${pkgdir}" --optimize=1
}
diff --git a/gitfs.install b/gitfs.install
new file mode 100644
index 0000000..57c17db
--- /dev/null
+++ b/gitfs.install
@@ -0,0 +1,10 @@
+post_install() {
+ post_upgrade
+ echo ">>> Uncomment 'user_allow_other' in /etc/fuse.conf to mount as a regular user"
+}
+
+post_upgrade() {
+ mkdir -p /var/lib/gitfs
+ chown -R root:users /var/lib/gitfs
+ chmod -R 775 /var/lib/gitfs
+}
--
2.12.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment