qasim 0.1.11.dev.2014102811
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +31 -0
- data/Gemfile +7 -0
- data/LICENSE-GPL-3 +674 -0
- data/Makefile +180 -0
- data/README.md +81 -0
- data/Rakefile +1 -0
- data/TODO.md +28 -0
- data/bin/qasim-cli +89 -0
- data/bin/qasim-gui +300 -0
- data/conf/config +2 -0
- data/conf/default.map +32 -0
- data/conf/qasim.desktop +13 -0
- data/data/icons/qasim.128.png +0 -0
- data/data/icons/qasim.16.png +0 -0
- data/data/icons/qasim.256.png +0 -0
- data/data/icons/qasim.32.png +0 -0
- data/data/icons/qasim.64.png +0 -0
- data/data/icons/qasim.png +0 -0
- data/data/icons/qasim.svg +192 -0
- data/data/text/authors.html +7 -0
- data/data/text/gpl-3.0-standalone.html +694 -0
- data/data/text/thanks.html +0 -0
- data/debian/changelog +73 -0
- data/debian/compat +1 -0
- data/debian/control +13 -0
- data/debian/copyright +38 -0
- data/debian/dirs +3 -0
- data/debian/docs +0 -0
- data/debian/rules +80 -0
- data/debian/source/format +1 -0
- data/demo.map +29 -0
- data/examples/config +2 -0
- data/examples/default.map +32 -0
- data/lib/qasim.rb +11 -0
- data/lib/qasim/config.rb +56 -0
- data/lib/qasim/configold.rb +123 -0
- data/lib/qasim/constants.rb +11 -0
- data/lib/qasim/map.rb +225 -0
- data/lib/qasim/qasim.qrc +8 -0
- data/lib/qasim/ui.rb +7 -0
- data/lib/qasim/ui/about.rb +58 -0
- data/lib/qasim/ui/about.ui +192 -0
- data/lib/qasim/ui/listmaps.ui +59 -0
- data/lib/qasim/ui/preferences.rb +12 -0
- data/lib/qasim/ui/preferences.ui +90 -0
- data/lib/qasim/version.rb +5 -0
- data/man/qasim-cli.1 +98 -0
- data/man/qasim-gui.1 +98 -0
- data/man/sshfs-mapper.1 +98 -0
- data/mapparser.y +155 -0
- data/qasim.gemspec +34 -0
- data/sshfs-mapper.completion +24 -0
- data/sshfs-mapper.sh +253 -0
- metadata +147 -0
File without changes
|
data/debian/changelog
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
qasim (0.1.10) unstable; urgency=medium
|
2
|
+
|
3
|
+
* qasim-gui: update project dependencies upon ruby & gems.
|
4
|
+
* Added base files for Gem packaging & distribution.
|
5
|
+
* Makefile: fix installation rules for icons & ui library.
|
6
|
+
* ui/preferences: Changed class name MapDialog -> Preferences.
|
7
|
+
* ui: Changed window icons.
|
8
|
+
* Added base for preferences dialog.
|
9
|
+
* Added about dialog.
|
10
|
+
* data: Move all UI text as resource files.
|
11
|
+
|
12
|
+
-- Glenn Y. Rolland <glenux@glenux.net> Fri, 09 May 2014 07:31:16 +0200
|
13
|
+
|
14
|
+
qasim (0.1.9) unstable; urgency=low
|
15
|
+
|
16
|
+
* qasim-gui: Use /proc/ instead of kill to detect other processes.
|
17
|
+
|
18
|
+
-- Glenn Y. Rolland <glenux@glenux.net> Tue, 18 Oct 2011 16:45:31 +0200
|
19
|
+
|
20
|
+
qasim (0.1.8) unstable; urgency=low
|
21
|
+
|
22
|
+
* qasim-gui: Another fix in locker process liveness testing
|
23
|
+
|
24
|
+
-- Glenn Y. Rolland <glenux@glenux.net> Fri, 16 Sep 2011 12:08:58 +0200
|
25
|
+
|
26
|
+
qasim (0.1.7) unstable; urgency=low
|
27
|
+
|
28
|
+
* qasim-gui: test locker process liveness
|
29
|
+
|
30
|
+
-- Glenn Y. Rolland <glenux@glenux.net> Sat, 10 Sep 2011 13:58:21 +0200
|
31
|
+
|
32
|
+
qasim (0.1.6) unstable; urgency=low
|
33
|
+
|
34
|
+
* qasim-gui: handle QIcon::fromTheme NoMethodError exception when needed.
|
35
|
+
* qasim-gui: added single instance lock.
|
36
|
+
|
37
|
+
-- Glenn Y. Rolland <glenux@glenux.net> Wed, 07 Sep 2011 01:08:48 +0200
|
38
|
+
|
39
|
+
qasim (0.1.5) unstable; urgency=low
|
40
|
+
|
41
|
+
* map: Added missing require for fileutils.
|
42
|
+
|
43
|
+
-- Glenn ROLLAND <glenux@fr.st> Tue, 09 Aug 2011 22:46:33 +0200
|
44
|
+
|
45
|
+
qasim (0.1.4) unstable; urgency=low
|
46
|
+
|
47
|
+
* Fixed localpath bug.
|
48
|
+
|
49
|
+
-- Glenn ROLLAND <glenux@fr.st> Tue, 09 Aug 2011 22:35:10 +0200
|
50
|
+
|
51
|
+
qasim (0.1.3) unstable; urgency=low
|
52
|
+
|
53
|
+
* Create mountpoint if non-existant.
|
54
|
+
|
55
|
+
-- Glenn Y. Rolland <glenux@glenux.net> Sun, 07 Aug 2011 17:43:56 +0200
|
56
|
+
|
57
|
+
qasim (0.1.2) unstable; urgency=low
|
58
|
+
|
59
|
+
* Disabled rdebug & added another missing dependency.
|
60
|
+
|
61
|
+
-- Glenn Y. Rolland <glenux@glenux.net> Sun, 07 Aug 2011 17:06:15 +0200
|
62
|
+
|
63
|
+
qasim (0.1.1) unstable; urgency=low
|
64
|
+
|
65
|
+
* Added missing dependencies (libqt4-ruby & ruby)
|
66
|
+
|
67
|
+
-- Glenn Y. Rolland <glenux@glenux.net> Sun, 07 Aug 2011 16:53:20 +0200
|
68
|
+
|
69
|
+
qasim (0.1) unstable; urgency=low
|
70
|
+
|
71
|
+
* Initial version.
|
72
|
+
|
73
|
+
-- Glenn Y. Rolland <glenux@glenux.net> Fri, 29 Jul 2011 17:01:24 +0200
|
data/debian/compat
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
6
|
data/debian/control
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
Source: qasim
|
2
|
+
Section: net
|
3
|
+
Priority: extra
|
4
|
+
Maintainer: Glenn ROLLAND <glenux@glenux.net>
|
5
|
+
Build-Depends: debhelper (>= 5)
|
6
|
+
Standards-Version: 3.7.2
|
7
|
+
|
8
|
+
Package: qasim
|
9
|
+
Architecture: all
|
10
|
+
Depends: ${shlibs:Depends}, ${misc:Depends}, sshfs (>= 1.7), ruby, libqt4-ruby, rubygems
|
11
|
+
Description: Easy mount solution for SSH filesystems.
|
12
|
+
Qasim is a front-end for sshfs, the filesystem client based on fuse
|
13
|
+
and ssh. It provides automating and global settings control for sshfs mounts.
|
data/debian/copyright
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
This package was debianized by Glenn ROLLAND <glenux@glenux.net> on
|
2
|
+
Sat, 15 Mar 2008 17:11:00 +0100.
|
3
|
+
|
4
|
+
It was downloaded from http://glenux.github.io/qasim
|
5
|
+
|
6
|
+
Upstream Author(s):
|
7
|
+
|
8
|
+
Glenn Y. Rolland <glenux@glenux.net>
|
9
|
+
|
10
|
+
Copyright:
|
11
|
+
|
12
|
+
Copyright (C) 2008-2014 Glenn Y. Rolland
|
13
|
+
|
14
|
+
License:
|
15
|
+
|
16
|
+
This package is free software; you can redistribute it and/or modify
|
17
|
+
it under the terms of the GNU General Public License as published by
|
18
|
+
the Free Software Foundation; either version 2 of the License, or
|
19
|
+
(at your option) any later version.
|
20
|
+
|
21
|
+
This package is distributed in the hope that it will be useful,
|
22
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
23
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
24
|
+
GNU General Public License for more details.
|
25
|
+
|
26
|
+
You should have received a copy of the GNU General Public License
|
27
|
+
along with this package; if not, write to the Free Software
|
28
|
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
29
|
+
|
30
|
+
On Debian systems, the complete text of the GNU General
|
31
|
+
Public License can be found in `/usr/share/common-licenses/GPL'.
|
32
|
+
|
33
|
+
The Debian packaging is (C) 2008, Glenn ROLLAND <glenux@glenux.net> and
|
34
|
+
is licensed under the GPL, see above.
|
35
|
+
|
36
|
+
|
37
|
+
# Please also look if there are files or directories which have a
|
38
|
+
# different copyright/license attached and list them here.
|
data/debian/dirs
ADDED
data/debian/docs
ADDED
File without changes
|
data/debian/rules
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
#!/usr/bin/make -f
|
2
|
+
# -*- makefile -*-
|
3
|
+
# Sample debian/rules that uses debhelper.
|
4
|
+
# This file was originally written by Joey Hess and Craig Small.
|
5
|
+
# As a special exception, when this file is copied by dh-make into a
|
6
|
+
# dh-make output file, you may use that output file without restriction.
|
7
|
+
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
8
|
+
|
9
|
+
# Uncomment this to turn on verbose mode.
|
10
|
+
export DH_VERBOSE=1
|
11
|
+
|
12
|
+
configure: configure-stamp
|
13
|
+
configure-stamp:
|
14
|
+
dh_testdir
|
15
|
+
# Add here commands to configure the package.
|
16
|
+
touch configure-stamp
|
17
|
+
|
18
|
+
build: build-stamp
|
19
|
+
|
20
|
+
build-stamp: configure-stamp
|
21
|
+
dh_testdir
|
22
|
+
# Add here commands to compile the package.
|
23
|
+
$(MAKE) DESTDIR=$(CURDIR)/debian/qasim build
|
24
|
+
#docbook-to-man debian/qasim.sgml > qasim.1
|
25
|
+
touch $@
|
26
|
+
|
27
|
+
clean:
|
28
|
+
dh_testdir
|
29
|
+
dh_testroot
|
30
|
+
rm -f build-stamp configure-stamp
|
31
|
+
# Add here commands to clean up after the build process.
|
32
|
+
$(MAKE) clean
|
33
|
+
dh_clean
|
34
|
+
|
35
|
+
install: build
|
36
|
+
dh_testdir
|
37
|
+
dh_testroot
|
38
|
+
dh_clean -k
|
39
|
+
dh_installdirs
|
40
|
+
# Add here commands to install the package into debian/qasim.
|
41
|
+
$(MAKE) DESTDIR=$(CURDIR)/debian/qasim install
|
42
|
+
|
43
|
+
|
44
|
+
# Build architecture-independent files here.
|
45
|
+
binary-indep: build install
|
46
|
+
# We have nothing to do by default.
|
47
|
+
|
48
|
+
# Build architecture-dependent files here.
|
49
|
+
binary-arch: build install
|
50
|
+
dh_testdir
|
51
|
+
dh_testroot
|
52
|
+
dh_installchangelogs
|
53
|
+
dh_installdocs
|
54
|
+
dh_installexamples
|
55
|
+
# dh_install
|
56
|
+
# dh_installmenu
|
57
|
+
# dh_installdebconf
|
58
|
+
# dh_installlogrotate
|
59
|
+
# dh_installemacsen
|
60
|
+
# dh_installpam
|
61
|
+
# dh_installmime
|
62
|
+
# dh_python
|
63
|
+
# dh_installinit
|
64
|
+
# dh_installcron
|
65
|
+
# dh_installinfo
|
66
|
+
dh_installman
|
67
|
+
dh_link
|
68
|
+
dh_strip
|
69
|
+
dh_compress
|
70
|
+
dh_fixperms
|
71
|
+
# dh_perl
|
72
|
+
# dh_makeshlibs
|
73
|
+
dh_installdeb
|
74
|
+
dh_shlibdeps
|
75
|
+
dh_gencontrol
|
76
|
+
dh_md5sums
|
77
|
+
dh_builddeb
|
78
|
+
|
79
|
+
binary: binary-indep binary-arch
|
80
|
+
.PHONY: build clean binary-indep binary-arch binary install configure
|
@@ -0,0 +1 @@
|
|
1
|
+
1.0
|
data/demo.map
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
server "daneel.glenux.net" {
|
3
|
+
user "glenux";
|
4
|
+
port 22;
|
5
|
+
automount true;
|
6
|
+
compress true;
|
7
|
+
|
8
|
+
map "Media" {
|
9
|
+
remote "/opt/media";
|
10
|
+
};
|
11
|
+
|
12
|
+
map "MediaSafe" {
|
13
|
+
remote "/home/media";
|
14
|
+
};
|
15
|
+
|
16
|
+
map "Documents" {
|
17
|
+
remote "/home/$USER";
|
18
|
+
};
|
19
|
+
|
20
|
+
map "Extra" {
|
21
|
+
remote "/opt";
|
22
|
+
};
|
23
|
+
|
24
|
+
map "DocumentsPapa" {
|
25
|
+
user "papa";
|
26
|
+
remote "/home/papa"
|
27
|
+
};
|
28
|
+
|
29
|
+
};
|
data/examples/config
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
#
|
2
|
+
# Remote host (where you connect)
|
3
|
+
#
|
4
|
+
# Example:
|
5
|
+
# REMOTE_HOST=www.example.com
|
6
|
+
#
|
7
|
+
|
8
|
+
#
|
9
|
+
# Remote port (where you connect)
|
10
|
+
#
|
11
|
+
# Example:
|
12
|
+
# REMOTE_PORT=22
|
13
|
+
#
|
14
|
+
|
15
|
+
#
|
16
|
+
# Remote user (who you are on the remote side)
|
17
|
+
#
|
18
|
+
# Example:
|
19
|
+
# REMOTE_USER=$USER
|
20
|
+
#
|
21
|
+
|
22
|
+
#
|
23
|
+
# Map local directory to remote share
|
24
|
+
#
|
25
|
+
# Syntax:
|
26
|
+
# MAP=directory_name remote_directory
|
27
|
+
#
|
28
|
+
# Examples:
|
29
|
+
# MAP=Config /home/$USER/Documents
|
30
|
+
# MAP=Documents /home/common/Config
|
31
|
+
#
|
32
|
+
|
data/lib/qasim.rb
ADDED
data/lib/qasim/config.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
|
2
|
+
require 'optparse'
|
3
|
+
require 'ostruct'
|
4
|
+
require 'pp'
|
5
|
+
require 'find'
|
6
|
+
|
7
|
+
#require 'rdebug/base'
|
8
|
+
require 'qasim'
|
9
|
+
|
10
|
+
module Qasim
|
11
|
+
class Config
|
12
|
+
|
13
|
+
attr_reader :maps_active
|
14
|
+
attr_reader :maps
|
15
|
+
attr_reader :mnt_dir
|
16
|
+
|
17
|
+
def initialize
|
18
|
+
|
19
|
+
|
20
|
+
@mnt_dir = File.join ENV['HOME'], "mnt"
|
21
|
+
|
22
|
+
@config_dir = APP_CONFIG_DIR
|
23
|
+
@config_file = nil
|
24
|
+
@maps = []
|
25
|
+
@initialize_enable = false
|
26
|
+
@umount_enable = false
|
27
|
+
@target = nil
|
28
|
+
@verbose_enable = false
|
29
|
+
@debug = false
|
30
|
+
end
|
31
|
+
|
32
|
+
def parse_maps &blk
|
33
|
+
#rdebug "Config: #{@config_dir}/config"
|
34
|
+
|
35
|
+
@maps = []
|
36
|
+
map_dirs = [@config_dir, APP_SYSCONFIG_DIR].select{ |d|
|
37
|
+
File.exist? d and File.directory? d
|
38
|
+
}
|
39
|
+
Find.find( *map_dirs ) do |path|
|
40
|
+
if File.file? path
|
41
|
+
if File.basename( path ) =~ /.map$/
|
42
|
+
begin
|
43
|
+
map = Map.new self, path
|
44
|
+
yield map if block_given?
|
45
|
+
maps.push map
|
46
|
+
rescue
|
47
|
+
# error while parsing map
|
48
|
+
end
|
49
|
+
end
|
50
|
+
#total_size += FileTest.size(path)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,123 @@
|
|
1
|
+
|
2
|
+
require 'optparse'
|
3
|
+
require 'ostruct'
|
4
|
+
require 'pp'
|
5
|
+
require 'find'
|
6
|
+
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rdebug/base'
|
9
|
+
|
10
|
+
module Qasim
|
11
|
+
class Config
|
12
|
+
|
13
|
+
attr_reader :maps_active
|
14
|
+
attr_reader :maps
|
15
|
+
attr_reader :action
|
16
|
+
|
17
|
+
#ACTION_UMOUNT = :umount
|
18
|
+
#ACTION_MOUNT = :mount
|
19
|
+
#ACTION_INIT = :init
|
20
|
+
|
21
|
+
def initialize
|
22
|
+
|
23
|
+
user = if ENV['USER'] then
|
24
|
+
ENV['USER']
|
25
|
+
else
|
26
|
+
raise "Environment variable 'USER' is missing!"
|
27
|
+
end
|
28
|
+
|
29
|
+
home_dir = if ENV['HOME'] then
|
30
|
+
ENV['HOME']
|
31
|
+
else
|
32
|
+
"/home/" + user
|
33
|
+
end
|
34
|
+
|
35
|
+
xdg_dir = if ENV['XDG_CONFIG_HOME'] then
|
36
|
+
ENV['XDG_CONFIG_HOME']
|
37
|
+
else
|
38
|
+
home_dir + '/.config'
|
39
|
+
end
|
40
|
+
|
41
|
+
mnt_dir = File.join home_dir, "mnt"
|
42
|
+
|
43
|
+
#@action = ACTION_MOUNT
|
44
|
+
@config_dir = xdg_dir + '/sshfs-mapper'
|
45
|
+
@config_file = nil
|
46
|
+
@maps = []
|
47
|
+
@initialize_enable = false
|
48
|
+
@umount_enable = false
|
49
|
+
@target = nil
|
50
|
+
@verbose_enable = false
|
51
|
+
@debug = false
|
52
|
+
end
|
53
|
+
|
54
|
+
def parse_maps &blk
|
55
|
+
rdebug "Config: #{@config_dir}/config"
|
56
|
+
|
57
|
+
@maps = []
|
58
|
+
Find.find( @config_dir ) do |path|
|
59
|
+
if File.file? path
|
60
|
+
if File.basename( path ) =~ /.map$/
|
61
|
+
begin
|
62
|
+
map = Map.new path
|
63
|
+
yield map if block_given?
|
64
|
+
maps.push map
|
65
|
+
rescue
|
66
|
+
# error while parsing map
|
67
|
+
end
|
68
|
+
end
|
69
|
+
#total_size += FileTest.size(path)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
def parse_cmd_line args
|
75
|
+
opts = OptionParser.new do |opts|
|
76
|
+
|
77
|
+
opts.banner = "Usage: #{$0} [action] [options]"
|
78
|
+
|
79
|
+
opts.separator ""
|
80
|
+
opts.separator "Action (mount by default):"
|
81
|
+
|
82
|
+
opts.on('-u', '--umount', 'Umount') do |umount|
|
83
|
+
@action = ACTION_UMOUNT
|
84
|
+
end
|
85
|
+
|
86
|
+
opts.on('-i', '--initialize', 'Populate with default configuration' ) do |init|
|
87
|
+
@action = ACTION_INIT
|
88
|
+
end
|
89
|
+
|
90
|
+
opts.separator "Specific options:"
|
91
|
+
|
92
|
+
opts.on('-a', '--all', 'Targets all enabled maps (disables -s)') do |all|
|
93
|
+
@targets_all = all
|
94
|
+
end
|
95
|
+
|
96
|
+
#FIXME: use target list there
|
97
|
+
opts.on('-s', '--select TARGET', 'Target selected map (even disabled)') do |target|
|
98
|
+
@targets << target
|
99
|
+
end
|
100
|
+
|
101
|
+
opts.on('-v', '--[no-]verbose', 'Run verbosely' ) do |verbose|
|
102
|
+
@verbose_enable = verbose
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
begin
|
107
|
+
opts.parse! args
|
108
|
+
rescue OptionParser::ParseError => e
|
109
|
+
puts opts.to_s
|
110
|
+
puts ""
|
111
|
+
puts e.message
|
112
|
+
exit 1
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
def to_s
|
117
|
+
s = []
|
118
|
+
s << "config_file = #{@config_file}"
|
119
|
+
s << "verbose_enable = #{@verbose_enable}"
|
120
|
+
s.join "\n"
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|