summaryrefslogtreecommitdiffstats
path: root/abs/core/func
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2013-02-19 21:10:18 (GMT)
committerJames Meyer <james.meyer@operamail.com>2013-02-19 21:10:18 (GMT)
commit2648e999d277eac5c3d331a3609bcc73fafbea71 (patch)
tree40951fb8e7fdbe28a0baa324ae615055203f1e2e /abs/core/func
parentc759b5e0c4aa6fc37412b4dee2cf9ad993fd376d (diff)
parent7e6f7ca174e1af67178dc5293a312a4a733eb095 (diff)
downloadlinhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.zip
linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.gz
linhes_pkgbuild-2648e999d277eac5c3d331a3609bcc73fafbea71.tar.bz2
Merge branch 'testing'
# By James Meyer (1091) and others # Via James Meyer (5) and others * testing: (1148 commits) LinHES-config: during install don't kill off lirc. This keeps the remote active all the way to the finish Change version numbers to 8.0 to match the release number. LinHES-conifg LinHES-system mythdb-initial runit-scripts supplemental-web LinHES-conifig: mv_install.py for the last partition don't go all the way to the end. Gotta leave room for gpt tables. xf86-video-ati: xorg ati driver. LinHES-config: timezip.py add syncing up of parental lvl passwords and starting level with MBE. LinHES-system: correct the logic for breaking out of the wmctrl loop. As written it would break out of the inner loop..but not the 60 iteration loop. e16_theme_settings: remove slide-in prop for new windows. For whatever reason this was preventing mplayer from being positioned correctly for appletrailers. LinHES-config, mythinstall: change case of hd_pvr and serial to all lower refs #902 zilog-firmware: firmware for TX support of the hdpvr and pvr-150 In general I can't recommend anybody using these transmitters but including the firmware just in case someone really wants to linhes-udev-rules: added hdprv_lirc rule. All of these lirc rules are limited to exactly one device. If more then one device is present then only the last device in init will get the symlink runit-scripts: fix logging for igdeamon, add support to remote init script so that the blaster is always the first device in the chain. added support specificly for hd_pvr LinHES-system: add lh_system_restore and lh_system_backup. These scripts are called from the mythmenu. refs #900 iguanair: rebuild with python 2.7 LinHES-system: msg_daemon.py fix init and nasty bug related to timeout. In a nutshell timeout wouldn't work unless a msg without a timeout was called first. linhes-udev-rules: add rules for mce,streamzap,serial lirc devices. mythinstall: recompile for matching libs mythtv: latest .25-fixes and change mythbackup/restore call lh_system_$op to replace mythbackup/mythrestore. mythbackup no longer works correctly with the new windowmanager linhes-scripts: myth2mp3, myth2x264, myth2xvid: use mythutil to get cutlist LinHES-config, supplimental-web: Fix proxy numbering for Ceton infiniTV linhes-system: add additional stuff to the system backup and also introduced an exclude file. The exclude/include files are locate in /home/mythtv/backup_config/ ...
Diffstat (limited to 'abs/core/func')
-rw-r--r--abs/core/func/PKGBUILD31
-rw-r--r--abs/core/func/failed_func4
-rw-r--r--abs/core/func/func_ssl_patch12
-rw-r--r--abs/core/func/logrotate-func.conf14
-rw-r--r--abs/core/func/msg.py103
-rw-r--r--abs/core/func/pacman.py2
6 files changed, 53 insertions, 113 deletions
diff --git a/abs/core/func/PKGBUILD b/abs/core/func/PKGBUILD
index 7366933..11bc623 100644
--- a/abs/core/func/PKGBUILD
+++ b/abs/core/func/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=func
pkgver=0.25
-pkgrel=7
+pkgrel=12
pkgdesc="fedora unifed network controller"
url=""
license="gpl"
@@ -9,15 +9,16 @@ makedepends=()
conflicts=()
replaces=()
backup=('etc/func/minion.conf')
-moddir="pkg/usr/lib/python2.6/site-packages/func/minion/modules/"
+moddir="pkg/usr/lib/python2.7/site-packages/func/minion/modules/"
install=func.install
-source=($pkgname-$pkgver.tar.gz minion.conf power.py pacman.py failed_func fe_restart.py msg.py msg.cfg)
-arch=('i686')
+source=($pkgname-$pkgver.tar.gz minion.conf power.py pacman.py failed_func fe_restart.py msg.py msg.cfg func_ssl_patch logrotate-func.conf)
+arch=('i686' 'x86_64')
build() {
cd $startdir/src/$pkgname-${pkgver}
- python setup.py build
- python setup.py install --prefix=$startdir/pkg/usr
+ patch -Np1 < $startdir/src/func_ssl_patch
+ python2 setup.py build
+ python2 setup.py install --prefix=$startdir/pkg/usr
cd $startdir/src
install -m755 -D minion.conf $startdir/pkg/etc/func/minion.conf
install -m755 -D $startdir/src/$pkgname-$pkgver/etc/async_methods.conf $startdir/pkg/etc/func/async_methods.conf
@@ -30,15 +31,19 @@ build() {
install -m755 -D $startdir/src/fe_restart.py ${startdir}/${moddir}/fe_restart.py
install -m755 -D $startdir/src/failed_func $startdir/pkg/usr/MythVantage/bin/failed_func
mkdir -p $startdir/pkg/var/log/func
-
- cd $startdir/pkg
- find ./ -name "*.pyc" -print | xargs rm -f
+ install -m644 -D ../logrotate-func.conf $startdir/pkg/etc/logrotate.d/func
+
+ cd $startdir/pkg
+ find ./usr/bin/* -exec sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' {} \;
+ find ./ -name "*.pyc" -print | xargs rm -f
}
md5sums=('892252004f122c61bb58bb4607553ffe'
'1e2905074203d5c0557f143a6c50c497'
'1393088fa64823606e0b1c02296041f4'
- '21f79d7395edc64b72db5576f9a7f384'
- '5c62fad46fb95a14bc7093b506098e07'
+ '32cc4d15a3083b518d9f645b656cc273'
+ 'c30f420c01628a08061270e8502115c5'
'b02a733b7a74569e57521bc3708724a5'
- '572bb6737cb03dee7e9d11ed40481bd2'
- '28e141f04ccbdde1199b41888e102dc9')
+ '7b4266a8031cf7de485bf6b74e57bd74'
+ '28e141f04ccbdde1199b41888e102dc9'
+ 'b816bdb222e646a7801b218c3a626b0e'
+ '7d7c8a334f6b46ae1e5e483854b93924')
diff --git a/abs/core/func/failed_func b/abs/core/func/failed_func
index 943fab9..b4605bf 100644
--- a/abs/core/func/failed_func
+++ b/abs/core/func/failed_func
@@ -1,4 +1,5 @@
#!/bin/bash
+MYTH_RUN_STATUS="1"
. /etc/profile
. /etc/systemconfig
@@ -11,10 +12,13 @@ status=$?
if [ $status = 0 ]
then
echo "removing ca (failed_func.sh)"
+ touch /etc/pki/certmaster/ca/*
rm -f /etc/pki/certmaster/*
echo "restarting func"
sv stop funcd
+ sv stop certmaster
sleep 3
+ sv start certmaster
sv start funcd
fi
diff --git a/abs/core/func/func_ssl_patch b/abs/core/func/func_ssl_patch
new file mode 100644
index 0000000..cccfe4a
--- /dev/null
+++ b/abs/core/func/func_ssl_patch
@@ -0,0 +1,12 @@
+--- a/func/overlord/sslclient.py
++++ b/func/overlord/sslclient.py
+@@ -23,7 +23,11 @@ class SSL_Transport(xmlrpclib.Transport):
+ # Yay for Python 2.2
+ pass
+ _host, _port = urllib.splitport(host)
+- return SSLCommon.HTTPS(_host, int(_port), ssl_context=self.ssl_ctx, timeout=self._timeout)
++ if hasattr(xmlrpclib.Transport, 'single_request'):
++ cnx_class = SSLCommon.HTTPSConnection
++ else:
++ cnx_class = SSLCommon.HTTPS
++ return cnx_class(_host, int(_port), ssl_context=self.ssl_ctx, timeout=self._timeout)
diff --git a/abs/core/func/logrotate-func.conf b/abs/core/func/logrotate-func.conf
new file mode 100644
index 0000000..0160bdc
--- /dev/null
+++ b/abs/core/func/logrotate-func.conf
@@ -0,0 +1,14 @@
+/var/log/func/audit.log {
+ missingok
+ notifempty
+ rotate 0
+ compress
+ size 512k
+ postrotate
+ if [ -f /service/funcd ]; then
+ sv restart funcd
+ fi
+ endscript
+}
+
+
diff --git a/abs/core/func/msg.py b/abs/core/func/msg.py
index 43214f3..e776b69 100644
--- a/abs/core/func/msg.py
+++ b/abs/core/func/msg.py
@@ -18,76 +18,6 @@ class msg(func_module.FuncModule):
api_version = "0.0.1"
description = "Display messages"
-#class msg():
- def scroll(self,osd, width, height, display_time,position):
- pos = position
- step = 1
-
- osd.set_position(pos, width, height)
- (x, y, _, _) = osd.get_geometry()
- osd.set_position_offset(width, height)
- osd.show()
-
- x -= 1
- y += height - 1;
- for i in range(1, height + 1, step):
- osd.loop_for(5)
- y -= step
- osd.set_geometry(x, y, width, i)
-
- osd.set_position(pos, width, height)
- osd.set_position_offset(-1, -1)
- (x, y, _, _) = osd.get_geometry()
- #time to display
- osd.loop_for(display_time)
-
- for i in range(height, 0, -step):
- y += step
- osd.set_geometry(x, y, width, i);
- osd.loop_for(1);
-
- osd.hide();
-
- def setup(self,font_color,font_type):
- osd = aosd.AosdText()
- osd.set_transparency(aosd.TRANSPARENCY_COMPOSITE)
- if osd.get_transparency() != aosd.TRANSPARENCY_COMPOSITE:
- osd.set_transparency(aosd.TRANSPARENCY_NONE)
-
- osd.geom_x_offset = 10
- osd.geom_y_offset = 0
-
- osd.back_color = "white"
- osd.back_opacity = 50
-
- osd.shadow_color = "black"
- osd.shadow_opacity = 127
- osd.shadow_x_offset = 2
- osd.shadow_y_offset = 2
-
- osd.fore_color = font_color
- osd.fore_opacity = 255
-
- osd.set_font(font_type)
- osd.wrap = aosd.PANGO_WRAP_WORD_CHAR
- osd.alignment = aosd.PANGO_ALIGN_LEFT
- osd.set_layout_width(osd.get_screen_wrap_width())
- return osd
-
- def set_string(self, osd, text):
- osd.set_text(text)
- return osd.get_text_size()
-
- def setup_config(self):
- module_config = ConfigParser.RawConfigParser()
- try:
- module_config.read('/usr/MythVantage/etc/msg.cfg')
- except:
- pass
- return module_config
-
-
-
def display (self,flags):
"""
parse the msg for display.
@@ -99,37 +29,12 @@ class msg(func_module.FuncModule):
except:
text=flags
config_section="default"
-
- module_config = self.setup_config()
-
- display_time=5000
- position=6
- font_color="green"
- font_type="Times New Roman Italic 36"
- try:
- display_time = int(module_config.get(config_section,"display_time"))
- except:
- pass
- try:
- position = int(module_config.get(config_section,"position"))
- except:
- pass
- try:
- font_color = module_config.get(config_section,"font_color")
- except:
- pass
- try:
- font_type = module_config.get(config_section,"font_type")
- except:
- pass
-
-
+ text=flags
+ cmd = sub_process.Popen("/usr/LH/bin/msg_client.py --msg \"%s\" " % text,stdout=sub_process.PIPE,shell=True)
+ data = cmd.communicate()[0]
+
cmd = sub_process.Popen("/usr/bin/wall %s" % text,stdout=sub_process.PIPE,shell=True)
data = cmd.communicate()[0]
- osd = self.setup(font_color, font_type)
- width, height = self.set_string(osd, text)
- self.scroll(osd, width, height, display_time, position)
-
return ("Message delivered")
diff --git a/abs/core/func/pacman.py b/abs/core/func/pacman.py
index ee9f9ea..a01e632 100644
--- a/abs/core/func/pacman.py
+++ b/abs/core/func/pacman.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
# other modules