diff --git a/build/aux/headless.patch b/build/aux/headless.patch deleted file mode 100755 index 8f37d4b..0000000 --- a/build/aux/headless.patch +++ /dev/null @@ -1,293 +0,0 @@ -From 5053b17a1de91ff9771c30fce63e03af515e7d6b Mon Sep 17 00:00:00 2001 -From: Celed -Date: Thu, 1 Oct 2015 10:40:05 +0200 -Subject: [PATCH] Headless patch - ---- - xbmc/AppParamParser.cpp | 2 ++ - xbmc/Application.cpp | 60 ++++++++++++++++++++----------------- - xbmc/Application.h | 19 +++++++++--- - xbmc/guilib/GUIDialog.cpp | 5 ++-- - xbmc/settings/SettingConditions.cpp | 3 ++ - xbmc/xbmc.cpp | 2 +- - 6 files changed, 56 insertions(+), 35 deletions(-) - -diff --git a/xbmc/AppParamParser.cpp b/xbmc/AppParamParser.cpp -index 14886b5..56529f4 100644 ---- a/xbmc/AppParamParser.cpp -+++ b/xbmc/AppParamParser.cpp -@@ -139,6 +139,8 @@ void CAppParamParser::ParseArg(const std::string &arg) - m_testmode = true; - else if (arg.substr(0, 11) == "--settings=") - g_advancedSettings.AddSettingsFile(arg.substr(11)); -+ else if (arg == "--headless") -+ g_application.SetHeadless(true); - else if (arg.length() != 0 && arg[0] != '-') - { - if (m_testmode) -diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp -index bc55630..847e5cf 100644 ---- a/xbmc/Application.cpp -+++ b/xbmc/Application.cpp -@@ -299,6 +299,7 @@ CApplication::CApplication(void) - m_bPlatformDirectories = true; - - m_bStandalone = false; -+ m_headless = false; - m_bEnableLegacyRes = false; - m_bSystemScreenSaverEnable = false; - m_pInertialScrollingHandler = new CInertialScrollingHandler(); -@@ -4370,15 +4371,18 @@ bool CApplication::OnMessage(CGUIMessage& message) - - if (!m_pPlayer->IsPlayingVideo()) - { -- if(g_windowManager.GetActiveWindow() == WINDOW_FULLSCREEN_VIDEO) -- { -- g_windowManager.PreviousWindow(); -- } -- else -+ if (!IsHeadless()) - { -- CSingleLock lock(g_graphicsContext); -- // resets to res_desktop or look&feel resolution (including refreshrate) -- g_graphicsContext.SetFullScreenVideo(false); -+ if(g_windowManager.GetActiveWindow() == WINDOW_FULLSCREEN_VIDEO) -+ { -+ g_windowManager.PreviousWindow(); -+ } -+ else -+ { -+ CSingleLock lock(g_graphicsContext); -+ // resets to res_desktop or look&feel resolution (including refreshrate) -+ g_graphicsContext.SetFullScreenVideo(false); -+ } - } - } - -diff --git a/xbmc/Application.h b/xbmc/Application.h -index 6029a82..6d02f3e 100644 ---- a/xbmc/Application.h -+++ b/xbmc/Application.h -@@ -342,6 +342,16 @@ public: - return m_bStandalone; - } - -+ void SetHeadless(bool value) -+ { -+ m_headless = value; -+ } -+ -+ bool IsHeadless() const -+ { -+ return m_headless; -+ } -+ - void SetEnableLegacyRes(bool value) - { - m_bEnableLegacyRes = value; -@@ -468,6 +478,7 @@ protected: - bool m_skipGuiRender; - - bool m_bStandalone; -+ bool m_headless; - bool m_bEnableLegacyRes; - bool m_bTestMode; - bool m_bSystemScreenSaverEnable; -diff --git a/xbmc/guilib/GUIDialog.cpp b/xbmc/guilib/GUIDialog.cpp -index 841ced0..42aa62a 100644 ---- a/xbmc/guilib/GUIDialog.cpp -+++ b/xbmc/guilib/GUIDialog.cpp -@@ -142,7 +142,7 @@ void CGUIDialog::UpdateVisibility() - else - Close(); - } -- -+ - if (m_autoClosing) - { // check if our timer is running - if (!m_showStartTime) -@@ -173,7 +173,8 @@ void CGUIDialog::Open_Internal(bool bProcessRenderLoop) - CSingleLock lock(g_graphicsContext); - - if (!g_windowManager.Initialized() || -- (m_active && !m_closing && !IsAnimating(ANIM_TYPE_WINDOW_CLOSE))) -+ (m_active && !m_closing && !IsAnimating(ANIM_TYPE_WINDOW_CLOSE)) || -+ g_application.IsHeadless()) - return; - - // set running before it's added to the window manager, else the auto-show code -diff --git a/xbmc/settings/SettingConditions.cpp b/xbmc/settings/SettingConditions.cpp -index 2d3c02a..0847ac8 100644 ---- a/xbmc/settings/SettingConditions.cpp -+++ b/xbmc/settings/SettingConditions.cpp -@@ -270,6 +270,9 @@ void CSettingConditions::Initialize() - if (g_application.IsStandAlone()) - m_simpleConditions.insert("isstandalone"); - -+ if (g_application.IsHeadless()) -+ m_simpleConditions.insert("is_headless"); -+ - if(CAEFactory::SupportsQualitySetting()) - m_simpleConditions.insert("has_ae_quality_levels"); - -diff --git a/xbmc/xbmc.cpp b/xbmc/xbmc.cpp -index 366e4b5..87cb32e 100644 ---- a/xbmc/xbmc.cpp -+++ b/xbmc/xbmc.cpp -@@ -80,7 +80,7 @@ extern "C" int XBMC_Run(bool renderGUI) - g_RBP.LogFirmwareVerison(); - #endif - -- if (renderGUI && !g_application.CreateGUI()) -+ if (renderGUI && !g_application.IsHeadless() && !g_application.CreateGUI()) - { - CMessagePrinter::DisplayError("ERROR: Unable to create GUI. Exiting"); - return status; --- -2.6.0From 5053b17a1de91ff9771c30fce63e03af515e7d6b Mon Sep 17 00:00:00 2001 -From: Celed -Date: Thu, 1 Oct 2015 10:40:05 +0200 -Subject: [PATCH] Headless patch - ---- - xbmc/AppParamParser.cpp | 2 ++ - xbmc/Application.cpp | 60 ++++++++++++++++++++----------------- - xbmc/Application.h | 19 +++++++++--- - xbmc/guilib/GUIDialog.cpp | 5 ++-- - xbmc/settings/SettingConditions.cpp | 3 ++ - xbmc/xbmc.cpp | 2 +- - 6 files changed, 56 insertions(+), 35 deletions(-) - -diff --git a/xbmc/AppParamParser.cpp b/xbmc/AppParamParser.cpp -index 14886b5..56529f4 100644 ---- a/xbmc/AppParamParser.cpp -+++ b/xbmc/AppParamParser.cpp -@@ -139,6 +139,8 @@ void CAppParamParser::ParseArg(const std::string &arg) - m_testmode = true; - else if (arg.substr(0, 11) == "--settings=") - g_advancedSettings.AddSettingsFile(arg.substr(11)); -+ else if (arg == "--headless") -+ g_application.SetHeadless(true); - else if (arg.length() != 0 && arg[0] != '-') - { - if (m_testmode) -diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp -index bc55630..847e5cf 100644 ---- a/xbmc/Application.cpp -+++ b/xbmc/Application.cpp -@@ -299,6 +299,7 @@ CApplication::CApplication(void) - m_bPlatformDirectories = true; - - m_bStandalone = false; -+ m_headless = false; - m_bEnableLegacyRes = false; - m_bSystemScreenSaverEnable = false; - m_pInertialScrollingHandler = new CInertialScrollingHandler(); -@@ -4370,15 +4371,18 @@ bool CApplication::OnMessage(CGUIMessage& message) - - if (!m_pPlayer->IsPlayingVideo()) - { -- if(g_windowManager.GetActiveWindow() == WINDOW_FULLSCREEN_VIDEO) -- { -- g_windowManager.PreviousWindow(); -- } -- else -+ if (!IsHeadless()) - { -- CSingleLock lock(g_graphicsContext); -- // resets to res_desktop or look&feel resolution (including refreshrate) -- g_graphicsContext.SetFullScreenVideo(false); -+ if(g_windowManager.GetActiveWindow() == WINDOW_FULLSCREEN_VIDEO) -+ { -+ g_windowManager.PreviousWindow(); -+ } -+ else -+ { -+ CSingleLock lock(g_graphicsContext); -+ // resets to res_desktop or look&feel resolution (including refreshrate) -+ g_graphicsContext.SetFullScreenVideo(false); -+ } - } - } - -diff --git a/xbmc/Application.h b/xbmc/Application.h -index 6029a82..6d02f3e 100644 ---- a/xbmc/Application.h -+++ b/xbmc/Application.h -@@ -342,6 +342,16 @@ public: - return m_bStandalone; - } - -+ void SetHeadless(bool value) -+ { -+ m_headless = value; -+ } -+ -+ bool IsHeadless() const -+ { -+ return m_headless; -+ } -+ - void SetEnableLegacyRes(bool value) - { - m_bEnableLegacyRes = value; -@@ -468,6 +478,7 @@ protected: - bool m_skipGuiRender; - - bool m_bStandalone; -+ bool m_headless; - bool m_bEnableLegacyRes; - bool m_bTestMode; - bool m_bSystemScreenSaverEnable; -diff --git a/xbmc/guilib/GUIDialog.cpp b/xbmc/guilib/GUIDialog.cpp -index 841ced0..42aa62a 100644 ---- a/xbmc/guilib/GUIDialog.cpp -+++ b/xbmc/guilib/GUIDialog.cpp -@@ -142,7 +142,7 @@ void CGUIDialog::UpdateVisibility() - else - Close(); - } -- -+ - if (m_autoClosing) - { // check if our timer is running - if (!m_showStartTime) -@@ -173,7 +173,8 @@ void CGUIDialog::Open_Internal(bool bProcessRenderLoop) - CSingleLock lock(g_graphicsContext); - - if (!g_windowManager.Initialized() || -- (m_active && !m_closing && !IsAnimating(ANIM_TYPE_WINDOW_CLOSE))) -+ (m_active && !m_closing && !IsAnimating(ANIM_TYPE_WINDOW_CLOSE)) || -+ g_application.IsHeadless()) - return; - - // set running before it's added to the window manager, else the auto-show code -diff --git a/xbmc/settings/SettingConditions.cpp b/xbmc/settings/SettingConditions.cpp -index 2d3c02a..0847ac8 100644 ---- a/xbmc/settings/SettingConditions.cpp -+++ b/xbmc/settings/SettingConditions.cpp -@@ -270,6 +270,9 @@ void CSettingConditions::Initialize() - if (g_application.IsStandAlone()) - m_simpleConditions.insert("isstandalone"); - -+ if (g_application.IsHeadless()) -+ m_simpleConditions.insert("is_headless"); -+ - if(CAEFactory::SupportsQualitySetting()) - m_simpleConditions.insert("has_ae_quality_levels"); - -diff --git a/xbmc/xbmc.cpp b/xbmc/xbmc.cpp -index 366e4b5..87cb32e 100644 ---- a/xbmc/xbmc.cpp -+++ b/xbmc/xbmc.cpp -@@ -80,7 +80,7 @@ extern "C" int XBMC_Run(bool renderGUI) - g_RBP.LogFirmwareVerison(); - #endif - -- if (renderGUI && !g_application.CreateGUI()) -+ if (renderGUI && !g_application.IsHeadless() && !g_application.CreateGUI()) - { - CMessagePrinter::DisplayError("ERROR: Unable to create GUI. Exiting"); - return status; --- -2.6.0 \ No newline at end of file diff --git a/build/boot/csync.sh b/build/boot/csync.sh index faadedf..33fb06e 100644 --- a/build/boot/csync.sh +++ b/build/boot/csync.sh @@ -1,8 +1,9 @@ #!/bin/bash set -e -# if [ ! -e $CSYNC_CONFIG ]; then - # cp /usr/local/etc/csync2* /host/etc/ -# fi -# rm -r /usr/local/etc -# csync2 -k /host/etc/csync2.pem -# ln -sf /host/etc/ /usr/local/etc \ No newline at end of file +HOST_ETC_CSYNC=/host/etc/csync +if [ ! -e $CSYNC_CONFIG ]; then + cp /usr/local/etc/csync2* $HOST_ETC_CSYNC/ + csync2 -k $HOST_ETC_CSYNC/csync2.pem +fi +rm -r /usr/local/etc +ln -sf $HOST_ETC_CSYNC/ /usr/local/etc \ No newline at end of file diff --git a/build/make/csync.mk b/build/make/csync.mk index 4ac4adb..32191f3 100644 --- a/build/make/csync.mk +++ b/build/make/csync.mk @@ -1,4 +1,4 @@ -csync: base compile +csync: base sshd compile $(call script,$@) $(call runit,xinetd) $(call boot,02,$@) \ No newline at end of file diff --git a/build/runit/xinetd b/build/runit/xinetd index 2b447da..7519fb2 100644 --- a/build/runit/xinetd +++ b/build/runit/xinetd @@ -1,3 +1,3 @@ #!/bin/bash set -e -/usr/sbin/xinetd -d \ No newline at end of file +/usr/sbin/xinetd -dontfork \ No newline at end of file