diff options
Diffstat (limited to 'abs/core')
43 files changed, 1743 insertions, 531 deletions
diff --git a/abs/core/LinHES-config/LH_HELP b/abs/core/LinHES-config/LH_HELP new file mode 100644 index 0000000..809a4ad --- /dev/null +++ b/abs/core/LinHES-config/LH_HELP @@ -0,0 +1,14 @@ +Visit http://linhes.org for additional help. + +KEYBOARD SHORTCUTS +Alt + h: This Screen +Alt + x: Open New Terminal (xterm) +Alt + m: Open mythfrontend +m in mythfrontend: Display Power/About Menu +Alt + 1: Start Master mythbackend +Alt + 2: Stop Master mythbackend +Alt + 3: Restart Master mythbackend +Alt + s: Open mythtv-setup +Alt + u: Unhide/Hide Mouse Pointer +Alt + w: Open Web Browser (Chrome if installed) +Alt + f: Restart Window Manager diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD index 86a9c5c..9d8cbc9 100755 --- a/abs/core/LinHES-config/PKGBUILD +++ b/abs/core/LinHES-config/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-config pkgver=8.5.1 -pkgrel=1 +pkgrel=2 conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev LinHes-config ) pkgdesc="Install and configure your system" depends=('bc' 'libstatgrab' 'mysql-python' 'expect' 'curl' 'dnsutils' 'parted' @@ -32,6 +32,7 @@ source=(mv_install.py 09_mythvantge_runit_grub udev_link.sh restore_km_db_chroot.sh README + LH_HELP mv_advanced.py mv_common.py mv_ddns.py @@ -118,6 +119,8 @@ package() { #README file displayed on install install -m 0755 README $MVDIR/README + #LH_HELP file displayed with Alt+H shortcut + install -m 0755 LH_HELP $MVDIR/LH_HELP mkdir -p $pkgdir/usr/bin install -m 0755 file_time_offset.py $pkgdir/usr/bin/file_time_offset.py @@ -165,6 +168,7 @@ md5sums=('518c868141fe443e9258144c029ed3f9' 'd3490e93f313bbbcbc6c3693c56b9c17' 'e959df98947eb0d2ea64ff616b61aab5' '2506860a416e1988934225d80d501c2c' + '3ff600acf742700bb55b719dab863d15' 'f57200b66b6cf384f2c784b3e4303503' 'b3505d27b65a4d35e252e2d256909e80' 'b845de3e05c1734cce4b9ac5e8f1baaf' diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD index 3ff5184..5ecc711 100755 --- a/abs/core/LinHES-system/PKGBUILD +++ b/abs/core/LinHES-system/PKGBUILD @@ -1,5 +1,5 @@ pkgname=LinHES-system -pkgver=8.5 +pkgver=8.5.1 pkgrel=2 arch=('i686' 'x86_64') install=system.install @@ -128,15 +128,15 @@ md5sums=('c6e6b83a1f4c35ef4501e277657ab2ac' '8b0298f70f97cc1dc2a58b9a73c64bd3' 'd2f1bec810a740885d9c0a2893186587' 'e30bf8ec8b9dcc2ceb7127375a91d8d1' - 'e9f545c3bcf9c85b45496c281fc6a1b8' + 'a8bbc553cd784ebed2197b96b60addc8' 'a94fe6d980f4b810f2e2ae5352084b39' '0d1632ea63d8145c173c6aecf0b007f0' 'ff689f2e9572a78d88384b2e5774f579' '28f29578e5b3ba84fdf2aa57cf475bcf' '4a1fda884dcd7d65fb2690fbdbd92a83' '29f451783db3220b612e00c29e3ded73' - 'de3028ed75b53bd2f85ffbfdf64c44c2' - '95c092f67036a361ef7a57436f44332e' + '7fe42dfc99af42a45440c9c3954c3c19' + '411b2c22c66833cc8e85021992409f1f' '410795ef9039e4c6c0484e706ecfd567' 'eb879fee9603a05d5420d4ce8ed9e450' '02c810c2f47b7c4495fdacaf54189473' diff --git a/abs/core/LinHES-system/idle.py b/abs/core/LinHES-system/idle.py index 05dedac..2c1a749 100755 --- a/abs/core/LinHES-system/idle.py +++ b/abs/core/LinHES-system/idle.py @@ -226,8 +226,7 @@ def mythfe_check(cmdargs,cursor,mythDB): else: msg(cmdargs," Checking for playing mythfrontends...") try: - #frontends = mythDB.getFrontends() #use cursor instead so it doesn't test connection - cursor.execute("select hostname from settings where value = 'FrontendIdleTimeout'") + cursor.execute("select distinct hostname from settings where hostname is not null;") frontends=cursor.fetchall() except: return True @@ -242,14 +241,15 @@ def mythfe_check(cmdargs,cursor,mythDB): location = frontend.sendQuery('Location') if location == "standbymode": - msg(cmdargs," %s's mythfrontend is in StandbyMode." %i) - return True + msg(cmdargs," %s's mythfrontend is in Standby Mode." %i) + continue if ( location.startswith('Playback ') ): msg(cmdargs," %s's mythfrontend is PLAYING." %i) return False else: msg(cmdargs," %s's mythfrontend is NOT playing." %i) + if '.xml' in location or 'mainmenu' in location: msg(cmdargs," %s's mythfrontend is in MENUS." %i) else: diff --git a/abs/core/LinHES-system/mythwelcome-config.py b/abs/core/LinHES-system/mythwelcome-config.py index 204a6e9..f3f96fc 100755 --- a/abs/core/LinHES-system/mythwelcome-config.py +++ b/abs/core/LinHES-system/mythwelcome-config.py @@ -1,6 +1,7 @@ #!/usr/bin/env python2 -# This script will configure the myth db to allow MythWelcome to wake and shutdown the system. +# This script will configure the myth db to allow MythWelcome +# or mythbackend to wake and shutdown the system. from socket import gethostname from MythTV import MythDB @@ -11,8 +12,8 @@ localhostname = gethostname() mythdb.settings[localhostname].MythShutdownNvramCmd = u'sudo sh -c \"/usr/LH/bin/mythwelcome-set-alarm.sh $time\"' mythdb.settings[localhostname].MythShutdownWakeupTimeFmt = u'time_t' mythdb.settings[localhostname].MythShutdownNvramRestartCmd = u'' -mythdb.settings[localhostname].MythShutdownReboot = u'sudo /sbin/reboot' -mythdb.settings[localhostname].MythShutdownPowerOff = u'sudo /sbin/poweroff' +mythdb.settings[localhostname].MythShutdownReboot = u'sudo /usr/bin/reboot' +mythdb.settings[localhostname].MythShutdownPowerOff = u'sudo /usr/bin/poweroff' mythdb.settings[localhostname].MythShutdownXTermCmd = u'xterm' mythdb.settings[localhostname].MythWelcomeStartFECmd = u'/usr/LH/bin/mythfrontend-start' @@ -27,4 +28,4 @@ if mythdb.settings[localhostname].HostSystemType == u'Master_backend': mythdb.settings.NULL.WakeupTimeFormat = u'yyyy-MM-ddThh:mm:ss' mythdb.settings.NULL.SetWakeuptimeCommand = u'/usr/bin/mythshutdown --setwakeup $time' mythdb.settings.NULL.ServerHaltCommand = u'/usr/bin/mythshutdown --shutdown' -mythdb.settings.NULL.preSDWUCheckCommand = u'/usr/LH/bin/idle.py -s -d -l -r' +mythdb.settings.NULL.preSDWUCheckCommand = u'/usr/LH/bin/idle.py -s -d -l' diff --git a/abs/core/LinHES-system/mythwelcome-set-alarm.sh b/abs/core/LinHES-system/mythwelcome-set-alarm.sh index 990adf7..7b10372 100755 --- a/abs/core/LinHES-system/mythwelcome-set-alarm.sh +++ b/abs/core/LinHES-system/mythwelcome-set-alarm.sh @@ -1,6 +1,6 @@ #!/bin/sh #$1 is the first argument to the script. It is the time in seconds since 1970 -#This is defined in mythwelcome with the time_t argument +#This is defined in mythwelcome and mythbackend with the time_t argument. # Configure mythwelcome --setup page: # Command to Set Wakeup Time: sudo sh -c "/usr/LH/bin/mythwelcome-set-alarm.sh $time" @@ -16,7 +16,7 @@ # Wakeup time format: yyyy-MM-ddThh:mm:ss # Set wakeup time command: /usr/bin/mythshutdown --setwakeup $time # Server Halt command: /usr/bin/mythshutdown --shutdown -# Pre shutdown check command: /usr/bin/mythshutdown --check +# Pre shutdown check command: /usr/bin/mythshutdown --check echo 0 > /sys/class/rtc/rtc0/wakealarm #this clears your alarm echo $1 > /sys/class/rtc/rtc0/wakealarm #this writes your alarm diff --git a/abs/core/ceton_infinitv/PKGBUILD b/abs/core/ceton_infinitv/PKGBUILD index 0ebb33d..9768d79 100755 --- a/abs/core/ceton_infinitv/PKGBUILD +++ b/abs/core/ceton_infinitv/PKGBUILD @@ -2,10 +2,10 @@ pkgname=ceton_infinitv #_kernver=`uname -r` -_kernver=4.9.64-1-ARCH +_kernver=4.9.73-1-ARCH _extramods="extramodules-4.9-ARCH" pkgver=2013.0326.2226 -pkgrel=23 +pkgrel=24 usb_pkgver=0.1.0 pci_pkgver=`echo $pkgver | tr . _` pkgdesc="Drivers for Ceton InfiniTV4 - pci/usb " diff --git a/abs/core/linhes-theme/PKGBUILD b/abs/core/linhes-theme/PKGBUILD index 0420f3e..d45b85e 100755 --- a/abs/core/linhes-theme/PKGBUILD +++ b/abs/core/linhes-theme/PKGBUILD @@ -1,5 +1,5 @@ pkgname=linhes-theme -pkgver=8.5 +pkgver=8.5.1 pkgrel=4 pkgdesc="Default LinHES MythTV theme" arch=('i686' 'x86_64') @@ -112,15 +112,15 @@ md5sums=('2dca856c2a4d1f959473512c94e43b60' '643e7d548587b8742ed5accb6d736257' 'dd1e013e806efc26049ea89637a51f83' '9fe3371a8b964a7028126405cfaa330b' - '537e12f58ae8da81176d8b982ac9c783' + '958d25f7b932c923cf9f8376063eeb57' 'a0b6733e4a6734a3c24e8dc3b0c14e74' '384871202030f41148536e2e89bb1801' - '4d01487b534e45c631734501ec0da501' + '979cdd540b672e3383b33188ccb247b6' '8312aff444945f80a76100696c81cb2e' '81a2706cd36a16a1e0c54d87f3a0857b' '4125880d1739b196a8041ecc3d773ee2' '5a8fb2a5f0e657d52be6f0a6a006ce72' - '36952501471b05395e4f061557447b2f' + '274b6f8cb5cd82c5ce28422decd7754b' 'bfc32b9fa5dca3d46dd6f365ecb449b5' '326a71eb795b322a9ea26f116d890c87' '8fcd0acc11f4db33a9442949fb1a293d' diff --git a/abs/core/linhes-theme/install-ui.xml b/abs/core/linhes-theme/install-ui.xml index 4e5f139..823b0dc 100644 --- a/abs/core/linhes-theme/install-ui.xml +++ b/abs/core/linhes-theme/install-ui.xml @@ -122,4 +122,67 @@ </window> + <window name="questionnotice_screen"> + + <textarea name="title" from="base_heading"> + <value></value> + </textarea> + + <shape name="questionnotice-backdrop" from="base_backdrop"> + <area>115,36,1050,649</area> + </shape> + + <shape name="questionnotice-backdrop-line" from="base_backdrop_line"> + <area>116,37,1048,647</area> + </shape> + + <shape name="questionnotice-top-line" from="base_highlight_line"> + <area>117,38,1046,2</area> + </shape> + + <shape name="questionnotice-bottom-line" from="base_highlight_line"> + <area>117,681,1046,2</area> + </shape> + + <shape name="questionnotice-left-line" from="base_highlight_vertical_line"> + <area>117,40,2,641</area> + </shape> + + <shape name="questionnotice-right-line" from="base_highlight_vertical_line"> + <area>1161,40,2,641</area> + </shape> + + <shape name="questionnotice-bottom-seperator-line" from="base_line"> + <area>138,620,1004,2</area> + </shape> + + <textarea name="notice_text" from="basetextarea"> + <multiline>yes</multiline> + <area>138,58,1004,562</area> + <font>baselarge</font> + <value></value> + <align>top,hcenter</align> + </textarea> + + <textarea name="question_text" from="notice_text"> + <align>allcenter</align> + </textarea> + + <button name="yes_button" from="base_button"> + <area>233,632,350,40</area> + <value></value> + </button> + + <button name="no_button" from="base_button"> + <area>697,632,350,40</area> + <value></value> + </button> + + <button name="ok_button" from="base_button"> + <area>465,632,350,40</area> + <value>OK</value> + </button> + + </window> + </mythuitheme> diff --git a/abs/core/linhes-theme/recordings-ui.xml.patch b/abs/core/linhes-theme/recordings-ui.xml.patch index 77969dc..e70625a 100644 --- a/abs/core/linhes-theme/recordings-ui.xml.patch +++ b/abs/core/linhes-theme/recordings-ui.xml.patch @@ -1,5 +1,5 @@ ---- recordings-ui.xml.orig 2016-11-16 20:12:29.390254787 +0000 -+++ recordings-ui.xml 2016-12-23 02:34:31.313887659 +0000 +--- recordings-ui.xml.orig 2017-12-19 19:51:38.610985722 +0000 ++++ recordings-ui.xml 2017-12-19 19:51:28.052356436 +0000 @@ -105,19 +105,11 @@ </shape> @@ -30,7 +30,15 @@ <multiline>yes</multiline> </textarea> </state> -@@ -232,16 +225,16 @@ +@@ -218,6 +211,7 @@ + </textarea> + <textarea name="shortstartdate" from="titlesubtitle"> + <area>720,0,80,30</area> ++ <cutdown>no</cutdown> + <align>right,vcenter</align> + </textarea> + <textarea name="filesize_str" from="base_text_font_state_extrasmall"> +@@ -232,16 +226,17 @@ <area>0,0,898,64</area> <textarea name="titlesubtitle" from="base_text_font_state_small"> <area>8,2,694,24</area> @@ -41,6 +49,7 @@ <textarea name="shortstartdate" from="titlesubtitle"> - <area>720,3,80,24</area> + <area>720,2,80,24</area> ++ <cutdown>no</cutdown> <align>right,vcenter</align> </textarea> <textarea name="filesize_str" from="base_text_font_state_extrasmall"> @@ -51,7 +60,7 @@ <cutdown>no</cutdown> <align>right,vcenter</align> </textarea> -@@ -579,20 +572,20 @@ +@@ -579,20 +574,20 @@ <align>allcenter</align> </textarea> <textarea name="s00e00" from="base_text_font_state_extrasmall"> @@ -75,7 +84,7 @@ <font state="normal">baseextrasmall</font> <align>right,vcenter</align> </textarea> -@@ -606,57 +599,48 @@ +@@ -606,57 +601,48 @@ </statetype> </buttonlist> @@ -145,7 +154,7 @@ <font>basesupersmallyellow</font> <align>allcenter</align> <template>Disk space: %1</template> -@@ -688,7 +672,7 @@ +@@ -688,7 +674,7 @@ <textarea name="norecordings"> <area>350,87,906,351</area> <font>basemedium</font> diff --git a/abs/core/linhes-theme/status-ui.xml.patch b/abs/core/linhes-theme/status-ui.xml.patch index 9c26d77..400f14c 100644 --- a/abs/core/linhes-theme/status-ui.xml.patch +++ b/abs/core/linhes-theme/status-ui.xml.patch @@ -1,53 +1,197 @@ ---- status-ui.xml.orig 2017-01-12 02:25:29.328323754 +0000 -+++ status-ui.xml 2017-01-12 02:19:35.527174739 +0000 -@@ -212,9 +212,9 @@ +--- status-ui.xml.orig 2018-01-03 21:51:16.028700351 +0000 ++++ status-ui.xml 2018-01-03 21:21:37.423911248 +0000 +@@ -170,100 +170,140 @@ + </window> - <textarea name="title"> - <area>4,4,552,64</area> + <window name="standbymode"> +- <area>-1,-1,568,320</area> ++ <area>0,0,1280,720</area> + +- <animation trigger="AboutToShow"> +- <section> +- <alpha start="0" end="255" easingcurve="OutQuart"/> +- <zoom start="0" end="100" easingcurve="OutQuart"/> +- </section> +- </animation> +- +- <animation trigger="AboutToHide"> +- <section> +- <alpha start="255" end="0" easingcurve="InQuart"/> +- <zoom start="100" end="0" easingcurve="InQuart"/> +- </section> +- </animation> ++ <textarea name="heading" from="base_heading"> ++ <value>Standby</value> ++ </textarea> + + <shape name="standbymode-backdrop" from="base_backdrop"> +- <area>0,0,568,320</area> ++ <area>20,36,1240,649</area> + </shape> + + <shape name="standbymode-backdrop-line" from="base_backdrop_line"> +- <area>1,1,566,318</area> ++ <area>21,37,1238,647</area> + </shape> + + <shape name="standbymode-top-line" from="base_highlight_line"> +- <area>2,2,564,2</area> ++ <area>22,38,1236,2</area> + </shape> + + <shape name="standbymode-bottom-line" from="base_highlight_line"> +- <area>2,316,564,2</area> ++ <area>22,681,1236,2</area> + </shape> + + <shape name="standbymode-left-line" from="base_highlight_vertical_line"> +- <area>2,4,2,312</area> ++ <area>22,40,2,641</area> + </shape> + + <shape name="standbymode-right-line" from="base_highlight_vertical_line"> +- <area>564,4,2,312</area> ++ <area>1256,40,2,641</area> + </shape> + +- <textarea name="title"> +- <area>4,4,552,64</area> - <font>basemedium</font> -+ <font>basemediumyellow</font> - <align>allcenter</align> +- <align>allcenter</align> - <value>MythTV is in standby mode!</value> -+ <value>MythTV is in Standby Mode</value> - </textarea> +- </textarea> ++ <shape name="standbymode-status-seperator-line" from="base_line"> ++ <area>43,100,1194,2</area> ++ </shape> ++ ++ <shape name="standbymode-recording-status-seperator-line" from="base_line"> ++ <area>43,318,1194,2</area> ++ </shape> ++ ++ <shape name="standbymode-scheduled-recording-status-seperator-line" from="base_line"> ++ <area>43,536,1194,2</area> ++ </shape> <statetype name="backendstatus"> -@@ -230,7 +230,7 @@ - <textarea name="status"> - <area>4,248,552,64</area> - <font>basemediumgreen</font> +- <area>4,4,560,312</area> ++ <area>40,40,1200,60</area> + <state name="idle"> +- <area>0,0,560,312</area> +- <shape name="icon"> +- <area>74,64,412,184</area> +- <type>roundbox</type> +- <fill color="#80d400" /> +- <cornerradius>5</cornerradius> +- </shape> +- <textarea name="status"> +- <area>4,248,552,64</area> +- <font>basemediumgreen</font> - <value>Backend is idle!</value> ++ <area>0,0,1200,60</area> ++ <textarea name="status" from="basetextarea"> ++ <area>0,0,1200,60</area> ++ <font>baseextralarge</font> + <value>Backend is Idle</value> <align>allcenter</align> - <multiline>true</multiline> +- <multiline>true</multiline> </textarea> -@@ -241,16 +241,16 @@ - </shape> + </state> + <state name="recording" from="idle"> +- <shape name="icon"> +- <fill color="#d93636" /> +- </shape> <textarea name="status"> - <font>basemediumred</font> +- <font>basemediumred</font> - <value>Backend is recording!</value> + <value>Backend is Recording</value> </textarea> </state> <state name="shuttingdown" from="idle"> - <shape name="icon"> +- <shape name="icon"> - <fill color="#d9d900" /> -+ <fill color="#d97616" /> - </shape> +- </shape> <textarea name="status"> - <font>basemediumyellow</font> - <value>Shutting Down!</value> -+ <font>basemediumorange</font> + <value>MythTV is Shutting Down</value> </textarea> </state> <state name="offline" from="idle"> -@@ -259,7 +259,7 @@ - </shape> +- <shape name="icon"> +- <fill color="#d93636" /> +- </shape> <textarea name="status"> - <font>basemediumred</font> +- <font>basemediumred</font> - <value>Backend is offline!</value> + <value>Backend is Offline</value> </textarea> </state> </statetype> + ++ <textarea name="currentrecordingheading" from="basetextarea"> ++ <area>40,110,1200,30</area> ++ <font>basemediumlargerdarkyellow</font> ++ <align>allcenter</align> ++ <value>Currently Recording</value> ++ </textarea> ++ <textarea name="nothingrecording" depends="!currentrecording"> ++ <area>40,144,1200,170</area> ++ <font>basesmall</font> ++ <align>hcenter,top</align> ++ <value>Nothing is Recording</value> ++ </textarea> ++ <buttonlist name="currentrecording"> ++ <area>40,144,1200,170</area> ++ <layout>vertical</layout> ++ <spacing>4</spacing> ++ <scrollstyle>free</scrollstyle> ++ <arrange>stack</arrange> ++ <wrapstyle>items</wrapstyle> ++ <buttonarea>0,0,100%,100%</buttonarea> ++ <statetype name="buttonitem"> ++ <state name="active"> ++ <textarea name="shorttimedate" from="basetextarea"> ++ <area>0,1,400,24</area> ++ <align>right,vcenter</align> ++ </textarea> ++ <textarea name="channame" from="shorttimedate"> ++ <area>405,1,180,24</area> ++ <align>allcenter</align> ++ </textarea> ++ <textarea name="titlesubtitle" from="shorttimedate"> ++ <area>590,1,610,24</area> ++ <align>left,vcenter</align> ++ </textarea> ++ </state> ++ <state name="selectedactive" from="active"/> ++ <state name="selectedinactive" from="selectedactive" /> ++ </statetype> ++ </buttonlist> ++ ++ <textarea name="nextrecordingheading" from="currentrecordingheading"> ++ <area>40,328,1200,30</area> ++ <value>Upcoming Recordings</value> ++ </textarea> ++ <textarea name="nothingscheduled" depends="!nextrecording" from="nothingrecording"> ++ <area>40,362,1200,170</area> ++ <value>No Recordings Are Scheduled</value> ++ </textarea> ++ <buttonlist name="nextrecording" from="currentrecording"> ++ <area>40,362,1200,170</area> ++ </buttonlist> ++ ++ <textarea name="conflictsheading" from="nextrecordingheading"> ++ <area>40,546,1200,30</area> ++ <value>Recording Conflicts</value> ++ </textarea> ++ <textarea name="nothingconflicted" depends="!conflicts" from="nothingrecording"> ++ <area>40,580,1200,91</area> ++ <value>No Conflicts</value> ++ </textarea> ++ <buttonlist name="conflicts" from="currentrecording"> ++ <area>40,580,1200,91</area> ++ </buttonlist> ++ + </window> + + </mythuitheme> diff --git a/abs/core/linux/000-enable-alx-wol-4.9.patch b/abs/core/linux/000-enable-alx-wol-4.9.patch new file mode 100644 index 0000000..3428afd --- /dev/null +++ b/abs/core/linux/000-enable-alx-wol-4.9.patch @@ -0,0 +1,475 @@ +diff -u drivers/net/ethernet/atheros/alx/ethtool.c drivers/net/ethernet/atheros/alx/ethtool.c +--- drivers/net/ethernet/atheros/alx/ethtool.c 2016-12-11 20:17:54.000000000 +0100 ++++ drivers/net/ethernet/atheros/alx/ethtool.c 2016-12-13 13:36:36.464047098 +0100 +@@ -299,6 +299,40 @@ + } + } + ++static void alx_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) ++{ ++ struct alx_priv *alx = netdev_priv(netdev); ++ struct alx_hw *hw = &alx->hw; ++ ++ wol->supported = WAKE_MAGIC | WAKE_PHY; ++ wol->wolopts = 0; ++ ++ if (hw->sleep_ctrl & ALX_SLEEP_WOL_MAGIC) ++ wol->wolopts |= WAKE_MAGIC; ++ if (hw->sleep_ctrl & ALX_SLEEP_WOL_PHY) ++ wol->wolopts |= WAKE_PHY; ++} ++ ++static int alx_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) ++{ ++ struct alx_priv *alx = netdev_priv(netdev); ++ struct alx_hw *hw = &alx->hw; ++ ++ if (wol->wolopts & ~(WAKE_MAGIC | WAKE_PHY)) ++ return -EOPNOTSUPP; ++ ++ hw->sleep_ctrl = 0; ++ ++ if (wol->wolopts & WAKE_MAGIC) ++ hw->sleep_ctrl |= ALX_SLEEP_WOL_MAGIC; ++ if (wol->wolopts & WAKE_PHY) ++ hw->sleep_ctrl |= ALX_SLEEP_WOL_PHY; ++ ++ device_set_wakeup_enable(&alx->hw.pdev->dev, hw->sleep_ctrl); ++ ++ return 0; ++} ++ + const struct ethtool_ops alx_ethtool_ops = { + .get_settings = alx_get_settings, + .set_settings = alx_set_settings, +@@ -306,6 +340,8 @@ + .set_pauseparam = alx_set_pauseparam, + .get_msglevel = alx_get_msglevel, + .set_msglevel = alx_set_msglevel, ++ .get_wol = alx_get_wol, ++ .set_wol = alx_set_wol, + .get_link = ethtool_op_get_link, + .get_strings = alx_get_strings, + .get_sset_count = alx_get_sset_count, +diff -u drivers/net/ethernet/atheros/alx/hw.c drivers/net/ethernet/atheros/alx/hw.c +--- drivers/net/ethernet/atheros/alx/hw.c 2016-12-11 20:17:54.000000000 +0100 ++++ drivers/net/ethernet/atheros/alx/hw.c 2016-12-13 13:36:36.464047098 +0100 +@@ -332,6 +332,16 @@ + alx_write_mem32(hw, ALX_STAD1, val); + } + ++static void alx_enable_osc(struct alx_hw *hw) ++{ ++ u32 val; ++ ++ /* rising edge */ ++ val = alx_read_mem32(hw, ALX_MISC); ++ alx_write_mem32(hw, ALX_MISC, val & ~ALX_MISC_INTNLOSC_OPEN); ++ alx_write_mem32(hw, ALX_MISC, val | ALX_MISC_INTNLOSC_OPEN); ++} ++ + static void alx_reset_osc(struct alx_hw *hw, u8 rev) + { + u32 val, val2; +@@ -848,6 +858,66 @@ + } + } + ++ ++/* NOTE: ++ * 1. phy link must be established before calling this function ++ * 2. wol option (pattern,magic,link,etc.) is configed before call it. ++ */ ++int alx_pre_suspend(struct alx_hw *hw, int speed, u8 duplex) ++{ ++ u32 master, mac, phy, val; ++ int err = 0; ++ ++ master = alx_read_mem32(hw, ALX_MASTER); ++ master &= ~ALX_MASTER_PCLKSEL_SRDS; ++ mac = hw->rx_ctrl; ++ /* 10/100 half */ ++ ALX_SET_FIELD(mac, ALX_MAC_CTRL_SPEED, ALX_MAC_CTRL_SPEED_10_100); ++ mac &= ~(ALX_MAC_CTRL_FULLD | ALX_MAC_CTRL_RX_EN | ALX_MAC_CTRL_TX_EN); ++ ++ phy = alx_read_mem32(hw, ALX_PHY_CTRL); ++ phy &= ~(ALX_PHY_CTRL_DSPRST_OUT | ALX_PHY_CTRL_CLS); ++ phy |= ALX_PHY_CTRL_RST_ANALOG | ALX_PHY_CTRL_HIB_PULSE | ++ ALX_PHY_CTRL_HIB_EN; ++ ++ /* without any activity */ ++ if (!(hw->sleep_ctrl & ALX_SLEEP_ACTIVE)) { ++ err = alx_write_phy_reg(hw, ALX_MII_IER, 0); ++ if (err) ++ return err; ++ phy |= ALX_PHY_CTRL_IDDQ | ALX_PHY_CTRL_POWER_DOWN; ++ } else { ++ if (hw->sleep_ctrl & (ALX_SLEEP_WOL_MAGIC | ALX_SLEEP_CIFS)) ++ mac |= ALX_MAC_CTRL_RX_EN | ALX_MAC_CTRL_BRD_EN; ++ if (hw->sleep_ctrl & ALX_SLEEP_CIFS) ++ mac |= ALX_MAC_CTRL_TX_EN; ++ if (duplex == DUPLEX_FULL) ++ mac |= ALX_MAC_CTRL_FULLD; ++ if (speed == SPEED_1000) ++ ALX_SET_FIELD(mac, ALX_MAC_CTRL_SPEED, ++ ALX_MAC_CTRL_SPEED_1000); ++ phy |= ALX_PHY_CTRL_DSPRST_OUT; ++ err = alx_write_phy_ext(hw, ALX_MIIEXT_ANEG, ++ ALX_MIIEXT_S3DIG10, ++ ALX_MIIEXT_S3DIG10_SL); ++ if (err) ++ return err; ++ } ++ ++ alx_enable_osc(hw); ++ hw->rx_ctrl = mac; ++ alx_write_mem32(hw, ALX_MASTER, master); ++ alx_write_mem32(hw, ALX_MAC_CTRL, mac); ++ alx_write_mem32(hw, ALX_PHY_CTRL, phy); ++ ++ /* set val of PDLL D3PLLOFF */ ++ val = alx_read_mem32(hw, ALX_PDLL_TRNS1); ++ val |= ALX_PDLL_TRNS1_D3PLLOFF_EN; ++ alx_write_mem32(hw, ALX_PDLL_TRNS1, val); ++ ++ return 0; ++} ++ + bool alx_phy_configured(struct alx_hw *hw) + { + u32 cfg, hw_cfg; +@@ -920,6 +990,26 @@ + return alx_read_phy_reg(hw, ALX_MII_ISR, &isr); + } + ++int alx_config_wol(struct alx_hw *hw) ++{ ++ u32 wol = 0; ++ int err = 0; ++ ++ /* turn on magic packet event */ ++ if (hw->sleep_ctrl & ALX_SLEEP_WOL_MAGIC) ++ wol |= ALX_WOL0_MAGIC_EN | ALX_WOL0_PME_MAGIC_EN; ++ ++ /* turn on link up event */ ++ if (hw->sleep_ctrl & ALX_SLEEP_WOL_PHY) { ++ wol |= ALX_WOL0_LINK_EN | ALX_WOL0_PME_LINK; ++ /* only link up can wake up */ ++ err = alx_write_phy_reg(hw, ALX_MII_IER, ALX_IER_LINK_UP); ++ } ++ alx_write_mem32(hw, ALX_WOL0, wol); ++ ++ return err; ++} ++ + void alx_disable_rss(struct alx_hw *hw) + { + u32 ctrl = alx_read_mem32(hw, ALX_RXQ0); +@@ -1045,6 +1135,71 @@ + } + + ++int alx_select_powersaving_speed(struct alx_hw *hw, int *speed, u8 *duplex) ++{ ++ int i, err; ++ u16 lpa; ++ ++ err = alx_read_phy_link(hw); ++ if (err) ++ return err; ++ ++ if (hw->link_speed == SPEED_UNKNOWN) { ++ *speed = SPEED_UNKNOWN; ++ *duplex = DUPLEX_UNKNOWN; ++ return 0; ++ } ++ ++ err = alx_read_phy_reg(hw, MII_LPA, &lpa); ++ if (err) ++ return err; ++ ++ if (!(lpa & LPA_LPACK)) { ++ *speed = hw->link_speed; ++ return 0; ++ } ++ ++ if (lpa & LPA_10FULL) { ++ *speed = SPEED_10; ++ *duplex = DUPLEX_FULL; ++ } else if (lpa & LPA_10HALF) { ++ *speed = SPEED_10; ++ *duplex = DUPLEX_HALF; ++ } else if (lpa & LPA_100FULL) { ++ *speed = SPEED_100; ++ *duplex = DUPLEX_FULL; ++ } else { ++ *speed = SPEED_100; ++ *duplex = DUPLEX_HALF; ++ } ++ ++ if (*speed == hw->link_speed && *duplex == hw->duplex) ++ return 0; ++ err = alx_write_phy_reg(hw, ALX_MII_IER, 0); ++ if (err) ++ return err; ++ err = alx_setup_speed_duplex(hw, alx_speed_to_ethadv(*speed, *duplex) | ++ ADVERTISED_Autoneg, ALX_FC_ANEG | ++ ALX_FC_RX | ALX_FC_TX); ++ if (err) ++ return err; ++ ++ /* wait for linkup */ ++ for (i = 0; i < ALX_MAX_SETUP_LNK_CYCLE; i++) { ++ msleep(100); ++ ++ err = alx_read_phy_link(hw); ++ if (err < 0) ++ return err; ++ if (hw->link_speed != SPEED_UNKNOWN) ++ break; ++ } ++ if (i == ALX_MAX_SETUP_LNK_CYCLE) ++ return -ETIMEDOUT; ++ ++ return 0; ++} ++ + bool alx_get_phy_info(struct alx_hw *hw) + { + u16 devs1, devs2; +diff -u drivers/net/ethernet/atheros/alx/hw.h drivers/net/ethernet/atheros/alx/hw.h +--- drivers/net/ethernet/atheros/alx/hw.h 2016-12-11 20:17:54.000000000 +0100 ++++ drivers/net/ethernet/atheros/alx/hw.h 2016-12-13 13:36:36.464047098 +0100 +@@ -488,6 +488,8 @@ + u8 flowctrl; + u32 adv_cfg; + ++ u32 sleep_ctrl; ++ + spinlock_t mdio_lock; + struct mdio_if_info mdio; + u16 phy_id[2]; +@@ -550,12 +552,14 @@ + void alx_enable_aspm(struct alx_hw *hw, bool l0s_en, bool l1_en); + int alx_setup_speed_duplex(struct alx_hw *hw, u32 ethadv, u8 flowctrl); + void alx_post_phy_link(struct alx_hw *hw); ++int alx_pre_suspend(struct alx_hw *hw, int speed, u8 duplex); + int alx_read_phy_reg(struct alx_hw *hw, u16 reg, u16 *phy_data); + int alx_write_phy_reg(struct alx_hw *hw, u16 reg, u16 phy_data); + int alx_read_phy_ext(struct alx_hw *hw, u8 dev, u16 reg, u16 *pdata); + int alx_write_phy_ext(struct alx_hw *hw, u8 dev, u16 reg, u16 data); + int alx_read_phy_link(struct alx_hw *hw); + int alx_clear_phy_intr(struct alx_hw *hw); ++int alx_config_wol(struct alx_hw *hw); + void alx_cfg_mac_flowcontrol(struct alx_hw *hw, u8 fc); + void alx_start_mac(struct alx_hw *hw); + int alx_reset_mac(struct alx_hw *hw); +@@ -564,6 +568,7 @@ + void alx_configure_basic(struct alx_hw *hw); + void alx_mask_msix(struct alx_hw *hw, int index, bool mask); + void alx_disable_rss(struct alx_hw *hw); ++int alx_select_powersaving_speed(struct alx_hw *hw, int *speed, u8 *duplex); + bool alx_get_phy_info(struct alx_hw *hw); + void alx_update_hw_stats(struct alx_hw *hw); + +diff -u drivers/net/ethernet/atheros/alx/main.c drivers/net/ethernet/atheros/alx/main.c +--- drivers/net/ethernet/atheros/alx/main.c 2016-12-11 20:17:54.000000000 +0100 ++++ drivers/net/ethernet/atheros/alx/main.c 2016-12-13 13:36:47.736407751 +0100 +@@ -894,6 +894,7 @@ + alx->rxbuf_size = ALX_MAX_FRAME_LEN(hw->mtu); + alx->tx_ringsz = 256; + alx->rx_ringsz = 512; ++ hw->sleep_ctrl = ALX_SLEEP_WOL_MAGIC | ALX_SLEEP_WOL_PHY; + hw->imt = 200; + alx->int_mask = ALX_ISR_MISC; + hw->dma_chnl = hw->max_dma_chnl; +@@ -1150,6 +1151,65 @@ + __alx_stop(netdev_priv(netdev)); + return 0; + } ++static int __alx_shutdown(struct pci_dev *pdev, bool *wol_en) ++{ ++ struct alx_priv *alx = pci_get_drvdata(pdev); ++ struct net_device *netdev = alx->dev; ++ struct alx_hw *hw = &alx->hw; ++ int err, speed; ++ u8 duplex; ++ ++ netif_device_detach(netdev); ++ ++ if (netif_running(netdev)) ++ __alx_stop(alx); ++ ++#ifdef CONFIG_PM_SLEEP ++ err = pci_save_state(pdev); ++ if (err) ++ return err; ++#endif ++ ++ err = alx_select_powersaving_speed(hw, &speed, &duplex); ++ if (err) ++ return err; ++ err = alx_clear_phy_intr(hw); ++ if (err) ++ return err; ++ err = alx_pre_suspend(hw, speed, duplex); ++ if (err) ++ return err; ++ err = alx_config_wol(hw); ++ if (err) ++ return err; ++ ++ *wol_en = false; ++ if (hw->sleep_ctrl & ALX_SLEEP_ACTIVE) { ++ netif_info(alx, wol, netdev, ++ "wol: ctrl=%X, speed=%X\n", ++ hw->sleep_ctrl, speed); ++ device_set_wakeup_enable(&pdev->dev, true); ++ *wol_en = true; ++ } ++ ++ pci_disable_device(pdev); ++ ++ return 0; ++} ++ ++static void alx_shutdown(struct pci_dev *pdev) ++{ ++ int err; ++ bool wol_en; ++ ++ err = __alx_shutdown(pdev, &wol_en); ++ if (!err) { ++ pci_wake_from_d3(pdev, wol_en); ++ pci_set_power_state(pdev, PCI_D3hot); ++ } else { ++ dev_err(&pdev->dev, "shutdown fail %d\n", err); ++ } ++} + + static void alx_link_check(struct work_struct *work) + { +@@ -1637,6 +1697,8 @@ + goto out_unmap; + } + ++ device_set_wakeup_enable(&pdev->dev, hw->sleep_ctrl); ++ + netdev_info(netdev, + "Qualcomm Atheros AR816x/AR817x Ethernet [%pM]\n", + netdev->dev_addr); +@@ -1679,12 +1741,21 @@ + static int alx_suspend(struct device *dev) + { + struct pci_dev *pdev = to_pci_dev(dev); +- struct alx_priv *alx = pci_get_drvdata(pdev); ++ int err; ++ bool wol_en; + +- if (!netif_running(alx->dev)) +- return 0; +- netif_device_detach(alx->dev); +- __alx_stop(alx); ++ err = __alx_shutdown(pdev, &wol_en); ++ if (err) { ++ dev_err(&pdev->dev, "shutdown fail in suspend %d\n", err); ++ return err; ++ } ++ ++ if (wol_en) { ++ pci_prepare_to_sleep(pdev); ++ } else { ++ pci_wake_from_d3(pdev, false); ++ pci_set_power_state(pdev, PCI_D3hot); ++ } + return 0; + } + +@@ -1692,20 +1763,47 @@ + { + struct pci_dev *pdev = to_pci_dev(dev); + struct alx_priv *alx = pci_get_drvdata(pdev); +- struct alx_hw *hw = &alx->hw; +- +- alx_reset_phy(hw); ++ struct net_device *netdev = alx->dev; ++ struct alx_hw *hw = &alx->hw; ++ int err; ++ ++ pci_set_power_state(pdev, PCI_D0); ++ pci_restore_state(pdev); ++ pci_save_state(pdev); ++ ++ pci_enable_wake(pdev, PCI_D3hot, 0); ++ pci_enable_wake(pdev, PCI_D3cold, 0); ++ ++ hw->link_speed = SPEED_UNKNOWN; ++ alx->int_mask = ALX_ISR_MISC; ++ ++ alx_reset_pcie(hw); ++ alx_reset_phy(hw); ++ ++ err = alx_reset_mac(hw); ++ if (err) { ++ netif_err(alx, hw, alx->dev, ++ "resume:reset_mac fail %d\n", err); ++ return -EIO; ++ } ++ ++ err = alx_setup_speed_duplex(hw, hw->adv_cfg, hw->flowctrl); ++ if (err) { ++ netif_err(alx, hw, alx->dev, ++ "resume:setup_speed_duplex fail %d\n", err); ++ return -EIO; ++ } ++ ++ if (netif_running(netdev)) { ++ err = __alx_open(alx, true); ++ if (err) ++ return err; ++ } + +- if (!netif_running(alx->dev)) +- return 0; +- netif_device_attach(alx->dev); +- return __alx_open(alx, true); ++ netif_device_attach(netdev); ++ return err; + } + +-static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume); +-#define ALX_PM_OPS (&alx_pm_ops) +-#else +-#define ALX_PM_OPS NULL + #endif + + +@@ -1751,6 +1849,8 @@ + } + + pci_set_master(pdev); ++ pci_enable_wake(pdev, PCI_D3hot, 0); ++ pci_enable_wake(pdev, PCI_D3cold, 0); + + alx_reset_pcie(hw); + if (!alx_reset_mac(hw)) +@@ -1802,11 +1902,19 @@ + {} + }; + ++#ifdef CONFIG_PM_SLEEP ++static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume); ++#define ALX_PM_OPS (&alx_pm_ops) ++#else ++#define ALX_PM_OPS NULL ++#endif ++ + static struct pci_driver alx_driver = { + .name = alx_drv_name, + .id_table = alx_pci_tbl, + .probe = alx_probe, + .remove = alx_remove, ++ .shutdown = alx_shutdown, + .err_handler = &alx_err_handlers, + .driver.pm = ALX_PM_OPS, + }; diff --git a/abs/core/linux/PKGBUILD b/abs/core/linux/PKGBUILD index f7a2962..914d8b2 100644 --- a/abs/core/linux/PKGBUILD +++ b/abs/core/linux/PKGBUILD @@ -4,7 +4,7 @@ pkgbase=linux #pkgbase=linux-custom _srcname=linux-4.9 -pkgver=4.9.64 +pkgver=4.9.73 pkgrel=1 arch=('x86_64') url="https://www.kernel.org/" @@ -19,15 +19,18 @@ source=(https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign} '90-linux.hook' # standard config files for mkinitcpio ramdisk linux.preset + # add WOL to alx + '000-enable-alx-wol-4.9.patch' change-default-console-loglevel.patch) # https://www.kernel.org/pub/linux/kernel/v4.x/sha256sums.asc sha256sums=('029098dcffab74875e086ae970e3828456838da6e0ba22ce3f64ef764f3d7f1a' 'SKIP' - 'e17b3219b2b9ebdeb180e509b3a1a6eb46d957d6a95c17f4e6b6b7199067949a' + '2af9c1806d1c4a6b90f5b105bdb6eedba8e0610712d0bab8a906bb015b2993f3' 'SKIP' '2bafc851b494310056bdc1a8bd3f5342f18c50a83594f5e5bf603406c5144ae4' '834bd254b56ab71d73f59b3221f056c72f559553c04718e350ab2a3e2991afe0' '1f036f7464da54ae510630f0edb69faa115287f86d9f17641197ffda8cfd49e0' + 'f8f6c9e9d82fac0ad1333a15418df81e2186e6a2e257aa670d1da57b4a15cafe' '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99') validpgpkeys=('ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds <torvalds@linux-foundation.org> '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman (Linux kernel stable release signing key) <greg@kroah.com> @@ -49,6 +52,9 @@ prepare() { # (relevant patch sent upstream: https://lkml.org/lkml/2011/7/26/227) patch -p1 -i "${srcdir}/change-default-console-loglevel.patch" + # add WOL to alx + patch -p0 -i "${srcdir}/000-enable-alx-wol-4.9.patch" + cat "${srcdir}/config" > ./.config if [ "${_kernelname}" != "" ]; then diff --git a/abs/core/linux/linux.install.pkg b/abs/core/linux/linux.install.pkg index c4ca093..9229cc6 100644 --- a/abs/core/linux/linux.install.pkg +++ b/abs/core/linux/linux.install.pkg @@ -2,7 +2,7 @@ # arg 2: the old package version KERNEL_NAME= -KERNEL_VERSION=4.9.64-1-ARCH +KERNEL_VERSION=4.9.73-1-ARCH post_install () { # updating module dependencies diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.cpp index 7c8f4a2..7ac1788 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.cpp @@ -29,16 +29,16 @@ void MythInstallCommandLineParser::LoadArguments(void) "Show readme", ""); add("-H", "help", "", - "Show help screen", ""); + "Show help screen", ""); add("-Q", "question", "", - "Display question with yes/no", ""); + "Display question with yes/no", ""); add("-b", "run_mythsetup", "", "Ask to start mythtv setup", ""); add("-L", "show_lang", "", - "On install show lang/country screen", ""); + "On install show lang/country screen", ""); diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp index d09efd7..03aaf40 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp @@ -230,7 +230,7 @@ public: }; void smb_busy_box() { - system ("nmbscan -d > /tmp/smbdomainlist & "); + myth_system ("nmbscan -d > /tmp/smbdomainlist & "); QString msgtext="Searching for Windows Workgroups"; int return_code; MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp index 6f4252f..980fa17 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp @@ -4,15 +4,16 @@ #include <fstream> #include "mythcontext.h" -//#include "tv.h" -//#include "uitypes.h" #include "installdialog.h" #include "installsettings.h" #include "installationtype.h" #include "mv_common.h" +#include "questionnotice.h" #include "mythprogressdialog.h" #include <stdlib.h> +#include <chrono> // for milliseconds +#include <thread> // for sleep_for #include "mythversion.h" #include "mythsystemlegacy.h" @@ -23,10 +24,9 @@ WelcomeDialog::WelcomeDialog(MythScreenStack *parent, const char *name) - :MythScreenType(parent, name), - m_status_text(NULL), m_recording_text(NULL), m_scheduled_text(NULL), - m_time_text(NULL), m_date_text(NULL), - m_menuPopup(NULL), m_mv_text(NULL) + :MythScreenType(parent, name), m_menuPopup(NULL), + m_status_text(NULL),m_recording_text(NULL), m_scheduled_text(NULL), + m_mv_text(NULL), m_time_text(NULL), m_date_text(NULL) { // system("rm -f /tmp/.install_state"); @@ -37,7 +37,6 @@ WelcomeDialog::WelcomeDialog(MythScreenStack *parent, const char *name) scheduled_text = ""; install_text = ""; version_text = ""; - I_AM_BUSY = false; WORKING_ON_INSTALL = false; current_hostname = ""; @@ -58,13 +57,9 @@ WelcomeDialog::WelcomeDialog(MythScreenStack *parent, const char *name) SLOT(updateTime())); m_timeTimer->start(1000); - reboot_box = NULL; m_menuPopup = NULL; - //QTimer::singleShot(6000, this, showPopup()); - // JM QTimer::singleShot(1000, this, SLOT(showPopup())); - } bool WelcomeDialog::Create(void) @@ -104,9 +99,15 @@ void WelcomeDialog::shutdownNow(int rc) // system("rm -f /tmp/.install_percent"); // system("rm -f /tmp/.install_error"); if (rc == 1) - system("/sbin/halt"); + { + if(!system("/sbin/halt")) + LOG(VB_GENERAL, LOG_ERR, "Error running halt"); + } else - system("/sbin/reboot"); + { + if(!system("/sbin/reboot")) + LOG(VB_GENERAL, LOG_ERR, "Error running reboot"); + } } void WelcomeDialog::runLIVECD(void) @@ -124,8 +125,6 @@ void WelcomeDialog::runLIVECD(void) { showPopup(); } - - } bool WelcomeDialog::keyPressEvent(QKeyEvent *event) @@ -159,7 +158,7 @@ bool WelcomeDialog::keyPressEvent(QKeyEvent *event) // QByteArray tmp = cmd.toAscii(); // QByteArray tmp = cmd; // system(tmp); - system(qPrintable(cmd)); + myth_system(qPrintable(cmd)); } } else @@ -174,7 +173,6 @@ bool WelcomeDialog::keyPressEvent(QKeyEvent *event) void WelcomeDialog::closeDialog() { Close(); - exit(0); } @@ -229,7 +227,9 @@ void WelcomeDialog::updateScreen(void) QString cmdtxt; cmdtxt=MV_ROOT ; cmdtxt.append("bin/install_proxy.sh " ); - system(qPrintable(cmdtxt)); + int sysRet = system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Error running install_proxy.sh in updateScreen"); recording_text="Press MENU for Options"; mythvantage_text=" "; error_text=" "; @@ -276,6 +276,7 @@ void WelcomeDialog::updateScreen(void) } else mythvantage_text=""; + m_recording_text->SetText(recording_text); m_scheduled_text->SetText(scheduled_text); m_mv_text->SetText(mythvantage_text); @@ -283,88 +284,40 @@ void WelcomeDialog::updateScreen(void) if ( install_drive != "" ) install_text = ""; - m_status_text->SetText(install_text ); + m_status_text->SetText(install_text); // m_updateScreenTimer->start(UPDATE_SCREEN_INTERVAL, true); m_updateScreenTimer->start(UPDATE_SCREEN_INTERVAL); if ( scheduled_text == "Done" ) { - Reboot_popup () ; + CloseBusyPopup(); + m_updateScreenTimer->stop(); + Reboot_popup(); } // shows the busy box when configuring the system if ( scheduled_text == "Configuring system") { m_recording_text->SetText(" "); - if ( ! I_AM_BUSY ) - busy_box(); + QString msgtext = "Configuring LinHES on host " ; + msgtext.append(current_hostname); + msgtext.append("..."); + OpenBusyPopup(msgtext); } }; -void WelcomeDialog::busy_box(void) -{ - QString msgtext = "Please wait, configuring LinHES on host " ; - msgtext.append(current_hostname); - msgtext.append("..."); - MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); - MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); - if (busyPopup->Create()) - { - popupStack->AddScreen(busyPopup, false); - } - else - { - delete busyPopup; - busyPopup = NULL; - } - - - while ( scheduled_text == "Configuring system" ) - { - qApp->processEvents (); - usleep(900); - I_AM_BUSY = true; - } - - if (busyPopup) - { - busyPopup->Close(); - busyPopup = NULL; - } - I_AM_BUSY = false; -} - void WelcomeDialog::busy_find_oldsettings(void) { - - QString msgtext = "Importing Old Settings..." ; - MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); - MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack, - "importsettingsbusy"); - if (busyPopup->Create()) - { - popupStack->AddScreen(busyPopup, false); - } - else - { - delete busyPopup; - busyPopup = NULL; - } + QString msgtext = "Importing Old Settings..." ; + OpenBusyPopup(msgtext); int return_code = 0; - while ( return_code == 0 ) + while ( return_code == 0 ) { qApp->processEvents (); - usleep(900); - I_AM_BUSY = true; + std::this_thread::sleep_for(std::chrono::microseconds(900)); return_code = myth_system("ps -ef|grep install_proxy.sh|grep -v grep > /dev/null"); } - if (busyPopup) - { - busyPopup->Close(); - busyPopup = NULL; - } - I_AM_BUSY = false; - + CloseBusyPopup(); } @@ -389,19 +342,6 @@ void WelcomeDialog::updateStatusMessage(void) void WelcomeDialog::showPopup(void) { - -// if (m_menuPopup) - // return; -// -// QString label = tr("MythVantage Menu"); -// MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); -// m_menuPopup = new MythDialogBox(label, mainStack, "menuPopup"); -// -// if (m_menuPopup->Create()) -// mainStack->AddScreen(m_menuPopup); -// -// m_menuPopup->SetReturnEvent(this, "action"); - MythScreenStack *popupStack = GetMythMainWindow()->GetMainStack(); m_menuPopup = new MythDialogBox("Menu", popupStack, "actionmenu"); @@ -418,7 +358,7 @@ void WelcomeDialog::showPopup(void) // This is a bad way to lock the buttons but it works for now. if ( scheduled_text.length() <= 2 ) { - m_menuPopup->AddButton(tr("Install or Upgrade "), + m_menuPopup->AddButton(tr("Install or Upgrade"), SLOT(Display_2ndpopup())); m_menuPopup->AddButton(tr("Run MythFrontend"), SLOT(runLIVECD())); @@ -513,7 +453,7 @@ QString WelcomeDialog::diskmodel(QString drive , QString tsize) return qline; } -QString WelcomeDialog::findinstallsouce(void) +QString WelcomeDialog::findinstallsource(void) { string line; QString currentitem; @@ -522,7 +462,7 @@ QString WelcomeDialog::findinstallsouce(void) { getline (mountfile,line); if ( line.empty() ) - line = "oops didn't find andthing"; + line = "oops didn't find anything"; currentitem= ( QString::fromStdString( line ) ); @@ -540,6 +480,7 @@ QString WelcomeDialog::findinstallsouce(void) return currentitem; }; } + return NULL; }; void WelcomeDialog::showPopup_2(void) @@ -564,7 +505,7 @@ void WelcomeDialog::showPopup_2(void) if ( NETBOOT == "YES" ) m_menuPopup->AddButton(("Diskless Frontend"), SLOT(install_net() ) ); - QString INSTALLSOURCE = findinstallsouce(); + QString INSTALLSOURCE = findinstallsource(); ifstream partitions("/proc/partitions"); if (partitions.is_open()) { @@ -631,38 +572,46 @@ void WelcomeDialog::GO_popup(QString go_text) void WelcomeDialog::Reboot_popup(void) -{ if (reboot_box) - return; +{ QString prompt1; QFile updbstatus("/tmp/.upgrade_db_failed"); if ( updbstatus.open(QIODevice::ReadOnly | QIODevice::Text) ) { - prompt1 = QObject::tr(" "); - prompt1.append("\n"); - prompt1.append("An error occured while attempting to restore the database!"); - prompt1.append("\n"); - prompt1.append("The old database could not be restored, so a new database was created"); + prompt1 = QObject::tr("An error occured while attempting to restore the database."); prompt1.append("\n"); + prompt1.append("The old database could not be restored, so a new database was created."); } else prompt1 = QObject::tr("Installation of LinHES is complete!"); - prompt1.append("\n"); - reboot_box = new DialogBox(GetMythMainWindow(), prompt1); - reboot_box->AddButton(QObject::tr("Reboot")); - reboot_box->AddButton(QObject::tr("Power Off")); + //as extern to be set in questionnotice.cpp + extern int questionReturnCode; + + MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); + QuestionNoticeDialog *questionNotice = + new QuestionNoticeDialog(mainStack, "Question"); + if (questionNotice->Create("question", "Installation Complete", prompt1, + "Reboot", "Shutdown")) mainStack->AddScreen(questionNotice, true); + else + return; - int returncode = 0; - DialogCode dcode = reboot_box->exec(); - reboot_box->deleteLater(); - if (kDialogCodeButton0 == dcode ) + do + { + qApp->processEvents(); + std::this_thread::sleep_for(std::chrono::milliseconds(5)); + } while (mainStack->TotalScreens() > 1); + + int returncode; + if (questionReturnCode == 16) + { + LOG(VB_GENERAL, LOG_INFO, "Reboot"); returncode = 0; - if (kDialogCodeButton1 == dcode ) + } + else + { + LOG(VB_GENERAL, LOG_INFO, "Shutdown"); returncode = 1; - if (kDialogCodeButton2 == dcode ) - returncode = 2; - - reboot_box = NULL; + } shutdownNow(returncode); } @@ -670,18 +619,11 @@ void WelcomeDialog::Reboot_popup(void) void WelcomeDialog::MAINPopup(void) { -// if (!popup) -// return; -// popup->hide(); -// popup->deleteLater(); - popup = NULL; showPopup(); - } void WelcomeDialog::Display_2ndpopup(void) { - //JM VERBOSE(VB_GENERAL, "Display_2ndpopup"); showPopup_2(); } @@ -867,7 +809,9 @@ void WelcomeDialog::install_generic(void) QString cmdtxt; cmdtxt=MV_ROOT ; cmdtxt.append("bin/install_proxy.sh find_update " + install_drive +" &"); - system(qPrintable(cmdtxt)); + int sysRet = system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Could not run install_proxy.sh find update"); busy_find_oldsettings(); bool flag = false; QString line; @@ -952,7 +896,7 @@ void WelcomeDialog::install_generic(void) void busy_network(void) { - QString msgtext = "Starting Network" ; + QString msgtext = "Starting Network..." ; MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); if (busyPopup->Create()) @@ -966,10 +910,10 @@ void busy_network(void) } int return_code = 0; - while ( return_code == 0 ) + while ( return_code == 0 ) { qApp->processEvents (); - usleep(900); + std::this_thread::sleep_for(std::chrono::microseconds(900)); return_code = myth_system("ps -ef|grep install_proxy.sh| grep setup_network |grep -v grep > /dev/null"); } @@ -978,9 +922,6 @@ void busy_network(void) busyPopup->Close(); busyPopup = NULL; } - - - } @@ -997,30 +938,64 @@ int WelcomeDialog::ask_validate_network(void) { MythProgressDialog *network_check = NULL; network_check = new MythProgressDialog(QObject::tr("Please wait while the network is checked..."), 7); + //busy_network(); + QString msgtext = "Starting Network..." ; + MythScreenStack *popupStack = GetMythMainWindow()->GetStack( + "popup stack"); + m_progressDialog = new MythUIProgressDialog(msgtext, popupStack, + "networkbusy"); + if (m_progressDialog->Create()) + { + popupStack->AddScreen(m_progressDialog, false); + } + else + { + delete m_progressDialog; + m_progressDialog = NULL; + } + + if (m_progressDialog) + m_progressDialog->SetTotal(6); + QString cmdtxt; - cmdtxt=MV_ROOT ; - cmdtxt.append("bin/install_proxy.sh network_check_it setup_network &"); - retval = system(qPrintable(cmdtxt)); - busy_network(); + cmdtxt=MV_ROOT; + cmdtxt.append("bin/install_proxy.sh network_check_it setup_network"); + retval = system(qPrintable(cmdtxt)); + + //int return_code = 0; + //while ( return_code == 0 ) + //{ + // qApp->processEvents (); + // std::this_thread::sleep_for(std::chrono::microseconds(900)); + // return_code = myth_system("ps -ef|grep install_proxy.sh| grep setup_network |grep -v grep > /dev/null"); + //} + + if (network_check) { network_check->setProgress(2); - cmdtxt=MV_ROOT ; + if ( retval == 0) + { + m_progressDialog->SetMessage("Checking Network for this Computer..."); + m_progressDialog->SetProgress(2); + cmdtxt=MV_ROOT; cmdtxt.append("bin/install_proxy.sh network_check_it check_self"); - retval = system(qPrintable(cmdtxt)); - if ( retval != 0 ) - { - network_check->Close(); - pop_text="Could not find myself on the network."; - } + retval = system(qPrintable(cmdtxt)); + if ( retval != 0 ) + { + network_check->Close(); + pop_text="Could not find myself on the network."; + } + } } - if ( retval == 0) { network_check->setProgress(3); - cmdtxt=MV_ROOT ; + m_progressDialog->SetMessage("Checking Network for the Gateway Server..."); + m_progressDialog->SetProgress(3); + cmdtxt=MV_ROOT; cmdtxt.append("bin/install_proxy.sh network_check_it check_gw"); - retval = system(qPrintable(cmdtxt)); + retval = system(qPrintable(cmdtxt)); if ( retval != 0 ) { network_check->Close(); @@ -1031,9 +1006,11 @@ int WelcomeDialog::ask_validate_network(void) if (retval == 0) { network_check->setProgress(4); - cmdtxt=MV_ROOT ; + m_progressDialog->SetMessage("Checking Network for the Nameserver..."); + m_progressDialog->SetProgress(4); + cmdtxt=MV_ROOT; cmdtxt.append("bin/install_proxy.sh network_check_it check_ns"); - retval = system(qPrintable(cmdtxt)); + retval = system(qPrintable(cmdtxt)); if ( retval != 0 ) { network_check->Close(); @@ -1044,9 +1021,11 @@ int WelcomeDialog::ask_validate_network(void) if (retval == 0) { network_check->setProgress(5); - cmdtxt=MV_ROOT ; + m_progressDialog->SetMessage("Checking the Nameserver..."); + m_progressDialog->SetProgress(5); + cmdtxt=MV_ROOT; cmdtxt.append("bin/install_proxy.sh network_check_it check_names"); - retval = system(qPrintable(cmdtxt)); + retval = system(qPrintable(cmdtxt)); if ( retval != 0 ) { network_check->Close(); @@ -1057,9 +1036,11 @@ int WelcomeDialog::ask_validate_network(void) if (retval == 0) { network_check->setProgress(6); - cmdtxt=MV_ROOT ; + m_progressDialog->SetMessage("Checking Network for this Hostname..."); + m_progressDialog->SetProgress(6); + cmdtxt=MV_ROOT; cmdtxt.append("bin/install_proxy.sh network_check_it host_names"); - retval = system(qPrintable(cmdtxt)); + retval = system(qPrintable(cmdtxt)); if ( retval != 0 ) { network_check->Close(); @@ -1067,6 +1048,11 @@ int WelcomeDialog::ask_validate_network(void) } } + if (m_progressDialog) + { + m_progressDialog->Close(); + m_progressDialog = NULL; + } network_check->setProgress(7); if (network_check) { @@ -1074,7 +1060,7 @@ int WelcomeDialog::ask_validate_network(void) network_check->deleteLater(); } - if (retval != 0 ) + if ( retval != 0 ) { DialogCode val = MythPopupBox::Show2ButtonPopup( GetMythMainWindow(), @@ -1082,7 +1068,7 @@ int WelcomeDialog::ask_validate_network(void) tr("Continue"), tr("Try Again"), kDialogCodeButton0); - if (kDialogCodeButton0 == val ) + if ( kDialogCodeButton0 == val ) retval = 0; } } @@ -1093,37 +1079,14 @@ int WelcomeDialog::ask_validate_network(void) void WelcomeDialog::install_it(void) { + int sysRet; QString installtype = gCoreContext->GetSetting("HOSTinstallationtype"); -// QString rootfs = gCoreContext->GetSetting("HOSTrootfstype"); -// QString datafs = gCoreContext->GetSetting("HOSTdatafstype"); -// QString rootsize = gCoreContext->GetSetting("HOSTOSsize"); -// rootsize=rootsize + "000"; -// QString usealldata = gCoreContext->GetSetting("HostUseALLdata"); -// QString datasize = gCoreContext->GetSetting("HOSTDATAsize"); -// QString uprootfs = gCoreContext->GetSetting("HOSTuprootfstype"); -// QString useswap = gCoreContext->GetSetting("HostUseSWAP"); -// QString swapsize = gCoreContext->GetSetting("HOSTSWAPsize"); if ( installtype != "Upgrade" ) current_hostname = gCoreContext->GetSetting("HostMyhostname"); QString clean_upgrade = getenv("CLEAN_UPGRADE"); if ( clean_upgrade == "YES" ) current_hostname = gCoreContext->GetSetting("HostMyhostname"); -//get the hostname here if upgrade then use previous declarion of hostname -// if ( usealldata == "1" ) -// { -// datasize="ALL"; -// } -// else -// { -// datasize=datasize + "000"; -// } -// if ( useswap == "0" ) -// { -// swapsize="NO"; -// }; - - if ( installtype == "Full/Auto" ) { QString currentitem; @@ -1140,28 +1103,22 @@ void WelcomeDialog::install_it(void) } } file.close(); -// bool ok; -// int mem = currentitem.toInt( &ok, 10 ); // dec == 0, ok == FALSE - - -// if ( mem >= 500000 ) -// { -// if ((gCoreContext->GetSetting("HostXres")) == "1280x720" ) -// gCoreContext->SaveSetting("Theme", "syth-lacquer-wide"); -// } - QString cmdtxt=MV_ROOT ; //cmdtxt.append("bin/install_proxy.sh full_install_it " + install_drive + " " + rootfs + " " + rootsize + " " + datafs + " " + datasize + " " + swapsize + "&"); cmdtxt.append("bin/install_proxy.sh full_install_it &"); - system(qPrintable(cmdtxt)); + sysRet = system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Error running install_proxy.sh full_install_it"); } else if ( installtype == "Upgrade" ) { QString cmdtxt=MV_ROOT ; //cmdtxt.append("bin/install_proxy.sh upgrade_it " + install_drive + " " + uprootfs + "&"); cmdtxt.append("bin/install_proxy.sh upgrade_it &"); - system(qPrintable(cmdtxt)); + sysRet = system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Error running install_proxy.sh upgrade_it"); } else if (installtype=="NET") { @@ -1178,16 +1135,21 @@ void WelcomeDialog::install_it(void) QString h; h=localhostname; cmdtxt.append("bin/restore_default_settings.sh -c save -t syssettings -d 127.0.0.1 -h " + h); - system(qPrintable(cmdtxt)); + sysRet = system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Error running restore_default_settings.sh"); + cmdtxt=MV_ROOT ; //cmdtxt.append("bin/install_proxy.sh NETBOOT " + install_drive + " &"); cmdtxt.append("bin/install_proxy.sh NETBOOT &"); - system(qPrintable(cmdtxt)); + sysRet = system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Error running install_proxy.sh NETBOOT"); } WORKING_ON_INSTALL = true; - usleep (500); + std::this_thread::sleep_for(std::chrono::microseconds(500)); updateScreen(); - usleep (500); + std::this_thread::sleep_for(std::chrono::microseconds(500)); updateScreen(); } diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h index 432ea19..d256ef2 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h @@ -9,8 +9,6 @@ using namespace std; #include "mythdialogs.h" #include "libmyth/dialogbox.h" - - #include "remoteutil.h" #include "programinfo.h" #include "mythscreentype.h" @@ -18,6 +16,7 @@ using namespace std; #include "mythuitext.h" #include "mythdialogbox.h" #include "langsettings.h" +#include <mythprogressdialog.h> class WelcomeDialog : public MythScreenType { @@ -42,7 +41,7 @@ protected slots: void Reboot_popup(); void MAINPopup(); QString diskmodel(QString,QString); - QString findinstallsouce(void); + QString findinstallsource(void); void Display_2ndpopup(); bool updateRecordingList(void); bool updateScheduledList(void); @@ -61,19 +60,15 @@ protected slots: void install_generic(void); void install_it(void); void runLIVECD(void); - void busy_box(void); void busy_find_oldsettings(void); int ask_validate_network(void); private: void updateStatusMessage(void); - - MythPopupBox *popup; //can remove this - MythDialogBox *m_menuPopup; - DialogBox *reboot_box; - DialogBox *upgrade_box; // // GUI stuff // + MythDialogBox *m_menuPopup; + MythUIProgressDialog *m_progressDialog; MythUIText *m_status_text; MythUIText *m_recording_text; @@ -102,9 +97,7 @@ private: string bin_prefix; QString current_hostname; - bool I_AM_BUSY; bool WORKING_ON_INSTALL; - }; #endif diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp index aa599ee..5eb8717 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp @@ -162,7 +162,9 @@ QString findnet_wireless() QString netdev=""; //QString netdev="eth0 eth1 wlan0 wlan1 ath0 "; - system("/usr/sbin/iwconfig > /tmp/.netinfo_wireless"); + int sysRet = system("/usr/sbin/iwconfig > /tmp/.netinfo_wireless"); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Error running iwconfig"); QString line; QFile file("/tmp/.netinfo_wireless"); if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) @@ -1174,7 +1176,7 @@ static HostComboBox *Hostfoldingusername() if ((new_line = strchr (username, '\n'))) new_line[0] = 0; - std::cout << "found old username " << username << endl; + //std::cout << "found old username " << username << endl; //FIXME?? //gCoreContext->SetSetting("Hostfoldingusername", username); gCoreContext->SaveSetting("Hostfoldingusername", username); @@ -2372,7 +2374,7 @@ QString NetworkOptionsFrame::find_hostname() cmdtxt.append("bin/systemconfig.py -m dhcp_request -d " ); cmdtxt.append(hostparm.ThisHostDefaultInterface); myth_system(cmdtxt); - system(qPrintable(cmdtxt)); + //system(qPrintable(cmdtxt)); QString line; QFile file("/tmp/mvnetwork.dhcpinfo"); if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) @@ -2842,7 +2844,9 @@ void SoundOSSsettings::loadossdriver() cmdtxt="sudo "; cmdtxt.append(MV_ROOT) ; cmdtxt.append("bin/soundconfig.sh -t LOAD -i OSS &"); - system(qPrintable(cmdtxt)); + int sysRet = system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Error running soundconfig.sh"); int return_code = 0; QString msgtext = "Loading OSS driver" ; @@ -2903,7 +2907,9 @@ void SoundALSAsettings::loadalsadriver() cmdtxt="sudo "; cmdtxt.append(MV_ROOT) ; cmdtxt.append("bin/soundconfig.sh -t LOAD -i ALSA &"); - system(qPrintable(cmdtxt)); + int sysRet = system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Error running soundconfig.sh"); int return_code = 0; QString msgtext = "Loading ALSA driver" ; @@ -3097,7 +3103,9 @@ void SoundOSSsettings::soundossgathersettings(void) QString cmdtxt; cmdtxt=MV_ROOT ; cmdtxt.append("bin/soundconfig.sh -t test -i OSS -d " + hostparm.ThisHostSoundDevice + "&"); - system(qPrintable(cmdtxt)); + int sysRet = system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Error running soundconfig.sh"); int return_code = 0; QString msgtext = "Playing Test Audio" ; @@ -3162,7 +3170,9 @@ void SoundALSAsettings::soundalsagathersettings(void) QString cmdtxt; cmdtxt=MV_ROOT ; cmdtxt.append("bin/soundconfig.sh -t test -i ALSA -d " + hostparm.ThisHostSoundDevice + "&"); - system(qPrintable(cmdtxt)); + int sysRet = system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Error running soundconfig.sh"); int return_code = 0; QString msgtext = "Playing Test Audio" ; MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); @@ -3531,7 +3541,9 @@ int runsettings (bool mysqlonly , bool shownetwork , bool showhostype, if ( showhostype && continuerun ) { displayshowhostype = showhostype; - system ("avahi-browse -l -r -t _mysql._tcp > /tmp/mysqllist"); + int sysRet = system("avahi-browse -l -r -t _mysql._tcp > /tmp/mysqllist"); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Error running avahi-browse"); MythInstallSettings settings1; settings1.Load(); settings1.Save(); diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp index b6e66cd..5c2e128 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp @@ -3,11 +3,8 @@ #include "installdialog.h" #include "installsettings.h" #include "password_manage.h" -#include "autocard.h" #include "settemplate.h" - - - +#include "questionnotice.h" // Qt #include <QApplication> @@ -15,15 +12,12 @@ #include <QDir> #include <QTextStream> - #include <cstdlib> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#include <unistd.h> - - - +#include <chrono> // for milliseconds +#include <thread> // for sleep_for #include <stdio.h> @@ -38,14 +32,12 @@ #include "lcddevice.h" #include "commandlineparser.h" #include "mythlogging.h" -#include "dialogbox.h" - +#include "signalhandling.h" // libmythui #include "mythmainwindow.h" #include "mythuihelper.h" - //?? #include "myththemebase.h" @@ -106,25 +98,25 @@ int main(int argc, char **argv) MythInstallCommandLineParser cmdline; int retval; if ((retval = cmdline.ConfigureLogging()) != GENERIC_EXIT_OK) - return retval; + return retval; if (!cmdline.Parse(argc, argv)) { - cmdline.PrintHelp(); - return 4; - return GENERIC_EXIT_INVALID_CMDLINE; + cmdline.PrintHelp(); + return 4; + return GENERIC_EXIT_INVALID_CMDLINE; } if (cmdline.toBool("showhelp")) { - cmdline.PrintHelp(); - return GENERIC_EXIT_OK; + cmdline.PrintHelp(); + return GENERIC_EXIT_OK; } if (cmdline.toBool("showversion")) { - cmdline.PrintVersion(); - return GENERIC_EXIT_OK; + cmdline.PrintVersion(); + return GENERIC_EXIT_OK; } //--------------------Start of real stuff--------------------- gContext = new MythContext(MYTH_BINARY_VERSION); @@ -254,9 +246,8 @@ int main(int argc, char **argv) bShowHelp = true; if (cmdline.toBool("readme")) - { bShowReadme = true; - } + if (cmdline.toBool("question")) { bShowquestion = true; @@ -267,11 +258,11 @@ int main(int argc, char **argv) bRunSetup = true; if (cmdline.toBool("show_lang")) - showLang = true; + showLang = true; LCD::SetupLCD(); if (class LCD *lcd = LCD::Get()) - lcd->switchToTime(); + lcd->switchToTime(); MythTranslation::load("mythfrontend"); @@ -300,14 +291,17 @@ int main(int argc, char **argv) gCoreContext->ActivateSettingsCache(false); gCoreContext->ClearSettingsCache(); bool runconfig = false; - system("cp -f /etc/systemconfig /tmp/systemconfig.bak"); + int sysRet=system("cp -f /etc/systemconfig /tmp/systemconfig.bak"); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Could not backup /etc/systemconfig."); QString olddb = gCoreContext->GetSetting("HostMysqlserver"); QString oldhostype = gCoreContext->GetSetting("HostSystemType"); //sync db with pacman if (bShowplugins || bShowsoftware) { - system("pacman -Q > /tmp/pacman_installed"); + if (!system("pacman -Q > /tmp/pacman_installed")) + LOG(VB_GENERAL, LOG_ERR, "Could not create /tmp/pacman_installed."); QString progPacmanNamesArray[] = { "mythappletrailers", "mytharchive", "mythbrowser", @@ -370,7 +364,7 @@ int main(int argc, char **argv) QByteArray PacName = progPacmanNamesArray[i].toLocal8Bit(); const char *PacNameChar = PacName.data(); sprintf(cmd, "grep -q '%s ' /tmp/pacman_installed", PacNameChar); - + //LOG(VB_GENERAL, LOG_INFO, QString(progPacmanNamesArray[i])); //LOG(VB_GENERAL, LOG_INFO, QString(progDBNamesArray[i])); QString currDBValue = gCoreContext->GetSetting(progDBNamesArray[i]); @@ -389,7 +383,9 @@ int main(int argc, char **argv) runconfig = true; } } - system("rm -f /tmp/pacman_installed"); + int sysRet=system("rm -f /tmp/pacman_installed"); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Could not remove /tmp/pacman_installed."); } //DONE sync db with pacman @@ -401,7 +397,9 @@ int main(int argc, char **argv) //save my settings in case db switches QString cmdtxt=MV_ROOT; cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb); - system(qPrintable(cmdtxt)); + sysRet=system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Could not save settings"); if ( status != 0 ) { @@ -416,7 +414,9 @@ int main(int argc, char **argv) QString cmdtxt; cmdtxt=MV_ROOT; cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb ) ; - system(qPrintable(cmdtxt)); + int sysRet=system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Could not save settings"); } if ( runconfig ) @@ -433,38 +433,45 @@ int main(int argc, char **argv) QString dbcommand = cmdtxt; dbcommand.append(newdb); run_systemconfig(modulelist,restart,dbcommand); - - - } - system("rm -f /tmp/systemconfig.bak"); + sysRet=system("rm -f /tmp/systemconfig.bak"); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Could not remove /tmp/systemconfig.bak."); + gCoreContext->ActivateSettingsCache(false); gCoreContext->ClearSettingsCache(); if ( restart ) { - DialogBox *dia = NULL; QString prompt; - QString *problems = new QString("The network address of the database has changed."); - problems->append("\n"); - problems->append("The frontend will need to restart to connect to the new database."); - problems->append("\n"); - dia = new DialogBox(mainWindow, problems->append("\n" )); - dia->AddButton(QObject::tr("OK")); - int returncode = 0; - returncode = dia->exec(); - dia->deleteLater(); - //cout << "restarting" << endl; + prompt.append("The network address of the database has changed."); + prompt.append("\n"); + prompt.append("The frontend will need to restart to connect to the new database."); + prompt.append("\n"); + + MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); + QuestionNoticeDialog *questionNotice = + new QuestionNoticeDialog(mainStack, "Notice"); + if (questionNotice->Create("notice", "Restart Frontend", prompt, + NULL, NULL)) mainStack->AddScreen(questionNotice, true); + else + return -1; + + do + { + qApp->processEvents(); + std::this_thread::sleep_for(std::chrono::milliseconds(5)); + } while (mainStack->TotalScreens() > 0); + QString cmdtxt; - cmdtxt=MV_ROOT ; + cmdtxt=MV_ROOT; cmdtxt.append("bin/systemconfig.sh reloadfe" ); - system(qPrintable(cmdtxt)); + int sysRet=system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Could not reload frontend."); } gCoreContext->ActivateSettingsCache(false); gCoreContext->ClearSettingsCache(); gCoreContext->SendMessage("CLEAR_SETTINGS_CACHE"); - - - }//run settings else if (bShowTemplate) @@ -485,111 +492,85 @@ int main(int argc, char **argv) else if (bRunSetup) { - DialogBox *dia = NULL; QString prompt; - QString *problems = new QString("To configure the TV cards and program guide the setup program needs to be run."); - problems->append("\n"); - problems->append("\n"); - - problems->append("For those in North America, guide data is provided by Schedules Direct."); - problems->append("\n"); - problems->append("Visit http://www.schedulesdirect.org/ to signup for your account today"); - problems->append("\n"); - problems->append("\n"); - problems->append("\n"); - - problems->append("If you choose to not run mythtv-setup now, the program can be run at any time by typing mythtv-setup or hitting ALT+s"); - problems->append("\n"); - - problems->append("\n"); - prompt = QObject::tr("Do you wish to run mythtv-setup ?"); - - dia = new DialogBox(mainWindow, problems->append("\n" + prompt)); - dia->AddButton(QObject::tr("Yes")); - dia->AddButton(QObject::tr("Yes and try to autodetect cards")); - dia->AddButton(QObject::tr("No")); - int returncode = 0; - returncode = dia->exec(); - DialogCode dcode = dia->exec(); - dia->deleteLater(); - if (kDialogCodeButton0 == dcode ) - returncode = 0; - if (kDialogCodeButton1 == dcode ) - returncode = 1; - if (kDialogCodeButton2 == dcode ) - returncode = 2; -/* - if (returncode == 1) + prompt.append("To configure the TV tuner cards and program guide, run mythtv-setup."); + prompt.append("\n"); + prompt.append("\n"); + prompt.append("For those in North America, guide data is provided by Schedules Direct."); + prompt.append("\n"); + prompt.append("Visit http://www.schedulesdirect.org/ and signup for your account."); + prompt.append("\n"); + prompt.append("\n"); + prompt.append("If you choose to not run mythtv-setup now,"); + prompt.append("\n"); + prompt.append("it can be run later by typing Alt + s."); + prompt.append("\n"); + prompt.append("\n"); + prompt.append("Do you want to run mythtv-setup now?"); + + //as extern to be set in questionnotice.cpp + extern int questionReturnCode; + + MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); + QuestionNoticeDialog *questionNotice = + new QuestionNoticeDialog(mainStack, "Question"); + if (questionNotice->Create("question", "Run mythtv-setup?", prompt, + "Yes", "No")) mainStack->AddScreen(questionNotice, true); + else + return -1; + + do { - AutoCard listcards; - listcards.exec(); - }*/ + qApp->processEvents(); + std::this_thread::sleep_for(std::chrono::milliseconds(5)); + } while (mainStack->TotalScreens() > 0); - return returncode; + if (questionReturnCode == 16) + { + int sysRet = system("mythtv-setup &"); + if (sysRet < 1) + LOG(VB_GENERAL, LOG_ERR, "Could not run mythtv-setup."); + } + retval = questionReturnCode; } - else if (bShowHelp) { - DialogBox *dia = NULL; - QString prompt; - QString *problems = new QString("LinHES Help"); - problems->append("\n"); - problems->append("Visit http://linhes.org for additional help."); - problems->append("\n"); - problems->append("\n"); - problems->append("------Keyboard Shortcuts---------------------------------"); - problems->append("\n"); - problems->append("Alt + h: This Screen"); - problems->append("\n"); -#ifdef __MVAPP__ - problems->append("F2: Open/Close Terminal"); - problems->append("\n"); - problems->append("Shift + Return: Open New Terminal (xterm)"); - problems->append("\n"); - problems->append("Alt + F2: Show 2nd desktop Alt + F1 To Go Back"); - problems->append("\n"); - problems->append("Alt + c: Capture Myth Screenshot"); - problems->append("\n"); -#else - problems->append("Alt + x: Open New Terminal (xterm)"); - problems->append("\n"); - problems->append("Alt + m: Open mythfrontend"); - problems->append("\n"); - problems->append("m in mythfrontend: Display Power/About Menu"); - problems->append("\n"); -#endif - problems->append("Alt + 1: Start Master mythbackend"); - problems->append("\n"); - problems->append("Alt + 2: Stop Master mythbackend"); - problems->append("\n"); - problems->append("Alt + 3: Restart Master mythbackend"); - problems->append("\n"); - problems->append("Alt + s: Open mythtv-setup"); - problems->append("\n"); - problems->append("Alt + u: Unhide/Hide Mouse Pointer"); - problems->append("\n"); - problems->append("Alt + w: Open Web Browser (Chrome if installed)"); - problems->append("\n"); - problems->append("Alt + f: Restart Window Manager"); - problems->append("\n"); - - - dia = new DialogBox(mainWindow, problems->append("\n" )); - dia->AddButton(QObject::tr("OK")); - int returncode = 0; - returncode = dia->exec(); - dia->deleteLater(); - DestroyMythMainWindow(); - delete gContext; - return returncode; + QString line; + QString LH_HelpText; + QFile file("/usr/MythVantage/LH_HELP"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + QTextStream t( &file ); // use a text stream + while ( !t.atEnd() ) + { + line = t.readLine(); + LH_HelpText.append(line); + LH_HelpText.append("\n"); + } + file.close(); + } + else + LH_HelpText.append("Couldn't open /usr/MythVantage/LH_HELP"); + + MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); + QuestionNoticeDialog *questionNotice = new QuestionNoticeDialog(mainStack, + "Notice"); + if (questionNotice->Create("notice", "LinHES Help", LH_HelpText, + NULL, NULL)) mainStack->AddScreen(questionNotice, true); + else + return -1; + + do + { + qApp->processEvents(); + std::this_thread::sleep_for(std::chrono::milliseconds(5)); + } while (mainStack->TotalScreens() > 0); + } else if (bShowReadme) { - DialogBox *dia = NULL; - QString prompt; QString line; - QString *problems = new QString(""); - problems->append("\n"); + QString readmeText; QFile file("/usr/MythVantage/README"); if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) { @@ -597,88 +578,72 @@ int main(int argc, char **argv) while ( !t.atEnd() ) { line = t.readLine(); - problems->append(line); - problems->append("\n"); + readmeText.append(line); + readmeText.append("\n"); } file.close(); } else - problems->append("Couldn't open file"); - dia = new DialogBox(mainWindow, problems->append("\n" )); - dia->AddButton(QObject::tr("OK")); - int returncode = 0; - returncode = dia->exec(); - dia->deleteLater(); - DestroyMythMainWindow(); - delete gContext; - return returncode; - } + readmeText.append("Couldn't open /usr/MythVantage/README"); + MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); + QuestionNoticeDialog *questionNotice = new QuestionNoticeDialog(mainStack, + "Notice"); + if (questionNotice->Create("notice", "Welcome to LinHES!", readmeText, + NULL, NULL )) mainStack->AddScreen(questionNotice, true); + else + return -1; + + do + { + qApp->processEvents(); + std::this_thread::sleep_for(std::chrono::milliseconds(5)); + } while (mainStack->TotalScreens() > 0); + } else if (bShowquestion) { //LOG(VB_GENERAL, LOG_INFO, QString(question)); - DialogBox *dia = NULL; - QString prompt; - QString *problems = new QString(""); - problems->append("\n"); - problems->append("\n"); - problems->append(question); - dia = new DialogBox(mainWindow, problems->append("\n" )); - dia->AddButton(QObject::tr("Yes")); - dia->AddButton(QObject::tr("No")); - int returncode = 0; - - returncode = dia->exec(); - dia->deleteLater(); - DestroyMythMainWindow(); - delete gContext; - - return returncode; + extern int questionReturnCode; //as extern to be set in questionnotice.cpp + + MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); + QuestionNoticeDialog *questionNotice = new QuestionNoticeDialog(mainStack, + "Question"); + if (questionNotice->Create("question", "Question", question, "Yes", "No")) + mainStack->AddScreen(questionNotice, true); + else + return -1; + + do + { + qApp->processEvents(); + std::this_thread::sleep_for(std::chrono::milliseconds(5)); + } while (mainStack->TotalScreens() > 0); + retval = questionReturnCode; } else { - if (LanguageSelection::prompt(showLang)){ + if (LanguageSelection::prompt(showLang)) + { //taken from reloadTheme mythtv-setup MythTranslation::reload(); GetMythMainWindow()->ReinitDone(); - } MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); WelcomeDialog *welcome = new WelcomeDialog(mainStack, "Welcome"); if (welcome->Create()) - { mainStack->AddScreen(welcome, true); - } else return -1; do { - qApp->processEvents(); - usleep(5000); + std::this_thread::sleep_for(std::chrono::milliseconds(5)); } while (mainStack->TotalScreens() > 0); - - - // DestroyMythMainWindow(); - // delete gContext; - // gContext = NULL; - // delete qApp; - } DestroyMythMainWindow(); - - //gCoreContext->GetSetting("MasterServerIP"); - //gCoreContext->GetSetting("BackendServerIP"); - - - delete gContext; - gContext = NULL ; - //delete qApp; - - return 0; + SignalHandler::Done(); + return retval; } - - diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro b/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro index f517c43..6405b52 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro @@ -41,7 +41,7 @@ QMAKE_CLEAN += $(TARGET) //HEADERS += commandlineparser.h //SOURCES += main.cpp commandlineparser.cpp -HEADERS += installdialog.h commandlineparser.h installsettings.h settemplate.h installationtype.h autocard.h xorgsettings.h password_manage.h misc_settings.h mv_common.h infrared.h compat-mv.h supplemental.h vnc.h fileshare.h -SOURCES += main.cpp commandlineparser.cpp installdialog.cpp installsettings.cpp settemplate.cpp installationtype.cpp autocard.cpp xorgsettings.cpp password_manage.cpp misc_settings.cpp infrared.cpp compat-mv.cpp supplemental.cpp vnc.cpp fileshare.cpp +HEADERS += installdialog.h commandlineparser.h installsettings.h settemplate.h installationtype.h xorgsettings.h password_manage.h misc_settings.h mv_common.h infrared.h compat-mv.h supplemental.h vnc.h fileshare.h questionnotice.h +SOURCES += main.cpp commandlineparser.cpp installdialog.cpp installsettings.cpp settemplate.cpp installationtype.cpp xorgsettings.cpp password_manage.cpp misc_settings.cpp infrared.cpp compat-mv.cpp supplemental.cpp vnc.cpp fileshare.cpp questionnotice.cpp QT += sql xml network widgets diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/questionnotice.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/questionnotice.cpp new file mode 100755 index 0000000..ffd9a1d --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/questionnotice.cpp @@ -0,0 +1,134 @@ +// ANSI C +#include <cstdlib> + +// POSIX +#include <unistd.h> + +// qt +#include <QCoreApplication> +#include <QKeyEvent> +#include <QEvent> +#include <QTimer> + +// myth +#include "exitcodes.h" +#include "mythcontext.h" +#include "signalhandling.h" +#include "questionnotice.h" + +int questionReturnCode; + +QuestionNoticeDialog::QuestionNoticeDialog(MythScreenStack *parent, + const char *name) + :MythScreenType(parent, name), + m_title_text(NULL), m_notice_text(NULL), m_question_text(NULL) +{ + gCoreContext->addListener(this); +} + +bool QuestionNoticeDialog::Create(QString questionORnotice, QString title, + QString displayText, QString yesButtonText, + QString noButtonText) +{ + bool foundtheme = false; + + // Load the theme for this screen + foundtheme = LoadWindowFromXML("install-ui.xml", + "questionnotice_screen", this); + + if (!foundtheme) + return false; + + bool err = false; + + UIUtilE::Assign(this, m_title_text, "title", &err); + UIUtilE::Assign(this, m_notice_text, "notice_text", &err); + UIUtilE::Assign(this, m_ok_button, "ok_button", &err); + UIUtilE::Assign(this, m_question_text, "question_text", &err); + UIUtilE::Assign(this, m_yes_button, "yes_button", &err); + UIUtilE::Assign(this, m_no_button, "no_button", &err); + + if (err) + { + LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'questionnotice_screen'"); + return false; + } + + m_title_text->SetVisible(true); + m_title_text->SetText(title); + + //show the correct text and buttons depending on questionORnotice + if (questionORnotice.contains("notice")) + { + m_notice_text->SetVisible(true); + m_notice_text->SetText(displayText); + m_ok_button->SetVisible(true); + m_question_text->SetVisible(false); + m_yes_button->SetVisible(false); + m_no_button->SetVisible(false); + } + else + { + m_notice_text->SetVisible(false); + m_ok_button->SetVisible(false); + m_question_text->SetVisible(true); + m_question_text->SetText(displayText); + m_yes_button->SetVisible(true); + m_no_button->SetVisible(true); + } + + m_ok_button->SetText("OK"); + connect(m_ok_button, SIGNAL(Clicked()), + this, SLOT(okButtonClick())); + m_yes_button->SetText(yesButtonText); + connect(m_yes_button, SIGNAL(Clicked()), + this, SLOT(yesButtonClick())); + m_no_button->SetText(noButtonText); + connect(m_no_button, SIGNAL(Clicked()), + this, SLOT(noButtonClick())); + + BuildFocusList(); + + return true; +} + +void QuestionNoticeDialog::okButtonClick(void) +{ + // this makes sure the button appears to click properly + QTimer::singleShot(500, this, SLOT(okButton())); +} + +void QuestionNoticeDialog::okButton(void) +{ + questionReturnCode = 0; + Close(); +} + +void QuestionNoticeDialog::yesButtonClick(void) +{ + // this makes sure the button appears to click properly + QTimer::singleShot(500, this, SLOT(yesButton())); +} + +void QuestionNoticeDialog::yesButton(void) +{ + questionReturnCode = 16; + Close(); +} + +void QuestionNoticeDialog::noButtonClick(void) +{ + // this makes sure the button appears to click properly + QTimer::singleShot(500, this, SLOT(noButton())); +} + +void QuestionNoticeDialog::noButton(void) +{ + questionReturnCode = 17; + Close(); +} + +QuestionNoticeDialog::~QuestionNoticeDialog() +{ + gCoreContext->removeListener(this); +} diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/questionnotice.h b/abs/core/mythinstall/MythVantage-app/mythinstall/questionnotice.h new file mode 100755 index 0000000..f2d05c1 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/questionnotice.h @@ -0,0 +1,44 @@ +#ifndef QUESIONNOTICEDIALOG_H_ +#define QUESIONNOTICEDIALOG_H_ + +// qt +#include <QDateTime> + +// libmythui +#include "mythscreentype.h" +#include "mythuibutton.h" +#include "mythuitext.h" +#include "mythdialogbox.h" + +class QuestionNoticeDialog : public MythScreenType +{ + + Q_OBJECT + +public: + QuestionNoticeDialog(MythScreenStack *parent, const char *name); + ~QuestionNoticeDialog(); + + bool Create(QString questionORnotice, QString title, QString displayText, + QString yesButtonText, QString noButtonText); + +protected slots: + void yesButton(void); + void yesButtonClick(void); + void noButton(void); + void noButtonClick(void); + void okButton(void); + void okButtonClick(void); + +private: + // GUI stuff + MythUIText *m_title_text; + MythUIText *m_notice_text; + MythUIButton *m_ok_button; + + MythUIText *m_question_text; + MythUIButton *m_yes_button; + MythUIButton *m_no_button; +}; + +#endif diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp index 8d9e671..7201304 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp @@ -32,8 +32,9 @@ void restart_frontend () cmdtxt=MV_ROOT ; cmdtxt.append("bin/systemconfig.sh reloadfe" ); //cout << "Calling systemconfig.sh reloadfe" << endl; - system(qPrintable(cmdtxt)); - //system("/root/systemconfig.sh reloadfe" ); + int sysRet = system(qPrintable(cmdtxt)); + if (sysRet < 0) + LOG(VB_GENERAL, LOG_ERR, "Error running systemconfig.sh reloadfe"); } void choosetemplate (QString templateop, QString templatename , QString templatehostname = "") diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h index 88f202c..ad62564 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h @@ -109,7 +109,6 @@ static HostComboBox *HostXres() gc->addSelection("Auto") ; gc->setHelpText(QObject::tr("")); system ("print_xorg_res.py"); - QFile file("/tmp/modelines"); QString line; if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) diff --git a/abs/core/mythinstall/PKGBUILD b/abs/core/mythinstall/PKGBUILD index 73c44fe..64486cd 100644 --- a/abs/core/mythinstall/PKGBUILD +++ b/abs/core/mythinstall/PKGBUILD @@ -1,10 +1,10 @@ # Maintainer: Jams pkgname=mythinstall -pkgver=8.5 +pkgver=8.5.1 pkgrel=2 pkgdesc="LinHES installer/systemconfig GUI." arch=('i686' 'x86_64') -depends=('mythtv>=29') +depends=('mythtv>=29' 'LinHES-config') makedepends=('mythtv>=29') logofiles=`ls logo*.png` source=('install-ui.xml' $logofiles) @@ -33,7 +33,7 @@ package() { done } -md5sums=('39d6b7bd1ee305c5523a3cf66d4c2338' +md5sums=('20d45199b7642c42cb60c6ce36331f5a' 'c4c26977b723a4b5d6435ede73051d1b' '27ce7f89a83864dfc5abe23c61964c0c' '3291ad55fe6d7884fc732313f1cc2924' diff --git a/abs/core/mythinstall/install-ui.xml b/abs/core/mythinstall/install-ui.xml index 45b5404..be0e935 100755 --- a/abs/core/mythinstall/install-ui.xml +++ b/abs/core/mythinstall/install-ui.xml @@ -147,4 +147,44 @@ </window> + + <window name="questionnotice_screen"> + + <textarea name="title" from="basetextarea"> + <area>50,10,700,40</area> + <align>allcenter</align> + <value></value> + </textarea> + + <textarea name="notice_text" from="basetextarea"> + <multiline>yes</multiline> + <area>20,60,760,460</area> + <value></value> + <align>allcenter</align> + </textarea> + + <textarea name="question_text" from="basetextarea"> + <multiline>yes</multiline> + <area>20,60,760,460</area> + <value></value> + <align>allcenter</align> + </textarea> + + <button name="yes_button" from="basebutton"> + <position>20,540</position> + <value></value> + </button> + + <button name="ok_button" from="basebutton"> + <position>320,540</position> + <value>OK</value> + </button> + + <button name="no_button" from="basebutton"> + <position>630,540</position> + <value></value> + </button> + + </window> + </mythuitheme> diff --git a/abs/core/mythtv/stable-29/git_src/git_hash b/abs/core/mythtv/stable-29/git_src/git_hash index d869e90..2ce2a78 100644 --- a/abs/core/mythtv/stable-29/git_src/git_hash +++ b/abs/core/mythtv/stable-29/git_src/git_hash @@ -1 +1 @@ -39b2062c069e801c9f9c4b15d198e8ef72594f55 +771115f47d39095652f8f660d3477008a0cbce12 diff --git a/abs/core/mythtv/stable-29/git_src/git_hash_web b/abs/core/mythtv/stable-29/git_src/git_hash_web index 5d42c24..38dfcdc 100644 --- a/abs/core/mythtv/stable-29/git_src/git_hash_web +++ b/abs/core/mythtv/stable-29/git_src/git_hash_web @@ -1 +1 @@ -6db62758ba7f06eb916a041292f50ec298cc01b0 +99838ff4323d7dfc20fd720d4ed3a2042592df69 diff --git a/abs/core/mythtv/stable-29/mythplugins/PKGBUILD b/abs/core/mythtv/stable-29/mythplugins/PKGBUILD index 35d18e4..a6132b3 100644 --- a/abs/core/mythtv/stable-29/mythplugins/PKGBUILD +++ b/abs/core/mythtv/stable-29/mythplugins/PKGBUILD @@ -9,7 +9,7 @@ pkgname=('mytharchive' 'mythweather' 'mythzoneminder') pkgver=29 -pkgrel=7 +pkgrel=9 arch=('i686' 'x86_64') url="http://www.mythtv.org" license=('GPL') diff --git a/abs/core/mythtv/stable-29/mythtv/0259-0117-UI-Provide-dbase-cache-for-RegisterKey-and-RegisterJ.patch b/abs/core/mythtv/stable-29/mythtv/0259-0117-UI-Provide-dbase-cache-for-RegisterKey-and-RegisterJ.patch new file mode 100644 index 0000000..79169e4 --- /dev/null +++ b/abs/core/mythtv/stable-29/mythtv/0259-0117-UI-Provide-dbase-cache-for-RegisterKey-and-RegisterJ.patch @@ -0,0 +1,276 @@ +From 53ab06dc745938d2ea74214fc10a2b5446bac01a Mon Sep 17 00:00:00 2001 +From: Lawrence Rust <lvr@softsystem.co.uk> +Date: Wed, 5 Jun 2013 16:07:56 +0100 +Subject: [PATCH 117/333] UI: Provide dbase cache for RegisterKey and + RegisterJump to speed startup + +Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk> +--- + mythtv/libs/libmythui/mythmainwindow.cpp | 211 +++++++++++++++++++++--------- + 1 file changed, 147 insertions(+), 64 deletions(-) + +diff --git a/mythtv/libs/libmythui/mythmainwindow.cpp b/mythtv/libs/libmythui/mythmainwindow.cpp +index c765279..226454a 100644 +--- a/mythtv/libs/libmythui/mythmainwindow.cpp ++++ b/mythtv/libs/libmythui/mythmainwindow.cpp +@@ -25,6 +25,9 @@ using namespace std; + #include <QKeyEvent> + #include <QKeySequence> + #include <QSize> ++#include <QPair> ++#include <QMap> ++#include <QMutexLocker> + + // Platform headers + #include "unistd.h" +@@ -1765,67 +1768,107 @@ void MythMainWindow::BindKey(const QString &context, const QString &action, + void MythMainWindow::RegisterKey(const QString &context, const QString &action, + const QString &description, const QString &key) + { +- QString keybind = key; +- +- MSqlQuery query(MSqlQuery::InitCon()); ++ typedef QPair< QString,QString > key_t; // context, action ++ typedef QPair< QString,QString > val_t; // keybind, description ++ typedef QMap< key_t,val_t > cache_t; ++ static cache_t s_cache; ++ static QMutex s_mutex; + +- if (d->m_useDB && query.isConnected()) ++ if (s_cache.empty() && d->m_useDB) + { +- query.prepare("SELECT keylist, description FROM keybindings WHERE " +- "context = :CONTEXT AND action = :ACTION AND " +- "hostname = :HOSTNAME ;"); +- query.bindValue(":CONTEXT", context); +- query.bindValue(":ACTION", action); +- query.bindValue(":HOSTNAME", GetMythDB()->GetHostName()); +- +- if (query.exec() && query.next()) ++ MSqlQuery query(MSqlQuery::InitCon()); ++ if (query.isConnected()) + { +- keybind = query.value(0).toString(); +- QString db_description = query.value(1).toString(); +- +- // Update keybinding description if changed +- if (db_description != description) ++ query.prepare("SELECT context, action, keylist, description " ++ "FROM keybindings WHERE hostname = :HOSTNAME ;"); ++ query.bindValue(":HOSTNAME", GetMythDB()->GetHostName()); ++ if (query.exec()) + { +- LOG(VB_GENERAL, LOG_NOTICE, +- "Updating keybinding description..."); +- query.prepare( +- "UPDATE keybindings " +- "SET description = :DESCRIPTION " +- "WHERE context = :CONTEXT AND " +- " action = :ACTION AND " +- " hostname = :HOSTNAME"); +- +- query.bindValue(":DESCRIPTION", description); +- query.bindValue(":CONTEXT", context); +- query.bindValue(":ACTION", action); +- query.bindValue(":HOSTNAME", GetMythDB()->GetHostName()); +- +- if (!query.exec() && !(GetMythDB()->SuppressDBMessages())) ++ QMutexLocker locker(&s_mutex); ++ while (query.next()) + { +- MythDB::DBError("Update Keybinding", query); ++ key_t k(query.value(0).toString(), query.value(1).toString()); ++ val_t v(query.value(2).toString(), query.value(3).toString()); ++ s_cache[k] = v; + } + } ++ else if (!GetMythDB()->SuppressDBMessages()) ++ MythDB::DBError("RegisterKey", query); + } +- else ++ } ++ ++ QString keybind = key; ++ QString db_description; ++ bool bFound = false; ++ { ++ QMutexLocker locker(&s_mutex); ++ cache_t::const_iterator it = s_cache.find(key_t(context, action)); ++ if (it != s_cache.end()) + { +- QString inskey = keybind; +- +- query.prepare("INSERT INTO keybindings (context, action, " +- "description, keylist, hostname) VALUES " +- "( :CONTEXT, :ACTION, :DESCRIPTION, :KEYLIST, " +- ":HOSTNAME );"); +- query.bindValue(":CONTEXT", context); +- query.bindValue(":ACTION", action); ++ keybind = it->first; ++ db_description = it->second; ++ bFound = true; ++ } ++ } ++ ++ if (bFound) ++ { ++ // Update keybinding description if changed ++ if (db_description != description && d->m_useDB) ++ { ++ LOG(VB_GENERAL, LOG_NOTICE, "Updating keybinding description..."); ++ ++ MSqlQuery query(MSqlQuery::InitCon()); ++ ++ query.prepare( ++ "UPDATE keybindings " ++ "SET description = :DESCRIPTION " ++ "WHERE context = :CONTEXT AND " ++ " action = :ACTION AND " ++ " hostname = :HOSTNAME"); ++ + query.bindValue(":DESCRIPTION", description); +- query.bindValue(":KEYLIST", inskey); +- query.bindValue(":HOSTNAME", GetMythDB()->GetHostName()); ++ query.bindValue(":CONTEXT", context); ++ query.bindValue(":ACTION", action); ++ query.bindValue(":HOSTNAME", GetMythDB()->GetHostName()); + + if (!query.exec() && !(GetMythDB()->SuppressDBMessages())) + { +- MythDB::DBError("Insert Keybinding", query); ++ MythDB::DBError("Update Keybinding", query); + } + } + } ++ else if (d->m_useDB) ++ { ++ LOG(VB_GENERAL, LOG_NOTICE, QString("Add keybinding %1::%2 = %3") ++ .arg(context).arg(action).arg(keybind) ); ++ ++ MSqlQuery query(MSqlQuery::InitCon()); ++ ++ QString inskey = keybind; ++ ++ query.prepare("INSERT INTO keybindings (context, action, " ++ "description, keylist, hostname) VALUES " ++ "( :CONTEXT, :ACTION, :DESCRIPTION, :KEYLIST, " ++ ":HOSTNAME );"); ++ query.bindValue(":CONTEXT", context); ++ query.bindValue(":ACTION", action); ++ query.bindValue(":DESCRIPTION", description); ++ query.bindValue(":KEYLIST", inskey); ++ query.bindValue(":HOSTNAME", GetMythDB()->GetHostName()); ++ ++ if (!query.exec() && !(GetMythDB()->SuppressDBMessages())) ++ { ++ MythDB::DBError("Insert Keybinding", query); ++ } ++ else ++ { ++ QMutexLocker locker(&s_mutex); ++ key_t k(context, action); ++ val_t v(keybind, description); ++ s_cache[k] = v; ++ } ++ } + + BindKey(context, action, keybind); + d->actionText[context][action] = description; +@@ -1930,35 +1973,75 @@ void MythMainWindow::RegisterJump(const QString &destination, + const QString &key, void (*callback)(void), + bool exittomain, QString localAction) + { +- QString keybind = key; ++ typedef QPair< QString,QString > val_t; // keylist, description ++ typedef QMap< QString,val_t > cache_t; // destination -> keylist, description ++ static cache_t s_cache; ++ static QMutex s_mutex; + +- MSqlQuery query(MSqlQuery::InitCon()); +- if (query.isConnected()) ++ if (s_cache.empty() && d->m_useDB) + { +- query.prepare("SELECT keylist FROM jumppoints WHERE " +- "destination = :DEST and hostname = :HOST ;"); +- query.bindValue(":DEST", destination); +- query.bindValue(":HOST", GetMythDB()->GetHostName()); +- +- if (query.exec() && query.next()) ++ MSqlQuery query(MSqlQuery::InitCon()); ++ if (query.isConnected()) + { +- keybind = query.value(0).toString(); ++ query.prepare("SELECT destination, keylist, description " ++ "FROM jumppoints WHERE hostname = :HOSTNAME ;"); ++ query.bindValue(":HOSTNAME", GetMythDB()->GetHostName()); ++ if (query.exec()) ++ { ++ QMutexLocker locker(&s_mutex); ++ while (query.next()) ++ { ++ val_t v(query.value(1).toString(), query.value(2).toString()); ++ s_cache.insert(query.value(0).toString(), v); ++ } ++ } ++ else if (!GetMythDB()->SuppressDBMessages()) ++ MythDB::DBError("RegisterJump", query); + } +- else ++ } ++ ++ QString keybind = key; ++ bool bFound = false; ++ { ++ QMutexLocker locker(&s_mutex); ++ cache_t::const_iterator it = s_cache.find(destination); ++ if (it != s_cache.end()) + { +- QString inskey = keybind; ++ keybind = it->first; ++ bFound = true; ++ } ++ } + +- query.prepare("INSERT INTO jumppoints (destination, description, " +- "keylist, hostname) VALUES ( :DEST, :DESC, :KEYLIST, " +- ":HOST );"); ++ if (!bFound) ++ { ++ MSqlQuery query(MSqlQuery::InitCon()); ++ if (query.isConnected()) ++ { ++ query.prepare("SELECT keylist FROM jumppoints WHERE " ++ "destination = :DEST and hostname = :HOST ;"); + query.bindValue(":DEST", destination); +- query.bindValue(":DESC", description); +- query.bindValue(":KEYLIST", inskey); + query.bindValue(":HOST", GetMythDB()->GetHostName()); + +- if (!query.exec() || !query.isActive()) ++ if (query.exec() && query.next()) + { +- MythDB::DBError("Insert Jump Point", query); ++ keybind = query.value(0).toString(); ++ } ++ else ++ { ++ QString inskey = keybind; ++ ++ query.prepare("INSERT INTO jumppoints (destination, description, " ++ "keylist, hostname) VALUES ( :DEST, :DESC, :KEYLIST, " ++ ":HOST );"); ++ query.bindValue(":DEST", destination); ++ query.bindValue(":DESC", description); ++ query.bindValue(":KEYLIST", inskey); ++ query.bindValue(":HOST", GetMythDB()->GetHostName()); ++ ++ if (!query.exec() || !query.isActive()) ++ { ++ MythDB::DBError("Insert Jump Point", query); ++ } + } + } + } +-- +1.7.9.5 + diff --git a/abs/core/mythtv/stable-29/mythtv/PKGBUILD b/abs/core/mythtv/stable-29/mythtv/PKGBUILD index ce77213..cdac547 100644 --- a/abs/core/mythtv/stable-29/mythtv/PKGBUILD +++ b/abs/core/mythtv/stable-29/mythtv/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythtv pkgver=29 -pkgrel=7 +pkgrel=9 commit_hash=`cat ../git_src/git_hash` pkgdesc="A Homebrew PVR project $commit_hash" arch=('i686' 'x86_64') @@ -31,12 +31,14 @@ patches=( 'searchMetatdataSelectedGrabber.patch' 'addDamagedToProgDetails.patch' 'defaultThemeLinHES.patch' + 'addEnableDisableAutoShutdownToSystemMenu.patch' 'mythfrontend_en_us.ts_Title_Case.patch' '0006-cardutil_show_displayname.patch' '0037-pull103-Add-heuristic-in-TMDB-script-to-detect-movie-release-years.patch' '0292-UPnP-Reduce-startup-latency-by-moving-blocking-code-to-own-thread.patch' '0294-0283-FE-Add-network-status-to-machine-status-dialog.patch' '0287-MythUiImage-Don-t-block-UI-when-exiting-screens.patch' + '0259-0117-UI-Provide-dbase-cache-for-RegisterKey-and-RegisterJ.patch' ) optdepends=() @@ -129,10 +131,12 @@ md5sums=('fb5a87c52a31168a0c8fdde72f27cc45' '0f674b9cad031ba1e03aaf6b5ee1499f' '6add9c16bbb988067e82029327e567b2' 'b0b238320fa78a4928dce2cea7c85071' + '8e4492d1777234a021f368bd6ee964ee' '1164214d9eb41588f8eb3382565cb003' '5f2bd4065b145b7b7ff09dfd6f08276c' '2371cf6e680179c067a6ff7756638128' '1f0dbd44f8c1a89b86bb331086f58578' 'abaef221b00690b329f4dca18676bcd6' '3cccbab70c7615bc47e51790e024d5bf' + '4b5f00a19006b915b7ee5ab7f861599a' '633cd853a89aeee5388daaad21ccec28') diff --git a/abs/core/mythtv/stable-29/mythtv/addEnableDisableAutoShutdownToSystemMenu.patch b/abs/core/mythtv/stable-29/mythtv/addEnableDisableAutoShutdownToSystemMenu.patch new file mode 100644 index 0000000..b14e2e0 --- /dev/null +++ b/abs/core/mythtv/stable-29/mythtv/addEnableDisableAutoShutdownToSystemMenu.patch @@ -0,0 +1,50 @@ +diff --git a/mythtv/libs/libmythui/myththemedmenu.cpp b/mythtv/libs/libmythui/myththemedmenu.cpp +index ed2e54c..77aaf73 100644 +--- a/mythtv/libs/libmythui/myththemedmenu.cpp ++++ b/mythtv/libs/libmythui/myththemedmenu.cpp +@@ -308,6 +308,8 @@ void MythThemedMenu::ShowMenu() + return; + + int override_menu = GetMythDB()->GetNumSetting("OverrideExitMenu"); ++ int MythShutdownLock = GetMythDB()->GetNumSetting("MythShutdownLock"); ++ int idleTimeoutSecs = GetMythDB()->GetNumSetting("idleTimeoutSecs"); + QString label = tr("System Menu"); + MythScreenStack* mainStack = GetMythMainWindow()->GetMainStack(); + m_menuPopup = new MythDialogBox(label, mainStack, "menuPopup"); +@@ -325,6 +327,21 @@ void MythThemedMenu::ShowMenu() + if (override_menu != 7) + m_menuPopup->AddButton(tr("Exit application"), QVariant("exit")); + ++ // don't offer to enable/disable auto shutdown if auto shutdown is disabled ++ if (idleTimeoutSecs != 0) ++ { ++ if (MythShutdownLock == 0) ++ { ++ m_menuPopup->AddButton(tr("Disable Auto Shutdown"), ++ QVariant("lockShutdown")); ++ } ++ else ++ { ++ m_menuPopup->AddButton(tr("Enable Auto Shutdown"), ++ QVariant("unlockShutdown")); ++ } ++ } ++ + switch (override_menu) + { + case 2: +@@ -416,6 +433,14 @@ void MythThemedMenu::customEvent(QEvent *event) + QString arg("exiting_app"); + m_state->m_callback(m_state->m_callbackdata, arg); + } ++ else if (action == "lockShutdown") ++ { ++ GetMythDB()->SaveSettingOnHost("MythShutdownLock", "1", NULL); ++ } ++ else if (action == "unlockShutdown") ++ { ++ GetMythDB()->SaveSettingOnHost("MythShutdownLock", "0", NULL); ++ } + } + else if (resultid == "password") + { diff --git a/abs/core/mythtv/stable-29/mythweb/PKGBUILD b/abs/core/mythtv/stable-29/mythweb/PKGBUILD index d294694..25dd0d9 100644 --- a/abs/core/mythtv/stable-29/mythweb/PKGBUILD +++ b/abs/core/mythtv/stable-29/mythweb/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythweb pkgver=29 -pkgrel=2 +pkgrel=3 commit_hash=`cat ../git_src/git_hash_web` pkgdesc="Web interface for MythTV's backend, $commit_hash" arch=('i686' 'x86_64') diff --git a/abs/core/nano/PKGBUILD b/abs/core/nano/PKGBUILD index 0b809b3..07211fd 100644 --- a/abs/core/nano/PKGBUILD +++ b/abs/core/nano/PKGBUILD @@ -3,17 +3,17 @@ # Contributor: Judd <judd@archlinux.org> pkgname=nano -pkgver=2.8.1 +pkgver=2.9.1 pkgrel=1 pkgdesc="Pico editor clone with enhancements" -arch=('i686' 'x86_64') +arch=('x86_64') license=('GPL') url="http://www.nano-editor.org" groups=('base') depends=('ncurses' 'file' 'sh') backup=('etc/nanorc') -source=(https://www.nano-editor.org/dist/v2.8/${pkgname}-${pkgver}.tar.gz{,.asc}) -sha256sums=('a48650dab5fc069bb953d020721b6c0f650969abf5a34a27dfd6f038215c5910' +source=(https://www.nano-editor.org/dist/v2.9/${pkgname}-${pkgver}.tar.xz{,.asc}) +sha256sums=('6316d52d0d26af3e79a13dcb4db1c7a4aeac61b37fd9381e801a4189a2ecba7c' 'SKIP') validpgpkeys=('8DA6FE7BFA7A418AB3CB2354BCB356DF91009FA7' # "Chris Allegretta <chrisa@asty.org>" 'A7F6A64A67DA09EF92782DD79DF4862AF1175C5B' # "Benno Schulenberg <bensberg@justemail.net>" diff --git a/abs/core/nvidia-304xx/PKGBUILD b/abs/core/nvidia-304xx/PKGBUILD index c370fa8..6c7a698 100644 --- a/abs/core/nvidia-304xx/PKGBUILD +++ b/abs/core/nvidia-304xx/PKGBUILD @@ -6,7 +6,7 @@ pkgbase=nvidia-304xx pkgname=(nvidia-304xx nvidia-304xx-dkms) pkgver=304.137 _extramodules=extramodules-4.9-ARCH -pkgrel=9 +pkgrel=10 pkgdesc="NVIDIA drivers for linux, 304xx legacy branch" arch=('x86_64') url="http://www.nvidia.com/" diff --git a/abs/core/nvidia-340xx/PKGBUILD b/abs/core/nvidia-340xx/PKGBUILD index a639d7f..4e5bcb4 100644 --- a/abs/core/nvidia-340xx/PKGBUILD +++ b/abs/core/nvidia-340xx/PKGBUILD @@ -6,7 +6,7 @@ pkgbase=nvidia-340xx pkgname=(nvidia-340xx nvidia-340xx-dkms) pkgver=340.104 _extramodules=extramodules-4.9-ARCH -pkgrel=8 +pkgrel=9 pkgdesc="NVIDIA drivers for linux, 340xx legacy branch" arch=('x86_64') url="http://www.nvidia.com/" diff --git a/abs/core/nvidia/PKGBUILD b/abs/core/nvidia/PKGBUILD index d6db1ad..21247b9 100644 --- a/abs/core/nvidia/PKGBUILD +++ b/abs/core/nvidia/PKGBUILD @@ -7,7 +7,7 @@ pkgbase=nvidia pkgname=(nvidia nvidia-dkms) pkgver=387.22 _extramodules=extramodules-4.9-ARCH -pkgrel=8 +pkgrel=9 pkgdesc="NVIDIA drivers for linux" arch=('x86_64') url="http://www.nvidia.com/" diff --git a/abs/core/supplemental-web/PKGBUILD b/abs/core/supplemental-web/PKGBUILD index ea70a2e..4fcef9e 100644 --- a/abs/core/supplemental-web/PKGBUILD +++ b/abs/core/supplemental-web/PKGBUILD @@ -1,7 +1,7 @@ pkgbase=supplemental-web pkgname=('supplemental-web' 'supplemental-web-slave') -pkgver=8.4 -pkgrel=3 +pkgver=8.5 +pkgrel=1 arch=('i686' 'x86_64') license=('GPL') backup=('data/srv/httpd/cgi/extra.cfg.txt') diff --git a/abs/core/supplemental-web/contents/fe_status.py b/abs/core/supplemental-web/contents/fe_status.py index 993ef72..439d0c5 100644 --- a/abs/core/supplemental-web/contents/fe_status.py +++ b/abs/core/supplemental-web/contents/fe_status.py @@ -25,7 +25,8 @@ def parse_xml(frontend): tree = ET.parse(xml) root = tree.getroot() except: - msg(" Couldn't connect to %s" %frontend) + #msg(" Couldn't connect to %s" %frontend) + temp_dict['state'] = "offline" return temp_dict lst = root.find("State") @@ -51,23 +52,25 @@ def parse_xml(frontend): def mythfe_status(cursor,mythDB): - frontends=list(Frontend.fromUPNP()) status_dict={} - #try: + try: #frontends = mythDB.getFrontends() #use cursor instead so it doesn't test connection - #cursor.execute("select hostname from settings where value = 'FrontendIdleTimeout'") - #frontends=cursor.fetchall() - #except: - #msg("Excptions") - #return + cursor.execute("select distinct hostname from settings where hostname is not null;") + frontends=cursor.fetchall() + except: + #msg("Exceptions") + return for i in frontends: + i=''.join(i) try: - fe_hostname = socket.gethostbyaddr(i.host)[0] + fe_hostname = socket.gethostbyaddr(i)[0] except: - print "DNS lookup failed for %s" %i.host - fe_hostname = i.host - status_dict[fe_hostname] = parse_xml(i.host) + #print "DNS lookup failed for %s" %i + fe_hostname = socket.gethostbyname(i) + ip_addr = socket.gethostbyname(i) + fe_hostname = "%s (%s)" %(fe_hostname,ip_addr) + status_dict[fe_hostname] = parse_xml(ip_addr) return status_dict @@ -102,12 +105,12 @@ def print_html(status_dict): print "</table>" print '</div>' - print ''' - <div id="footer"> - </br> - <p>Offline systems are not listed</p> - </div> -''' +# print ''' +# <div id="footer"> +# </br> +# <p>Offline systems are not listed</p> +# </div> +#''' def main(): diff --git a/abs/core/xdotool/PKGBUILD b/abs/core/xdotool/PKGBUILD index 0ce58a3..f8f1236 100644 --- a/abs/core/xdotool/PKGBUILD +++ b/abs/core/xdotool/PKGBUILD @@ -1,26 +1,32 @@ -# $Id: PKGBUILD 48265 2011-05-30 19:01:31Z foutrelis $ -# Maintainer: Evangelos Foutras <foutrelis@gmail.com> +# $Id$ +# Maintainer: Evangelos Foutras <evangelos@foutrelis.com> # Contributor: Rttommy <rttommy@gmail.com> pkgname=xdotool -pkgver=2.20110530.1 +pkgver=3.20160805.1 pkgrel=1 pkgdesc="Command-line X11 automation tool" -arch=('i686' 'x86_64') +arch=('x86_64') url="http://www.semicomplete.com/projects/xdotool/" license=('BSD') -depends=('libxtst' 'libxinerama') -source=(http://semicomplete.googlecode.com/files/$pkgname-$pkgver.tar.gz) -sha1sums=('bf8372b2e76e8ee3884763cee6e8b3f66bf29aa6') +depends=('libxtst' 'libxinerama' 'libxkbcommon') +source=(https://github.com/jordansissel/xdotool/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz) +sha256sums=('35be5ff6edf0c620a0e16f09ea5e101d5173280161772fca18657d83f20fcca8') build() { cd "$srcdir/$pkgname-$pkgver" + make WITHOUT_RPATH_FIX=1 +} + +package() { + cd "$srcdir/$pkgname-$pkgver" - make make PREFIX="$pkgdir/usr" INSTALLMAN="$pkgdir/usr/share/man" install - # License - install -Dm644 COPYRIGHT "$pkgdir/usr/share/licenses/xdotool/COPYRIGHT" + # Remove execute bit from header file + chmod -x "$pkgdir/usr/include/xdo.h" + + install -Dm644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/COPYRIGHT" } # vim:set ts=2 sw=2 et: diff --git a/abs/core/xf86-video-intel/PKGBUILD b/abs/core/xf86-video-intel/PKGBUILD index f6f56d3..3093faa 100644 --- a/abs/core/xf86-video-intel/PKGBUILD +++ b/abs/core/xf86-video-intel/PKGBUILD @@ -3,16 +3,16 @@ # Maintainer: Jan de Groot <jgc@archlinux.org> pkgname=xf86-video-intel -_commit=7e9e92c # 7 digits -pkgver=2.99.917+767+g7e9e92c +_commit=af6d8e9e8f546e5cba60e3a62765c2dbd0328e83 # master +pkgver=2.99.917+802+gaf6d8e9 pkgrel=1 epoch=1 -arch=(i686 x86_64) +arch=(x86_64) url="https://01.org/linuxgraphics" license=('custom') install=$pkgname.install pkgdesc="X.org Intel i810/i830/i915/945G/G965+ video drivers" -depends=('mesa-dri' 'libxvmc' 'pixman' 'xcb-util>=0.3.9' 'libsystemd') +depends=('mesa' 'libxvmc' 'pixman' 'xcb-util>=0.3.9' 'libsystemd') makedepends=('xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=23' 'libx11' 'libxrender' # additional deps for intel-virtual-output 'libxrandr' 'libxinerama' 'libxcursor' 'libxtst' 'libxss' @@ -28,13 +28,12 @@ provides=('xf86-video-intel-uxa' 'xf86-video-intel-sna') conflicts=('xorg-server<1.19' 'X-ABI-VIDEODRV_VERSION<23' 'X-ABI-VIDEODRV_VERSION>=24' 'xf86-video-intel-sna' 'xf86-video-intel-uxa' 'xf86-video-i810' 'xf86-video-intel-legacy') groups=('xorg-drivers') -#source=(${url}/archive/individual/driver/${pkgname}-${pkgver}.tar.bz2) -source=("git://anongit.freedesktop.org/xorg/driver/xf86-video-intel#commit=${_commit}") +source=("git+https://anongit.freedesktop.org/git/xorg/driver/xf86-video-intel#commit=$_commit") sha256sums=('SKIP') pkgver() { cd $pkgname - git describe --long | sed 's/-/+/g' + git describe --tags | sed 's/-/+/g' } prepare() { @@ -44,6 +43,14 @@ prepare() { build() { cd $pkgname + + # Since pacman 5.0.2-2, hardened flags are now enabled in makepkg.conf + # With them, module fail to load with undefined symbol. + # See https://bugs.archlinux.org/task/55102 / https://bugs.archlinux.org/task/54845 + export CFLAGS=${CFLAGS/-fno-plt} + export CXXFLAGS=${CXXFLAGS/-fno-plt} + export LDFLAGS=${LDFLAGS/,-z,now} + ./configure --prefix=/usr \ --libexecdir=/usr/lib \ --with-default-dri=3 diff --git a/abs/core/zilog-firmware/PKGBUILD b/abs/core/zilog-firmware/PKGBUILD index c779f78..87cc82b 100644 --- a/abs/core/zilog-firmware/PKGBUILD +++ b/abs/core/zilog-firmware/PKGBUILD @@ -1,14 +1,14 @@ pkgname=zilog-firmware pkgver=1 -pkgrel=2 +pkgrel=3 pkgdesc="Firmware for zilog blaster" -arch=('i586' 'i686' 'x86_64') +arch=('x86_64') url="http://www.blushingpenguin.com/mark/blog/?p=24" source=(http://www.blushingpenguin.com/mark/lmilk/haup-ir-blaster.bin) -build() { - cd $startdir/src/ - mkdir -p $startdir/pkg/lib/firmware - install -m0755 $startdir/src/haup-ir-blaster.bin $startdir/pkg/lib/firmware +package() { + cd $srcdir/ + mkdir -p $pkgdir/usr/lib/firmware + install -m0755 $srcdir/haup-ir-blaster.bin $pkgdir/usr/lib/firmware } md5sums=('1c117d591bbcb733690e1b7b36202490') |