Skip to content

Commit

Permalink
Increase version number to 1.2.3-0
Browse files Browse the repository at this point in the history
  • Loading branch information
gilles-degols committed Apr 8, 2019
1 parent bb5ce23 commit e5b5450
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ sudo mongofs-mount /mnt/data
We assume that you already have a MongoDB installation, otherwise, follow the procedure described here: https://docs.mongodb.com/manual/installation/
```
git clone [email protected]:gilles-degols/mongofs.git
yum -y install python36u fuse fuse-libs
yum -y install python36 fuse fuse-libs
python3 -m ensurepip --default-pip
python3 -m pip install --upgrade pip
python3 -m pip uninstall fuse # Otherwise conflicts can happen with fusepy
Expand Down
18 changes: 13 additions & 5 deletions spec/mongofs.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
%define debug_package %{nil}
%global _python_bytecompile_errors_terminate_build 0
%define __python /usr/bin/python3.6

%{!?_release: %define _version 1.2.2 }
%{!?_release: %define _version 1.2.3 }
%{!?_release: %define _release 0 }
# %{!?_src: %define _src %{_version}-%{_release} }

# Following line is needed if you compile
%{!?_src: %define _src %{_version}-%{_release} }

Name: mongofs
Version: %{_version}
Expand Down Expand Up @@ -38,7 +41,6 @@ getent passwd mongofs >/dev/null || useradd -r -g mongofs -d / -s /sbin/nologin

%install
rm -rf ${RPM_BUILD_ROOT}

install -d -m 0755 ${RPM_BUILD_ROOT}/usr/lib/mongofs
install -d -m 0755 ${RPM_BUILD_ROOT}/usr/bin
cp -r src/ ${RPM_BUILD_ROOT}/usr/lib/mongofs
Expand All @@ -53,7 +55,11 @@ chmod +x ${RPM_BUILD_ROOT}/usr/lib/mongofs/run

%define VPATH ${RPM_BUILD_ROOT}/usr/lib/mongofs/environment
%define REQUIREMENTS_PATH requirements.txt
/usr/bin/python3.6 -m pip install virtualenv

# If you upgrade from pip 8.1.2 to 19.0.3, you will get a nice bug below, which only happens in a spec file for whatever
# reason. So we assume that we have the virtualenv installed (should always be the case)
# /usr/bin/python3.6 -m pip install virtualenv

/usr/bin/python3.6 -m virtualenv --python=python3.6 %{VPATH}/virtualenv
/usr/bin/python3.6 -m virtualenv --python=python3.6 --relocatable --distribute %{VPATH}/virtualenv

Expand All @@ -72,7 +78,6 @@ find %{VPATH}/virtualenv/lib/python3.6/site-packages/ -type f -exec sed -i "s|%{
find %{VPATH}/virtualenv -name '*.py[co]' -delete
sed -i "s|%{VPATH}|../..|g" %{VPATH}/virtualenv/bin/*


%clean
rm -rf ${RPM_BUILD_ROOT}

Expand All @@ -83,6 +88,9 @@ rm -rf ${RPM_BUILD_ROOT}
%config /etc/mongofs/mongofs.json

%changelog
* Mon Apr 08 2019 Gilles Degols - 1.2.3-0
- Fix the lock system of files between nodes

* Sat Jan 19 2019 Gilles Degols - 1.2.2-0
- Proper RPM packaging and fix unit tests

Expand Down
2 changes: 1 addition & 1 deletion src/main.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def lock(self, path, fh, cmd, lock):
lock_type = lock_type_pointer[0]

if cmd == fcntl.F_GETLK:
blocking = test_lock_and_get_first_blocking(filepath=path, lock={'type': lock_type})
blocking = self.mongo.test_lock_and_get_first_blocking(filepath=path, lock={'type': lock_type})
if blocking is None:
# We modify the pointer by setting F_UNLCK
lock_type_pointer[0] = fcntl.F_UNLCK
Expand Down

0 comments on commit e5b5450

Please sign in to comment.