summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2018-06-03 13:07:00 +0200
committerRamón M. Gómez <ramongomez@us.es>2018-06-03 13:07:00 +0200
commit82dbaff33f6f214d66911565a689d95506a12ac9 (patch)
treefd02b802590d70d800c0fc952a3bf0178c733e47
parent3cc5bd2682ef58587718b5b57bbb41295747e85b (diff)
#840: Creación de nuevos OGAgent para versión 1.1.1 en desarrollo.
-rw-r--r--admin/Sources/Clients/ogagent/INSTALL.es.txt4
-rwxr-xr-xadmin/Sources/Clients/ogagent/linux/build-packages.sh6
-rw-r--r--admin/Sources/Clients/ogagent/linux/debian/changelog8
-rwxr-xr-xadmin/Sources/Clients/ogagent/macos/build-pkg.sh6
-rw-r--r--admin/Sources/Clients/ogagent/src/VERSION2
-rw-r--r--admin/Sources/Clients/ogagent/src/opengnsys/__init__.py11
-rw-r--r--admin/Sources/Clients/ogagent/src/setup.py23
-rwxr-xr-xadmin/Sources/Clients/ogagent/src/update.sh1
8 files changed, 38 insertions, 23 deletions
diff --git a/admin/Sources/Clients/ogagent/INSTALL.es.txt b/admin/Sources/Clients/ogagent/INSTALL.es.txt
index 3f43206f..9eb2e174 100644
--- a/admin/Sources/Clients/ogagent/INSTALL.es.txt
+++ b/admin/Sources/Clients/ogagent/INSTALL.es.txt
@@ -36,10 +36,8 @@ Instalar OGAgent en cliente modelo
- Descargar el fichero correspondiente en el sistema operativo del cliente.
- Ubuntu, Debian y derivados:
- - Instalar dependencias (NOTA: revisar dependencias para Ubuntu 12.04):
- sudo apt-get install -y libxss1 policykit-1 python python-requests python-qt4 python-six python-prctl
- Descargar e instalar el agente:
- sudo dpkg -i ogagent_Version_all.deb
+ sudo apt install ./ogagent_Version_all.deb
- Configurar el agente:
sudo sed -i "0,/remote=/ s,remote=.*,remote=https://IPServidorOpenGnsys/opengnsys/rest/," /usr/share/OGAgent/cfg/ogagent.cfg
- Iniciar el servicio (se iniciará automáticamente en el proceso de arranque):
diff --git a/admin/Sources/Clients/ogagent/linux/build-packages.sh b/admin/Sources/Clients/ogagent/linux/build-packages.sh
index b4f11077..02b5ee12 100755
--- a/admin/Sources/Clients/ogagent/linux/build-packages.sh
+++ b/admin/Sources/Clients/ogagent/linux/build-packages.sh
@@ -1,11 +1,11 @@
#!/bin/bash
-VERSION=1.1.0
-RELEASE=1
-
cd $(dirname "$0")
top=`pwd`
+[ -r ../src/VERSION ] && VERSION="$(cat ../src/VERSION)" || VERSION="1.1.0"
+RELEASE="1"
+
# Debian based
dpkg-buildpackage -b -d
diff --git a/admin/Sources/Clients/ogagent/linux/debian/changelog b/admin/Sources/Clients/ogagent/linux/debian/changelog
index 01fd564d..176cac0d 100644
--- a/admin/Sources/Clients/ogagent/linux/debian/changelog
+++ b/admin/Sources/Clients/ogagent/linux/debian/changelog
@@ -1,8 +1,14 @@
+ogagent (1.1.1) unstable; urgency=medium
+
+ * OGAgent code retrieved from GitHub
+
+ -- Ramón M. Gómez <ramongomez@us.es> Sun, 3 Jun 2018 13:00:00 +0200
+
ogagent (1.1.0) stable; urgency=medium
* Functional OpenGnsys Agent interacting with OpenGnsys Server 1.1.0
- -- Ramón M. Gómez <ramongomez@us.es> Tue, 13 Oct 2016 17:00:00 +0200
+ -- Ramón M. Gómez <ramongomez@us.es> Tue, 13 Oct 2016 17:00:00 +0100
ogagent (1.0.0) stable; urgency=medium
diff --git a/admin/Sources/Clients/ogagent/macos/build-pkg.sh b/admin/Sources/Clients/ogagent/macos/build-pkg.sh
index 500da58e..29f5545a 100755
--- a/admin/Sources/Clients/ogagent/macos/build-pkg.sh
+++ b/admin/Sources/Clients/ogagent/macos/build-pkg.sh
@@ -2,11 +2,11 @@
# Create macOS installation packages.
# Based on bomutils tutorail: http://bomutils.dyndns.org/tutorial.html
-VERSION=1.1.0
+cd $(dirname $0)
+[ -r ../src/VERSION ] && VERSION="$(cat ../src/VERSION)" || VERSION="1.1.0"
AUTHOR="OpenGnsys Project"
# Create empty directories.
-cd $(dirname $0)
rm -fr build
mkdir -p build && cd build
mkdir -p flat/base.pkg flat/Resources/en.lproj
@@ -57,7 +57,7 @@ mkbom -u 0 -g 80 root flat/base.pkg/Bom
cat << EOT > flat/Distribution
<?xml version="1.0" encoding="utf-8"?>
<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.3" authoringToolBuild="174">
- <title>OGAgent 1.1.0</title>
+ <title>OGAgent $VERSION</title>
<options customize="never" allow-external-scripts="no"/>
<domains enable_anywhere="true"/>
<installation-check script="pm_install_check();"/>
diff --git a/admin/Sources/Clients/ogagent/src/VERSION b/admin/Sources/Clients/ogagent/src/VERSION
index 9084fa2f..524cb552 100644
--- a/admin/Sources/Clients/ogagent/src/VERSION
+++ b/admin/Sources/Clients/ogagent/src/VERSION
@@ -1 +1 @@
-1.1.0
+1.1.1
diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/__init__.py
index 48453fb7..02e7c341 100644
--- a/admin/Sources/Clients/ogagent/src/opengnsys/__init__.py
+++ b/admin/Sources/Clients/ogagent/src/opengnsys/__init__.py
@@ -26,9 +26,9 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-'''
+"""
@author: Adolfo Gómez, dkmaster at dkmon dot com
-'''
+"""
from __future__ import unicode_literals
# On centos, old six release does not includes byte2int, nor six.PY2
@@ -37,7 +37,11 @@ import six
import modules
from RESTApi import REST, RESTError
-VERSION = '1.1.0'
+try:
+ with open('VERSION', 'r') as v:
+ VERSION = v.read()
+except IOError:
+ VERSION = '1.1.0'
__title__ = 'OpenGnsys Agent'
__version__ = VERSION
@@ -46,7 +50,6 @@ __author__ = 'Adolfo Gómez'
__license__ = "BSD 3-clause"
__copyright__ = "Copyright VirtualCable S.L.U."
-
if not hasattr(six, 'byte2int'):
if six.PY3:
import operator
diff --git a/admin/Sources/Clients/ogagent/src/setup.py b/admin/Sources/Clients/ogagent/src/setup.py
index f80bf33b..15254f4f 100644
--- a/admin/Sources/Clients/ogagent/src/setup.py
+++ b/admin/Sources/Clients/ogagent/src/setup.py
@@ -26,12 +26,10 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-'''
+"""
@author: Adolfo Gómez, dkmaster at dkmon dot com
@author: Ramón M. Gómez, ramongomez at us dot es
-'''
-
-VERSION = '1.1.0'
+"""
# ModuleFinder can't handle runtime changes to __path__, but win32com uses them
try:
@@ -44,7 +42,8 @@ try:
import py2exe.mf as modulefinder
except ImportError:
import modulefinder
- import win32com, sys
+ import win32com
+ import sys
for p in win32com.__path__[1:]:
modulefinder.AddPackagePath("win32com", p)
for extra in ["win32com.shell"]: # ,"win32com.mapi"
@@ -56,13 +55,21 @@ except ImportError:
# no build path setup, no worries.
pass
+import os
from distutils.core import setup
-import py2exe
+
import sys
-import os
+
+# Reading version file:
+try:
+ with open('VERSION', 'r') as v:
+ VERSION = v.read()
+except IOError:
+ VERSION = '1.1.0'
sys.argv.append('py2exe')
+
def get_requests_cert_file():
"""Add Python requests or certifi .pem file for installers."""
import requests
@@ -115,7 +122,7 @@ setup(
}
],
service=[udsservice],
- data_files=[('', [get_requests_cert_file()]),('cfg', ['cfg/ogagent.cfg', 'cfg/ogclient.cfg'])],
+ data_files=[('', [get_requests_cert_file()]), ('cfg', ['cfg/ogagent.cfg', 'cfg/ogclient.cfg'])],
options={
'py2exe': {
'bundle_files': 3,
diff --git a/admin/Sources/Clients/ogagent/src/update.sh b/admin/Sources/Clients/ogagent/src/update.sh
index 1019ea85..e6e02ab3 100755
--- a/admin/Sources/Clients/ogagent/src/update.sh
+++ b/admin/Sources/Clients/ogagent/src/update.sh
@@ -33,6 +33,7 @@ function process {
}
cd $(dirname "$0")
+[ -r VERSION ] && sed -i "s/Version [^<]*/Version $(cat VERSION)/" about-dialog.ui
pyrcc4 -py3 OGAgent.qrc -o OGAgent_rc.py