csd 0.3.7 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.7
1
+ 0.4.0
@@ -0,0 +1,206 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{csd}
8
+ s.version = "0.4.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Technology Transfer Alliance Team"]
12
+ s.date = %q{2010-09-23}
13
+ s.description = %q{CSD stands for Communication Systems Design and is a project of the Telecommunication Systems Laboratory (TSLab) of the Royal Institute of Technology in Stockholm, Sweden. Within CSD many software tools are used to build up various networks and services. This gem is supposed to automate processes to handle the compilation and installation of these software tools. Technology Transfer Alliance (TTA) is the project team, which maintains this code.}
14
+ s.email = %q{mtoday11@gmail.com}
15
+ s.executables = ["ai", "ttai"]
16
+ s.extra_rdoc_files = [
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "COPYING",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "bin/ai",
27
+ "bin/ttai",
28
+ "csd.gemspec",
29
+ "img/3d1.png",
30
+ "img/bios0.jpg",
31
+ "img/bios1.jpg",
32
+ "img/bios2.jpg",
33
+ "img/camera1.jpg",
34
+ "img/camera2.jpg",
35
+ "img/checkminisip.png",
36
+ "img/decklink1.png",
37
+ "img/decklink2.png",
38
+ "img/graphics1.png",
39
+ "img/graphics2.png",
40
+ "img/graphics3.png",
41
+ "img/graphics4.png",
42
+ "img/graphics5.png",
43
+ "img/installer1.jpg",
44
+ "img/installer2.jpg",
45
+ "img/installer3.jpg",
46
+ "img/minisip1.png",
47
+ "img/minisip2.png",
48
+ "img/minisip3.png",
49
+ "img/minisip4.png",
50
+ "img/minisip5.png",
51
+ "img/minisip6.png",
52
+ "img/minisip7.png",
53
+ "img/reboot.png",
54
+ "img/ruby1.png",
55
+ "img/ruby2.png",
56
+ "img/ruby3.png",
57
+ "img/ruby4.png",
58
+ "img/update1.png",
59
+ "img/update2.png",
60
+ "lib/csd.rb",
61
+ "lib/csd/application.rb",
62
+ "lib/csd/application/decklink.rb",
63
+ "lib/csd/application/decklink/about.yml",
64
+ "lib/csd/application/decklink/base.rb",
65
+ "lib/csd/application/decklink/options/common.rb",
66
+ "lib/csd/application/decklink/options/common_defaults.rb",
67
+ "lib/csd/application/default.rb",
68
+ "lib/csd/application/default/base.rb",
69
+ "lib/csd/application/graphics.rb",
70
+ "lib/csd/application/graphics/about.yml",
71
+ "lib/csd/application/graphics/base.rb",
72
+ "lib/csd/application/graphics/error.rb",
73
+ "lib/csd/application/graphics/options/common.rb",
74
+ "lib/csd/application/graphics/options/common_defaults.rb",
75
+ "lib/csd/application/graphics/options/install.rb",
76
+ "lib/csd/application/graphics/options/install_defaults.rb",
77
+ "lib/csd/application/i2conf.rb",
78
+ "lib/csd/application/i2conf/about.yml",
79
+ "lib/csd/application/i2conf/base.rb",
80
+ "lib/csd/application/i2conf/config_example.rb",
81
+ "lib/csd/application/i2conf/options/common.rb",
82
+ "lib/csd/application/i2conf/options/common_defaults.rb",
83
+ "lib/csd/application/i2conf/options/install.rb",
84
+ "lib/csd/application/i2conf/options/install_defaults.rb",
85
+ "lib/csd/application/minisip.rb",
86
+ "lib/csd/application/minisip/about.yml",
87
+ "lib/csd/application/minisip/base.rb",
88
+ "lib/csd/application/minisip/component.rb",
89
+ "lib/csd/application/minisip/component/core.rb",
90
+ "lib/csd/application/minisip/component/core_packaging.rb",
91
+ "lib/csd/application/minisip/component/ffmpeg.rb",
92
+ "lib/csd/application/minisip/component/gnome.rb",
93
+ "lib/csd/application/minisip/component/hdviper.rb",
94
+ "lib/csd/application/minisip/component/network.rb",
95
+ "lib/csd/application/minisip/component/plugins.rb",
96
+ "lib/csd/application/minisip/component/x264.rb",
97
+ "lib/csd/application/minisip/error.rb",
98
+ "lib/csd/application/minisip/options/common.rb",
99
+ "lib/csd/application/minisip/options/common_defaults.rb",
100
+ "lib/csd/application/minisip/options/install.rb",
101
+ "lib/csd/application/minisip/options/install_defaults.rb",
102
+ "lib/csd/application/minisip/options/package.rb",
103
+ "lib/csd/application/minisip/options/package_defaults.rb",
104
+ "lib/csd/application/minisip/phonebook_example.rb",
105
+ "lib/csd/application/minisip/unix.rb",
106
+ "lib/csd/application/minisip/unix/darwin.rb",
107
+ "lib/csd/application/minisip/unix/linux.rb",
108
+ "lib/csd/application/minisip/unix/linux/debian.rb",
109
+ "lib/csd/application/minisip/unix/linux/debian/ubuntu10.rb",
110
+ "lib/csd/application/mslog.rb",
111
+ "lib/csd/application/mslog/about.yml",
112
+ "lib/csd/application/mslog/base.rb",
113
+ "lib/csd/application/mslog/options/common.rb",
114
+ "lib/csd/application/mslog/options/common_defaults.rb",
115
+ "lib/csd/applications.rb",
116
+ "lib/csd/commands.rb",
117
+ "lib/csd/container.rb",
118
+ "lib/csd/error.rb",
119
+ "lib/csd/extensions.rb",
120
+ "lib/csd/extensions/core/array.rb",
121
+ "lib/csd/extensions/core/dir.rb",
122
+ "lib/csd/extensions/core/kernel.rb",
123
+ "lib/csd/extensions/core/object.rb",
124
+ "lib/csd/extensions/core/open_struct.rb",
125
+ "lib/csd/extensions/core/option_parser.rb",
126
+ "lib/csd/extensions/core/pathname.rb",
127
+ "lib/csd/extensions/core/string.rb",
128
+ "lib/csd/extensions/gem/platform.rb",
129
+ "lib/csd/options_parser.rb",
130
+ "lib/csd/path_container.rb",
131
+ "lib/csd/user_interface.rb",
132
+ "lib/csd/user_interface/base.rb",
133
+ "lib/csd/user_interface/cli.rb",
134
+ "lib/csd/user_interface/silent.rb",
135
+ "lib/csd/vendor/active_support/MIT-LICENSE",
136
+ "lib/csd/vendor/active_support/inflector.rb",
137
+ "lib/csd/vendor/active_support/object_extensions.rb",
138
+ "lib/csd/vendor/term/GPL2-LICENSE",
139
+ "lib/csd/vendor/term/ansicolor.rb",
140
+ "lib/csd/vendor/zentest/zentest_assertions.rb",
141
+ "lib/csd/version.rb",
142
+ "test/application/test_minisip.rb",
143
+ "test/functional/test_application_base.rb",
144
+ "test/functional/test_application_default.rb",
145
+ "test/functional/test_applications.rb",
146
+ "test/functional/test_cli.rb",
147
+ "test/functional/test_commands.rb",
148
+ "test/functional/test_csd.rb",
149
+ "test/functional/test_options.rb",
150
+ "test/helper.rb",
151
+ "test/unit/test_container.rb",
152
+ "test/unit/test_dir.rb",
153
+ "test/unit/test_open_struct.rb",
154
+ "test/unit/test_pathname.rb",
155
+ "test/unit/test_platform.rb",
156
+ "test/unit/test_string.rb"
157
+ ]
158
+ s.homepage = %q{http://github.com/csd/csd}
159
+ s.post_install_message = %q{
160
+ ============================================================
161
+
162
+ Thank you for installing the TTA Automated Installer!
163
+
164
+ NOTE: On DEBIAN and UBUNTU the executable `ai´ is *maybe*
165
+ not in your PATH by default. If that is the case,
166
+ you can fix it by running this command:
167
+
168
+ echo "export PATH=\$PATH:$(gem env | grep "E D" | sed "s/[^\w]* //")" >> ~/.bashrc;. ~/.bashrc
169
+
170
+ You can run the AI by typing `ai´ in your command line.
171
+
172
+ ============================================================
173
+ }
174
+ s.rdoc_options = ["--charset=UTF-8"]
175
+ s.require_paths = ["lib"]
176
+ s.rubygems_version = %q{1.3.7}
177
+ s.summary = %q{Installation and compilation handler for software used in CSD projects.}
178
+ s.test_files = [
179
+ "test/application/test_minisip.rb",
180
+ "test/functional/test_application_base.rb",
181
+ "test/functional/test_application_default.rb",
182
+ "test/functional/test_applications.rb",
183
+ "test/functional/test_cli.rb",
184
+ "test/functional/test_commands.rb",
185
+ "test/functional/test_csd.rb",
186
+ "test/functional/test_options.rb",
187
+ "test/helper.rb",
188
+ "test/unit/test_container.rb",
189
+ "test/unit/test_dir.rb",
190
+ "test/unit/test_open_struct.rb",
191
+ "test/unit/test_pathname.rb",
192
+ "test/unit/test_platform.rb",
193
+ "test/unit/test_string.rb"
194
+ ]
195
+
196
+ if s.respond_to? :specification_version then
197
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
198
+ s.specification_version = 3
199
+
200
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
201
+ else
202
+ end
203
+ else
204
+ end
205
+ end
206
+
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -10,6 +10,14 @@ module CSD
10
10
  #
11
11
  DEBIAN_DEPENDENCIES = %w{ libnotify-bin libmng1 dkms }
12
12
 
13
+ MODPROBE_BLACKLIST = %{# Minisip.org
14
+ # We know that BlackMagic Design Decklink conflicts
15
+ # with fglrx. We would like to load it manually later
16
+ # via "sudo modprobe blackmagic"
17
+ #
18
+ blacklist blackmagic
19
+ }
20
+
13
21
  # This method notifies users about following operation of AI, and initiates introduction method.
14
22
  # The actual installation process is carried out by method install! for the purpose of keeping source code clean.
15
23
  #
@@ -34,7 +42,7 @@ module CSD
34
42
  extract
35
43
  apply
36
44
  add_boot_loader
37
- update_firmware
45
+ load_kernel_module
38
46
  send_notification
39
47
  cleanup_working_directory
40
48
  end
@@ -104,19 +112,21 @@ module CSD
104
112
  end
105
113
 
106
114
  def add_boot_loader
107
- content = Path.kernel_module.file? ? File.read(Path.kernel_module) : ''
108
- if content !~ /\nblackmagic/m or Options.reveal
109
- UI.info "Adding Blackmagic drivers to the boot loader".green.bold
110
- Cmd.touch_and_replace_content Path.new_kernel_module, "#{content}\nblackmagic"
111
- Cmd.run "sudo cp #{Path.new_kernel_module} #{Path.kernel_module}", :announce_pwd => false
112
- end
113
- end
114
-
115
- def update_firmware
116
- UI.info "Updating Decklink Firmware (if needed)".green.bold
117
- Cmd.run "BlackmagicFirmwareUpdater update", :announce_pwd => false
115
+ UI.info "Adding Blackmagic to the kernel module blacklist".green.bold
116
+ Cmd.touch_and_replace_content Path.new_blacklist, MODPROBE_BLACKLIST
117
+ Cmd.run "sudo cp #{Path.new_blacklist} #{Path.blacklist}", :announce_pwd => false
118
+ UI.info "Creating Ubuntu init.d to load Blackmagic on runtime instead".green.bold
119
+ Cmd.touch_and_replace_content Path.new_upstart, "#!/bin/sh\nsudo /sbin/modprobe blackmagic"
120
+ Cmd.run "sudo cp #{Path.new_upstart} #{Path.upstart}", :announce_pwd => false
121
+ Cmd.run "sudo chmod +x #{Path.upstart}", :announce_pwd => false
122
+ Cmd.run "sudo update-rc.d blackmagic defaults", :announce_pwd => false
118
123
  end
119
124
 
125
+ def load_kernel_module
126
+ UI.info "Loading Decklink drivers".green.bold
127
+ Cmd.run "sudo modprobe blackmagic", :announce_pwd => false
128
+ end
129
+
120
130
  def send_notification
121
131
  Cmd.run %{notify-send --icon=gdm-setup "DeckLink installation complete" "You are now ready to use your Blackmagic Design DeckLink device." }, :internal => true, :die_on_failure => false
122
132
  end
@@ -128,8 +138,10 @@ module CSD
128
138
  Path.decklink_url = blacklink_repository + decklink_basename + decklink_extension
129
139
  Path.tar = Pathname.new(File.join(Path.work, "#{decklink_basename + decklink_extension}"))
130
140
  Path.packages = Pathname.new(File.join(Path.work, decklink_basename))
131
- Path.new_kernel_module = Pathname.new(File.join(Path.work, 'modules'))
132
- Path.kernel_module = Pathname.new(File.join('/', 'etc', 'modules'))
141
+ Path.new_blacklist = Pathname.new(File.join(Path.work, 'blacklist-minisip.conf'))
142
+ Path.blacklist = Pathname.new(File.join('/', 'etc', 'modprobe.d', 'blacklist-minisip.conf'))
143
+ Path.new_upstart = Pathname.new(File.join(Path.work, 'blackmagic'))
144
+ Path.upstart = Pathname.new(File.join('/', 'etc', 'init.d', 'blackmagic'))
133
145
  end
134
146
 
135
147
  end
@@ -3,13 +3,11 @@ human: MiniSIP
3
3
  description: SIP client for high-definition video conferencing.
4
4
  actions:
5
5
  public:
6
- #- show: Shows further information about MiniSIP
7
6
  #- download: Downloads MiniSIP components (e.g. source code, configurations, docs,...)
8
7
  - install: Downloads and compiles MiniSIP from scratch
9
- #- install: Installs an application
10
- developer:
11
- - check: Checks whether the environment dependencies for MiniSIP are satisfied
8
+ - check: Checks whether critical environment dependencies for MiniSIP are satisfied
12
9
  - package: Downloads, compiles and packages MiniSIP from scratch
10
+ developer:
13
11
  #- publish: Submits a compiled package to the CSD package repository
14
12
  scopes:
15
13
  install:
@@ -22,6 +22,11 @@ module CSD
22
22
  def install
23
23
  compile
24
24
  end
25
+
26
+ # Checking MiniSIP OS dependencies
27
+ def check
28
+ UI.error 'Currently not supported for this platform. Sorry.'
29
+ end
25
30
 
26
31
  # Running the compile task.
27
32
  #
@@ -16,7 +16,7 @@ module CSD
16
16
  # This is an +Array+ containing the names of the internal MiniSIP libraries. Note that they
17
17
  # are sorted according to the sequence in which they need to be compiled (because they depend on each other).
18
18
  #
19
- LIBRARIES = %w{ libmutil libmnetutil libmcrypto libmikey libmsip libmstun libminisip minisip }
19
+ LIBRARIES = %w{ libmutil libmnetutil libmcrypto libmikey libmsip libmstun libminisip minisip mloggingutil }
20
20
 
21
21
  class << self
22
22
 
@@ -40,6 +40,7 @@ module CSD
40
40
  link_libraries
41
41
  create_address_book
42
42
  ensure_ati_vsync
43
+ update_decklink_firmware
43
44
  end
44
45
 
45
46
  def remove_ffmpeg
@@ -129,7 +130,12 @@ module CSD
129
130
  # Removing the default SIP proxy server from the Configuration generator
130
131
  Cmd.replace Path.repository_sip_conf, 'sip.domain.example', ''
131
132
  # We would like decklink to be the default video device
132
- Cmd.replace Path.repository_sip_conf, 'be->commit();', %{be->save("video_device", "decklink:0/720p50@25");be->commit();}
133
+ Cmd.replace Path.repository_sip_conf, 'be->commit();', %{
134
+ be->save("video_device", "decklink:0/720p50@25");
135
+ be->save("display_frame_size", "hd720");
136
+ be->save("display_frame_rate", "24");
137
+ be->commit();
138
+ }
133
139
  # Switching logging to ON as default, as opposed to OFF
134
140
  Cmd.replace Path.repository_sip_conf, 'be->saveBool("logging",false)', 'be->saveBool("logging",true)'
135
141
  if Options.ffmpeg_first
@@ -187,6 +193,8 @@ module CSD
187
193
  UI.debug "MILESTONE_processing_libraries"
188
194
  libraries.each do |library|
189
195
  directory = Pathname.new(File.join(Path.repository, library))
196
+ # The mloggingutil is more or less optional because it might not be checked in as of today yet
197
+ next if !directory.directory? and library == 'mloggingutil'
190
198
  if Cmd.cd(directory, :internal => true).success? or Options.reveal
191
199
  UI.debug "MILESTONE_processing_#{library}"
192
200
  UI.info "Processing MiniSIP -> #{library}".green.bold
@@ -309,6 +317,11 @@ module CSD
309
317
  Cmd.run "sudo aticonfig --set-pcs-u32=BUSID-2:0:0-0/OpenGL,VSyncControl,2", :announce_pwd => false
310
318
  end
311
319
 
320
+ def update_decklink_firmware
321
+ UI.info "Updating Decklink Firmware (if needed)".green.bold
322
+ Cmd.run "BlackmagicFirmwareUpdater update", :announce_pwd => false, :die_on_failure => false
323
+ end
324
+
312
325
  end
313
326
  end
314
327
  end
@@ -16,6 +16,17 @@ module CSD
16
16
  super
17
17
  end
18
18
 
19
+ def check
20
+ Core.ensure_ati_vsync
21
+ Core.update_decklink_firmware
22
+ load_decklink_on_runtime
23
+ end
24
+
25
+ def load_decklink_on_runtime
26
+ UI.info "Loading Decklink drivers in case they were not loaded already".green.bold
27
+ Cmd.run "sudo /sbin/modprobe blackmagic", :announce_pwd => false, :die_on_failure => false
28
+ end
29
+
19
30
  def after_aptitude
20
31
  end
21
32
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csd
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 3
9
- - 7
10
- version: 0.3.7
8
+ - 4
9
+ - 0
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Technology Transfer Alliance Team
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-21 00:00:00 +02:00
18
+ date: 2010-09-23 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -37,12 +37,14 @@ files:
37
37
  - VERSION
38
38
  - bin/ai
39
39
  - bin/ttai
40
+ - csd.gemspec
40
41
  - img/3d1.png
41
42
  - img/bios0.jpg
42
43
  - img/bios1.jpg
43
44
  - img/bios2.jpg
44
45
  - img/camera1.jpg
45
46
  - img/camera2.jpg
47
+ - img/checkminisip.png
46
48
  - img/decklink1.png
47
49
  - img/decklink2.png
48
50
  - img/graphics1.png
@@ -56,6 +58,10 @@ files:
56
58
  - img/minisip1.png
57
59
  - img/minisip2.png
58
60
  - img/minisip3.png
61
+ - img/minisip4.png
62
+ - img/minisip5.png
63
+ - img/minisip6.png
64
+ - img/minisip7.png
59
65
  - img/reboot.png
60
66
  - img/ruby1.png
61
67
  - img/ruby2.png