Patch novnc ubuntu package 85/585/2
authorMichal Skalski <mskalski@mirantis.com>
Mon, 18 May 2015 14:57:00 +0000 (14:57 +0000)
committerMichal Skalski <mskalski@mirantis.com>
Mon, 18 May 2015 16:04:42 +0000 (16:04 +0000)
Patch novnc ubuntu package by adding missing files.
Related bug: https://bugs.launchpad.net/fuel/+bug/1433894

Change-Id: Iba413c664bb93dea26245c9ed4471fff30e43968
Jira: -
Signed-off-by: Michal Skalski <mskalski@mirantis.com>
fuel/build/patch-packages/Makefile
fuel/build/patch-packages/novnc/Makefile [new file with mode: 0644]
fuel/build/patch-packages/novnc/fix-missing.sh [new file with mode: 0755]
fuel/build/patch-packages/tools/deb_pack

index 5d7d200..4388677 100644 (file)
@@ -8,7 +8,7 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
-SUBDIRS := debootstrap
+SUBDIRS := debootstrap novnc
 SUBCLEAN = $(addsuffix .clean,$(SUBDIRS))
 
 .PHONY: $(SUBDIRS) $(SUBCLEAN) clean
diff --git a/fuel/build/patch-packages/novnc/Makefile b/fuel/build/patch-packages/novnc/Makefile
new file mode 100644 (file)
index 0000000..16c0196
--- /dev/null
@@ -0,0 +1,22 @@
+# This is a temporary patch which add missing files
+# inside novnc ubuntu package.
+# Related bug: https://bugs.launchpad.net/fuel/+bug/1433894
+TOP := $(shell pwd)
+
+.PHONY: all
+all:
+
+.PHONY: clean
+clean:
+       @rm -rf package
+       @rm -rf *.deb
+       @rm -rf patch-replacements
+       @rm -rf .package
+
+.PHONY: release
+release:
+       ../tools/deb_unpack novnc_0.5.1*.deb $(ORIGISO)
+       ./fix-missing.sh
+       ../tools/deb_pack $(REVSTATE)
+       @cp *.deb ../release/packages
+       @cat patch-replacements >> ../release/patch-replacements
diff --git a/fuel/build/patch-packages/novnc/fix-missing.sh b/fuel/build/patch-packages/novnc/fix-missing.sh
new file mode 100755 (executable)
index 0000000..61ef1db
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+MISSING_FILES="keyboard.js keysymdef.js keysym.js"
+NOVNC_SOURCE="http://raw.githubusercontent.com/kanaka/noVNC/v0.5.1/include"
+
+for file in $MISSING_FILES
+do
+  wget -P package/usr/share/novnc/include/ "$NOVNC_SOURCE/$file"
+done
index f07a15d..f5d42de 100755 (executable)
@@ -21,7 +21,7 @@ ME=$(basename $0)
 
 trap my_exit EXIT
 
-REV=$1
+REV="$(echo $1 | tr '_' '-')"
 if [ -z "$REV" ]; then
   echo "$ME: Error - no revision info provided"
   exit 1