irgat 0.0.1 → 0.0.2
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.
- data/History.txt +13 -0
- data/Manifest.txt +1 -3
- data/PostInstall.txt +10 -1
- data/README.rdoc +6 -5
- data/Rakefile +1 -1
- data/TODO +23 -3
- data/bin/irgat +19 -33
- data/bin/irgat_setup +12 -3
- data/bin/irgat_updater +86 -0
- data/config/hoe.rb +2 -2
- data/lib/irgat.rb +85 -22
- data/lib/irgat/console.rb +1 -1
- data/lib/irgat/dependencies.rb +14 -9
- data/lib/irgat/execs.rb +36 -39
- data/lib/irgat/log.rb +60 -27
- data/lib/irgat/utils.rb +1 -0
- data/lib/irgat/version.rb +8 -3
- data/lib/modules/backup.rb +117 -35
- data/lib/modules/console.rb +2 -10
- data/lib/modules/kwallet.rb +6 -8
- data/setup/etc/backup.yml.example +8 -5
- data/setup/etc/irgat.yml.example +7 -7
- data/setup/etc/kwallet.yml.example +12 -1
- data/website/index.html +5 -2
- metadata +18 -19
- data/setup/etc/console.yml.default +0 -11
- data/setup/etc/dar.yml.example +0 -16
- data/setup/etc/kwallet.yml.default +0 -18
data/lib/modules/console.rb
CHANGED
@@ -26,22 +26,14 @@ module Irgat
|
|
26
26
|
@config = irgat_process.config
|
27
27
|
# load options for module
|
28
28
|
@config_module = self.load_config
|
29
|
-
|
30
|
-
#case @config_module[:load_modules]
|
31
|
-
# when 'all'
|
32
|
-
# log("text", "Loading all activated modules")
|
33
|
-
# # get modules
|
34
|
-
# # @config
|
35
|
-
# # TODO
|
36
|
-
# when
|
37
|
-
@log_to_stdout = true
|
29
|
+
|
38
30
|
end
|
39
31
|
|
40
32
|
def default(args = {})
|
41
33
|
require 'irb'
|
42
34
|
puts "\nLaunching irgat command line"
|
43
35
|
puts "---------------------------"
|
44
|
-
exec("irb -r #{IRGAT_ROOT}/lib/
|
36
|
+
exec("irb -r #{IRGAT_ROOT}/lib/irgat.rb -r #{IRGAT_ROOT}/lib/irgat/console.rb -r irb/completion")
|
45
37
|
end
|
46
38
|
|
47
39
|
end
|
data/lib/modules/kwallet.rb
CHANGED
@@ -44,9 +44,9 @@ module Irgat
|
|
44
44
|
need_programs = ["dcop", "gpg"]
|
45
45
|
|
46
46
|
# get kwallet code at start
|
47
|
-
@code ||= get_kwallet_int_code.strip
|
48
|
-
|
49
|
-
|
47
|
+
@code ||= get_kwallet_int_code[:output].strip
|
48
|
+
@log_to_output = true # FIXME
|
49
|
+
|
50
50
|
end
|
51
51
|
|
52
52
|
def default(args)
|
@@ -56,7 +56,7 @@ module Irgat
|
|
56
56
|
def do_petition(args)
|
57
57
|
petition = args.shift
|
58
58
|
if !petition or petition == ""
|
59
|
-
log("text","No petition registered. Options are: ", 1)
|
59
|
+
log("text","No petition registered. Options are: list, show", 1)
|
60
60
|
else
|
61
61
|
if !args.empty?
|
62
62
|
self.send(petition, (args))
|
@@ -83,7 +83,7 @@ module Irgat
|
|
83
83
|
def list( args = [])
|
84
84
|
option = args.first
|
85
85
|
if !option
|
86
|
-
return " List stored objects. Specify a folder from list: #{ show_folders.gsub(/\n/,' ') }"
|
86
|
+
return " List stored objects. Specify a folder from list: #{ show_folders[:output].gsub(/\n/,' ') }"
|
87
87
|
else
|
88
88
|
if option == "all"
|
89
89
|
else
|
@@ -112,7 +112,7 @@ module Irgat
|
|
112
112
|
|
113
113
|
def show_passwd_list(folder)
|
114
114
|
petition = execute_command("dcop kded kwalletd entryList #{ @code } '#{ folder }'", "Get Password of #{ folder }")
|
115
|
-
return "Avaible Entries in #{ folder }: #{ petition.gsub(/\n/,' ') } . Type $ @kwallet.show #{ folder } <entry> to see the key value"
|
115
|
+
return "Avaible Entries in #{ folder }: #{ petition[:output].gsub(/\n/,' ') } . Type $ @kwallet.show #{ folder } <entry> to see the key value"
|
116
116
|
end
|
117
117
|
|
118
118
|
def show_folders
|
@@ -127,7 +127,5 @@ module Irgat
|
|
127
127
|
def update_kwallet_file
|
128
128
|
execute_command("scp -P #{@config_module[:remote_path]["port"]} #{@config_module[:remote_path]["user"]}@#{@config_module[:remote_path]["server"]}:/#{@config_module[:remote_path]["folder"]}/#{@config_module[:kwallet_name]}.kwl #{@config_module[:local_path]}","Updating local kwallet file from server",1)
|
129
129
|
end
|
130
|
-
|
131
130
|
end
|
132
|
-
|
133
131
|
end
|
@@ -19,7 +19,9 @@ number_backup_stored: 2
|
|
19
19
|
|
20
20
|
# exclude folders from backup, absolute path without first slash
|
21
21
|
# for example var/tmp
|
22
|
-
|
22
|
+
# IMPORTANT: data and restore irgat::backup folder if by definition excluded.
|
23
|
+
# You don't need to write it here.
|
24
|
+
exclude_folders: [ boot, cdrom, etc, dev, home, initrd, lib, lost+found, media, mnt, opt, proc, root, sbin, srv, sys, tmp, usr, var ]
|
23
25
|
|
24
26
|
# extensions ommited inside backup files
|
25
27
|
exclude_files: [ .dar ]
|
@@ -45,7 +47,7 @@ mysql_pass: ''
|
|
45
47
|
distribute_backups: false
|
46
48
|
# just in case needed
|
47
49
|
# distribution_servers:
|
48
|
-
#
|
50
|
+
# foo_server:
|
49
51
|
# host: example.com
|
50
52
|
# port: 22
|
51
53
|
# user: foo
|
@@ -56,7 +58,7 @@ distribute_backups: false
|
|
56
58
|
distribute_method: scp
|
57
59
|
# Options for the scp distributed method
|
58
60
|
scp_distribute_method:
|
59
|
-
local_user:
|
61
|
+
local_user: user # local user to perform the copy and querys
|
60
62
|
with_keys: true # if its true, the scp and ssh commans are maked without pass
|
61
63
|
needed_programs: [ scp, ssh ] # programs needed by scp distributed method
|
62
64
|
# Options for ftp distributed method
|
@@ -76,8 +78,8 @@ subsystem_name: backups
|
|
76
78
|
subsystem_description: 'Irgat backup module'
|
77
79
|
run_as_user: root
|
78
80
|
# output notification
|
79
|
-
|
80
|
-
|
81
|
+
log_file_actions: [ launch ] # Write irgat log to a log file
|
82
|
+
log_mail_actions: [ launch ] # Email the irgat log to the irgat admin
|
81
83
|
|
82
84
|
|
83
85
|
# Folders Tree (change if you known what are you doing!!!)
|
@@ -90,6 +92,7 @@ folders_tree:
|
|
90
92
|
- catalog
|
91
93
|
- extras
|
92
94
|
- extras/mysql
|
95
|
+
- restore
|
93
96
|
|
94
97
|
|
95
98
|
# Dar variables
|
data/setup/etc/irgat.yml.example
CHANGED
@@ -3,17 +3,17 @@
|
|
3
3
|
|
4
4
|
# Server Variables
|
5
5
|
# server_name: my server
|
6
|
-
server_name:
|
7
|
-
server_domain:
|
6
|
+
server_name: my_server
|
7
|
+
server_domain: foo.example.net
|
8
8
|
|
9
9
|
# Email notifications
|
10
|
-
mail_to:
|
11
|
-
|
10
|
+
mail_to: foo@example.net
|
12
11
|
|
13
12
|
# Enable subsystem
|
14
13
|
enable_subsystem:
|
15
14
|
console : true
|
16
15
|
backup: true
|
16
|
+
kwallet: true
|
17
17
|
|
18
18
|
# Languaje
|
19
19
|
# avaible en
|
@@ -31,7 +31,7 @@ debug_level: 1
|
|
31
31
|
smtp_mode: sendmail
|
32
32
|
# if smtp
|
33
33
|
smtp_values:
|
34
|
-
server:
|
34
|
+
server: foo.example.net
|
35
35
|
port: 25
|
36
|
-
user:
|
37
|
-
password:
|
36
|
+
user: sender@example
|
37
|
+
password: password
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# Look <your irgat path>/README for more information
|
3
3
|
|
4
4
|
# Name of your Def Kwallet
|
5
|
-
kwallet_name:
|
5
|
+
kwallet_name: gnoxys
|
6
6
|
|
7
7
|
# path to the files
|
8
8
|
local_path: /home/user/.kde/share/apps/kwallet/
|
@@ -14,5 +14,16 @@ remote_path:
|
|
14
14
|
user: nogates
|
15
15
|
folder: /home/nogates/
|
16
16
|
|
17
|
+
#----------------------------
|
18
|
+
# Non common change variables
|
19
|
+
#----------------------------
|
20
|
+
# Subsystem variable
|
21
|
+
subsystem_name: kwallet
|
22
|
+
subsystem_description: 'Irgat kwallet module'
|
23
|
+
|
24
|
+
# output notification
|
25
|
+
log_file_actions: [ ] # Write irgat log to a log file
|
26
|
+
log_mail_actions: [ ] # Email the irgat log to the irgat admin
|
27
|
+
|
17
28
|
|
18
29
|
|
data/website/index.html
CHANGED
@@ -51,9 +51,12 @@
|
|
51
51
|
<p><span class="caps">OOOORRRR</span></p>
|
52
52
|
<p>You can fetch the source from either:</p>
|
53
53
|
<ul>
|
54
|
-
<li>rubyforge: <
|
54
|
+
<li>rubyforge: <span class="caps">MISSING</span> IN <span class="caps">ACTION</span></li>
|
55
55
|
</ul>
|
56
|
-
<
|
56
|
+
<p><span class="caps">TODO</span> – You can not created a RubyForge project, OR have not run <code>rubyforge config</code><br />
|
57
|
+
yet to refresh your local rubyforge data with this projects’ id information.</p>
|
58
|
+
<p>When you do this, this message will magically disappear!</p>
|
59
|
+
<p>Or you can hack website/index.txt and make it all go away!!</p>
|
57
60
|
<ul>
|
58
61
|
<li>github: <a href="http://github.com/GITHUB_USERNAME/irgat/tree/master">http://github.com/GITHUB_USERNAME/irgat/tree/master</a></li>
|
59
62
|
</ul>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: irgat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gnoxys
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-11-04 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,16 +22,6 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 2.0.4
|
24
24
|
version:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: rdoc
|
27
|
-
type: :runtime
|
28
|
-
version_requirement:
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 2.2.1
|
34
|
-
version:
|
35
25
|
- !ruby/object:Gem::Dependency
|
36
26
|
name: termios
|
37
27
|
type: :runtime
|
@@ -60,7 +50,7 @@ dependencies:
|
|
60
50
|
requirements:
|
61
51
|
- - ">="
|
62
52
|
- !ruby/object:Gem::Version
|
63
|
-
version: 1.8.
|
53
|
+
version: 1.8.2
|
64
54
|
version:
|
65
55
|
description: Intuitive Ruby for Gnoxys Administration Tools
|
66
56
|
email:
|
@@ -68,6 +58,7 @@ email:
|
|
68
58
|
executables:
|
69
59
|
- irgat
|
70
60
|
- irgat_setup
|
61
|
+
- irgat_updater
|
71
62
|
extensions: []
|
72
63
|
|
73
64
|
extra_rdoc_files:
|
@@ -84,6 +75,7 @@ files:
|
|
84
75
|
- TODO
|
85
76
|
- bin/irgat
|
86
77
|
- bin/irgat_setup
|
78
|
+
- bin/irgat_updater
|
87
79
|
- config/hoe.rb
|
88
80
|
- config/requirements.rb
|
89
81
|
- lib/irgat.rb
|
@@ -104,11 +96,8 @@ files:
|
|
104
96
|
- setup.rb
|
105
97
|
- setup/etc/backup.yml.example
|
106
98
|
- setup/etc/chroot.yml.example
|
107
|
-
- setup/etc/console.yml.default
|
108
99
|
- setup/etc/cron.yml.example
|
109
|
-
- setup/etc/dar.yml.example
|
110
100
|
- setup/etc/irgat.yml.example
|
111
|
-
- setup/etc/kwallet.yml.default
|
112
101
|
- setup/etc/kwallet.yml.example
|
113
102
|
- setup/etc/ssh.yml.example
|
114
103
|
- tasks/deployment.rake
|
@@ -123,11 +112,21 @@ files:
|
|
123
112
|
- website/template.html.erb
|
124
113
|
has_rdoc: true
|
125
114
|
homepage: http://irgat.rubyforge.org
|
126
|
-
post_install_message:
|
115
|
+
post_install_message: |
|
116
|
+
New Install:
|
117
|
+
------------
|
118
|
+
|
127
119
|
Run irgat_setup to setup Irgat
|
128
120
|
|
129
|
-
For more information on Irgat
|
121
|
+
For more information on Irgat read the rdoc documentation or see http://irgat.rubyforge.org
|
130
122
|
|
123
|
+
Updater: (0.0.1 => 0.0.2)
|
124
|
+
-------------------------
|
125
|
+
|
126
|
+
If you have already installed run irgat_updater. These script checks your config files and show posible difference between older and new config files.
|
127
|
+
|
128
|
+
The program only marks these changes. You have to do it manually.
|
129
|
+
|
131
130
|
rdoc_options:
|
132
131
|
- --main
|
133
132
|
- README.txt
|
@@ -148,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
147
|
requirements: []
|
149
148
|
|
150
149
|
rubyforge_project: irgat
|
151
|
-
rubygems_version: 1.
|
150
|
+
rubygems_version: 1.3.1
|
152
151
|
signing_key:
|
153
152
|
specification_version: 2
|
154
153
|
summary: Intuitive Ruby for Gnoxys Administration Tools
|
@@ -1,11 +0,0 @@
|
|
1
|
-
# load the following modules
|
2
|
-
load_modules: all # [ array ] || all || none
|
3
|
-
|
4
|
-
#----------------------------
|
5
|
-
# Non common change variables
|
6
|
-
#----------------------------
|
7
|
-
# Subsystem variable
|
8
|
-
subsystem_name: console
|
9
|
-
subsystem_description: 'Irgat console module'
|
10
|
-
run_as_root: false
|
11
|
-
report_email: false
|
data/setup/etc/dar.yml.example
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
command: dar
|
2
|
-
description: Disk Archiver
|
3
|
-
alias:
|
4
|
-
options:
|
5
|
-
1:
|
6
|
-
name: create
|
7
|
-
description: creates a backup
|
8
|
-
ci_parameter: [ '-c', '--create']
|
9
|
-
arguments:
|
10
|
-
1: %file_url
|
11
|
-
2:
|
12
|
-
name: extract
|
13
|
-
description: extrac file from the given backup
|
14
|
-
ci_parameter: [ '-x', '--extract']
|
15
|
-
arguments:
|
16
|
-
1: %file_url
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# IRGAT config kwallet file:
|
2
|
-
# Look <your irgat path>/README for more information
|
3
|
-
|
4
|
-
# Name of your Def Kwallet
|
5
|
-
kwallet_name: gnoxys
|
6
|
-
|
7
|
-
# path to the files
|
8
|
-
local_path: /home/user/.kde/share/apps/kwallet/
|
9
|
-
# remote path is checked by ssh connections agains the especified server.
|
10
|
-
# No other methods (svn will be great) are implemented yet.
|
11
|
-
remote_path:
|
12
|
-
server: litura.gnoxys.net
|
13
|
-
port: 22229
|
14
|
-
user: nogates
|
15
|
-
folder: /home/nogates/
|
16
|
-
|
17
|
-
|
18
|
-
|