|
|
488707 |
From 00dcd65f731e4a44418029c0a8b7107bbbbefc94 Mon Sep 17 00:00:00 2001
|
|
|
488707 |
From: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
488707 |
Date: Thu, 6 Oct 2016 12:25:35 +0200
|
|
|
488707 |
Subject: Add inital redhat build support
|
|
|
488707 |
|
|
|
488707 |
Rebase notes (2.2.32):
|
|
|
488707 |
- Fix license text
|
|
|
488707 |
|
|
|
488707 |
Rebase notes (2.2.26):
|
|
|
488707 |
- update to RHEL 8 build
|
|
|
488707 |
- Do not use INSTALED_FILES for %files
|
|
|
488707 |
|
|
|
488707 |
Rebase notes (2.2.10):
|
|
|
488707 |
- switched to sha256
|
|
|
488707 |
- added .gitpublish profile
|
|
|
488707 |
|
|
|
488707 |
Merged patches (2.2.32):
|
|
|
488707 |
- ce36fd9 Use Python3
|
|
|
488707 |
- 952c830 Remove FIPS setting from the default config
|
|
|
488707 |
- cc9df73 Switch hardcoded python3 shebangs into the %%{__python3} macro
|
|
|
488707 |
- 66b6f8c Use correct macro for waagent.service
|
|
|
488707 |
- 1b15ada Switch to platform-python in systemd unit file
|
|
|
488707 |
- 59f682b Use sys.executable to find system python
|
|
|
488707 |
|
|
|
488707 |
(cherry picked from commit 19d4f82cd5345fdc52b357afcf3b5aa4bc4ce4d9)
|
|
|
488707 |
(cherry picked from commit 1676db295321adbd571f04773782eed5b0817d64)
|
|
|
488707 |
---
|
|
|
488707 |
.gitpublish | 8 +
|
|
|
488707 |
azurelinuxagent/ga/update.py | 12 +-
|
|
|
488707 |
bin/waagent | 2 +-
|
|
|
488707 |
bin/waagent2.0 | 2 +-
|
|
|
488707 |
config/waagent.conf | 3 -
|
|
|
488707 |
init/arch/waagent.service | 2 +-
|
|
|
488707 |
init/clearlinux/waagent.service | 2 +-
|
|
|
488707 |
init/suse/waagent | 2 +-
|
|
|
488707 |
init/waagent.service | 2 +-
|
|
|
488707 |
makepkg.py | 2 +-
|
|
|
488707 |
redhat/.gitignore | 1 +
|
|
|
488707 |
redhat/Makefile | 72 +++++++
|
|
|
488707 |
redhat/Makefile.common | 37 ++++
|
|
|
488707 |
redhat/WALinuxAgent.spec.template | 169 +++++++++++++++
|
|
|
488707 |
redhat/rpmbuild/BUILD/.gitignore | 2 +
|
|
|
488707 |
redhat/rpmbuild/RPMS/.gitignore | 2 +
|
|
|
488707 |
redhat/rpmbuild/SOURCES/.gitignore | 2 +
|
|
|
488707 |
redhat/rpmbuild/SPECS/.gitignore | 2 +
|
|
|
488707 |
redhat/rpmbuild/SRPMS/.gitignore | 2 +
|
|
|
488707 |
redhat/scripts/frh.py | 27 +++
|
|
|
488707 |
redhat/scripts/git-backport-diff | 327 ++++++++++++++++++++++++++++++
|
|
|
488707 |
redhat/scripts/git-compile-check | 215 ++++++++++++++++++++
|
|
|
488707 |
redhat/scripts/process-patches.sh | 79 ++++++++
|
|
|
488707 |
redhat/scripts/tarball_checksum.sh | 3 +
|
|
|
488707 |
setup.py | 2 +-
|
|
|
488707 |
tests/data/ext/sample_ext-1.3.0/sample.py | 2 +-
|
|
|
488707 |
26 files changed, 964 insertions(+), 17 deletions(-)
|
|
|
488707 |
create mode 100644 .gitpublish
|
|
|
488707 |
create mode 100644 redhat/.gitignore
|
|
|
488707 |
create mode 100644 redhat/Makefile
|
|
|
488707 |
create mode 100644 redhat/Makefile.common
|
|
|
488707 |
create mode 100644 redhat/WALinuxAgent.spec.template
|
|
|
488707 |
create mode 100644 redhat/rpmbuild/BUILD/.gitignore
|
|
|
488707 |
create mode 100644 redhat/rpmbuild/RPMS/.gitignore
|
|
|
488707 |
create mode 100644 redhat/rpmbuild/SOURCES/.gitignore
|
|
|
488707 |
create mode 100644 redhat/rpmbuild/SPECS/.gitignore
|
|
|
488707 |
create mode 100644 redhat/rpmbuild/SRPMS/.gitignore
|
|
|
488707 |
create mode 100755 redhat/scripts/frh.py
|
|
|
488707 |
create mode 100755 redhat/scripts/git-backport-diff
|
|
|
488707 |
create mode 100755 redhat/scripts/git-compile-check
|
|
|
488707 |
create mode 100755 redhat/scripts/process-patches.sh
|
|
|
488707 |
create mode 100755 redhat/scripts/tarball_checksum.sh
|
|
|
488707 |
|
|
|
488707 |
diff --git a/azurelinuxagent/ga/update.py b/azurelinuxagent/ga/update.py
|
|
|
488707 |
index d3c39c1..3617809 100644
|
|
|
488707 |
--- a/azurelinuxagent/ga/update.py
|
|
|
488707 |
+++ b/azurelinuxagent/ga/update.py
|
|
|
488707 |
@@ -92,8 +92,11 @@ def get_update_handler():
|
|
|
488707 |
|
|
|
488707 |
|
|
|
488707 |
def get_python_cmd():
|
|
|
488707 |
- major_version = platform.python_version_tuple()[0]
|
|
|
488707 |
- return "python" if int(major_version) <= 2 else "python{0}".format(major_version)
|
|
|
488707 |
+ if sys.executable:
|
|
|
488707 |
+ return sys.executable
|
|
|
488707 |
+ else:
|
|
|
488707 |
+ major_version = platform.python_version_tuple()[0]
|
|
|
488707 |
+ return "python" if int(major_version) <= 2 else "python{0}".format(major_version)
|
|
|
488707 |
|
|
|
488707 |
|
|
|
488707 |
class UpdateHandler(object):
|
|
|
488707 |
@@ -150,9 +153,8 @@ class UpdateHandler(object):
|
|
|
488707 |
|
|
|
488707 |
# Launch the correct Python version for python-based agents
|
|
|
488707 |
cmds = textutil.safe_shlex_split(agent_cmd)
|
|
|
488707 |
- if cmds[0].lower() == "python":
|
|
|
488707 |
- cmds[0] = get_python_cmd()
|
|
|
488707 |
- agent_cmd = " ".join(cmds)
|
|
|
488707 |
+ cmds[0] = get_python_cmd()
|
|
|
488707 |
+ agent_cmd = " ".join(cmds)
|
|
|
488707 |
|
|
|
488707 |
self._evaluate_agent_health(latest_agent)
|
|
|
488707 |
|
|
|
488707 |
diff --git a/bin/waagent b/bin/waagent
|
|
|
488707 |
index 4039e03..10836c2 100755
|
|
|
488707 |
--- a/bin/waagent
|
|
|
488707 |
+++ b/bin/waagent
|
|
|
488707 |
@@ -1,4 +1,4 @@
|
|
|
488707 |
-#!/usr/bin/env python
|
|
|
488707 |
+#!/usr/bin/env python3
|
|
|
488707 |
#
|
|
|
488707 |
# Azure Linux Agent
|
|
|
488707 |
#
|
|
|
488707 |
diff --git a/bin/waagent2.0 b/bin/waagent2.0
|
|
|
488707 |
index 25aa0ce..a868211 100644
|
|
|
488707 |
--- a/bin/waagent2.0
|
|
|
488707 |
+++ b/bin/waagent2.0
|
|
|
488707 |
@@ -1,4 +1,4 @@
|
|
|
488707 |
-#!/usr/bin/env python
|
|
|
488707 |
+#!/usr/bin/env python3
|
|
|
488707 |
#
|
|
|
488707 |
# Azure Linux Agent
|
|
|
488707 |
#
|
|
|
488707 |
diff --git a/config/waagent.conf b/config/waagent.conf
|
|
|
488707 |
index 79daacb..513cbf2 100644
|
|
|
488707 |
--- a/config/waagent.conf
|
|
|
488707 |
+++ b/config/waagent.conf
|
|
|
488707 |
@@ -62,9 +62,6 @@ ResourceDisk.MountOptions=None
|
|
|
488707 |
# Enable verbose logging (y|n)
|
|
|
488707 |
Logs.Verbose=n
|
|
|
488707 |
|
|
|
488707 |
-# Is FIPS enabled
|
|
|
488707 |
-OS.EnableFIPS=n
|
|
|
488707 |
-
|
|
|
488707 |
# Root device timeout in seconds.
|
|
|
488707 |
OS.RootDeviceScsiTimeout=300
|
|
|
488707 |
|
|
|
488707 |
diff --git a/init/arch/waagent.service b/init/arch/waagent.service
|
|
|
488707 |
index d426eb2..ff1ebab 100644
|
|
|
488707 |
--- a/init/arch/waagent.service
|
|
|
488707 |
+++ b/init/arch/waagent.service
|
|
|
488707 |
@@ -8,7 +8,7 @@ ConditionPathExists=/etc/waagent.conf
|
|
|
488707 |
|
|
|
488707 |
[Service]
|
|
|
488707 |
Type=simple
|
|
|
488707 |
-ExecStart=/usr/bin/python -u /usr/bin/waagent -daemon
|
|
|
488707 |
+ExecStart=/usr/bin/python3 -u /usr/bin/waagent -daemon
|
|
|
488707 |
Restart=always
|
|
|
488707 |
RestartSec=5
|
|
|
488707 |
|
|
|
488707 |
diff --git a/init/clearlinux/waagent.service b/init/clearlinux/waagent.service
|
|
|
488707 |
index 9afee45..c29fc1b 100644
|
|
|
488707 |
--- a/init/clearlinux/waagent.service
|
|
|
488707 |
+++ b/init/clearlinux/waagent.service
|
|
|
488707 |
@@ -8,7 +8,7 @@ ConditionPathExists=/usr/share/defaults/waagent/waagent.conf
|
|
|
488707 |
|
|
|
488707 |
[Service]
|
|
|
488707 |
Type=simple
|
|
|
488707 |
-ExecStart=/usr/bin/python -u /usr/bin/waagent -daemon
|
|
|
488707 |
+ExecStart=/usr/bin/python3 -u /usr/bin/waagent -daemon
|
|
|
488707 |
Restart=always
|
|
|
488707 |
RestartSec=5
|
|
|
488707 |
|
|
|
488707 |
diff --git a/init/suse/waagent b/init/suse/waagent
|
|
|
488707 |
index b77b0fa..317e89e 100755
|
|
|
488707 |
--- a/init/suse/waagent
|
|
|
488707 |
+++ b/init/suse/waagent
|
|
|
488707 |
@@ -34,7 +34,7 @@
|
|
|
488707 |
# Description: Start the MicrosoftAzureLinuxAgent
|
|
|
488707 |
### END INIT INFO
|
|
|
488707 |
|
|
|
488707 |
-PYTHON=/usr/bin/python
|
|
|
488707 |
+PYTHON=/usr/bin/python3
|
|
|
488707 |
WAZD_BIN=/usr/sbin/waagent
|
|
|
488707 |
WAZD_CONF=/etc/waagent.conf
|
|
|
488707 |
WAZD_PIDFILE=/var/run/waagent.pid
|
|
|
488707 |
diff --git a/init/waagent.service b/init/waagent.service
|
|
|
488707 |
index e91f143..3c7710f 100644
|
|
|
488707 |
--- a/init/waagent.service
|
|
|
488707 |
+++ b/init/waagent.service
|
|
|
488707 |
@@ -8,7 +8,7 @@ ConditionPathExists=/etc/waagent.conf
|
|
|
488707 |
|
|
|
488707 |
[Service]
|
|
|
488707 |
Type=simple
|
|
|
488707 |
-ExecStart=/usr/bin/python -u /usr/sbin/waagent -daemon
|
|
|
488707 |
+ExecStart=/usr/libexec/platform-python -u /usr/sbin/waagent -daemon
|
|
|
488707 |
Restart=always
|
|
|
488707 |
RestartSec=5
|
|
|
488707 |
|
|
|
488707 |
diff --git a/makepkg.py b/makepkg.py
|
|
|
488707 |
index 52e0eae..51c263c 100755
|
|
|
488707 |
--- a/makepkg.py
|
|
|
488707 |
+++ b/makepkg.py
|
|
|
488707 |
@@ -1,4 +1,4 @@
|
|
|
488707 |
-#!/usr/bin/env python
|
|
|
488707 |
+#!/usr/bin/env python3
|
|
|
488707 |
|
|
|
488707 |
import glob
|
|
|
488707 |
import os
|
|
|
488707 |
diff --git a/setup.py b/setup.py
|
|
|
488707 |
index e15a2d4..6fbf0ba 100755
|
|
|
488707 |
--- a/setup.py
|
|
|
488707 |
+++ b/setup.py
|
|
|
488707 |
@@ -1,4 +1,4 @@
|
|
|
488707 |
-#!/usr/bin/env python
|
|
|
488707 |
+#!/usr/bin/env python3
|
|
|
488707 |
#
|
|
|
488707 |
# Microsoft Azure Linux Agent setup.py
|
|
|
488707 |
#
|
|
|
488707 |
diff --git a/tests/data/ext/sample_ext-1.3.0/sample.py b/tests/data/ext/sample_ext-1.3.0/sample.py
|
|
|
488707 |
index 74bd839..bf6ed99 100755
|
|
|
488707 |
--- a/tests/data/ext/sample_ext-1.3.0/sample.py
|
|
|
488707 |
+++ b/tests/data/ext/sample_ext-1.3.0/sample.py
|
|
|
488707 |
@@ -1,4 +1,4 @@
|
|
|
488707 |
-#!/usr/bin/env python
|
|
|
488707 |
+#!/usr/bin/env python3
|
|
|
488707 |
|
|
|
488707 |
import os
|
|
|
488707 |
|
|
|
488707 |
--
|
|
|
488707 |
1.8.3.1
|
|
|
488707 |
|