The waagent port is in serious need of an update or removal.
If anyone uses it please test this diff, if I don't hear from anyone
with test reports I intend to remove it.

Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/waagent/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile    21 May 2021 19:50:36 -0000      1.8
+++ Makefile    23 Nov 2021 10:10:54 -0000
@@ -2,12 +2,11 @@
 
 COMMENT=               Microsoft Azure Linux Agent
 
-V=                     2.2.13
+V=                     2.4.0.2
 GH_ACCOUNT=            Azure
 GH_PROJECT=            WALinuxAgent
 GH_TAGNAME=            v${V}
 PKGNAME=               waagent-${V}
-REVISION=              3
 
 CATEGORIES=            sysutils
 
@@ -15,7 +14,6 @@ CATEGORIES=           sysutils
 PERMIT_PACKAGE=        Yes
 
 MODULES=               lang/python
-MODPY_VERSION =        ${MODPY_DEFAULT_VERSION_2}
 MODPY_SETUPTOOLS=      Yes
 
 MODPY_ADJ_FILES=       bin/waagent
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/waagent/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo    23 Jun 2017 12:37:09 -0000      1.1.1.1
+++ distinfo    23 Nov 2021 10:10:54 -0000
@@ -1,2 +1,2 @@
-SHA256 (WALinuxAgent-2.2.13.tar.gz) = 
elc59b6REHr7a/z3rMk6/1BjiCDDaP8IRamJknQpHuA=
-SIZE (WALinuxAgent-2.2.13.tar.gz) = 690906
+SHA256 (WALinuxAgent-2.4.0.2.tar.gz) = 
rcWxAcRyBtXK+cMrSDP6j1qv44zq/Tpr4fzV/EspphI=
+SIZE (WALinuxAgent-2.4.0.2.tar.gz) = 1220566
Index: patches/patch-azurelinuxagent_common_conf_py
===================================================================
RCS file: patches/patch-azurelinuxagent_common_conf_py
diff -N patches/patch-azurelinuxagent_common_conf_py
--- patches/patch-azurelinuxagent_common_conf_py        23 Jun 2017 12:37:09 
-0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-azurelinuxagent_common_conf_py,v 1.1.1.1 2017/06/23 12:37:09 
reyk Exp $
-
-from 
https://github.com/reyk/WALinuxAgent/commit/b9afe9fb4e0e6b984856c56811c41f44625b410f.patch
-
-Index: azurelinuxagent/common/conf.py
---- azurelinuxagent/common/conf.py.orig
-+++ azurelinuxagent/common/conf.py
-@@ -112,6 +112,9 @@ def get_agent_pid_file_path(conf=__conf__):
-     return conf.get("Pid.File", "/var/run/waagent.pid")
- 
- 
-+def get_ext_enabled(conf=__conf__):
-+    return conf.get_switch("Extension.Enabled", True)
-+
- def get_ext_log_dir(conf=__conf__):
-     return conf.get("Extension.LogDir", "/var/log/azure")
- 
Index: patches/patch-azurelinuxagent_common_osutil_openbsd_py
===================================================================
RCS file: 
/cvs/ports/sysutils/waagent/patches/patch-azurelinuxagent_common_osutil_openbsd_py,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-azurelinuxagent_common_osutil_openbsd_py
--- patches/patch-azurelinuxagent_common_osutil_openbsd_py      23 Jun 2017 
12:37:09 -0000      1.1.1.1
+++ patches/patch-azurelinuxagent_common_osutil_openbsd_py      23 Nov 2021 
10:10:54 -0000
@@ -5,11 +5,11 @@ allow to overwrite /etc with SYSCONFDIR
 Index: azurelinuxagent/common/osutil/openbsd.py
 --- azurelinuxagent/common/osutil/openbsd.py.orig
 +++ azurelinuxagent/common/osutil/openbsd.py
-@@ -39,6 +39,7 @@ class OpenBSDOSUtil(DefaultOSUtil):
-     def __init__(self):
+@@ -42,6 +42,7 @@ class OpenBSDOSUtil(DefaultOSUtil):
          super(OpenBSDOSUtil, self).__init__()
+         self.jit_enabled = True
          self._scsi_disks_timeout_set = False
 +        self.agent_conf_file_path = '${SYSCONFDIR}/waagent.conf'
  
-     def get_instance_id(self):
-         ret, output = shellutil.run_get_output("sysctl -n hw.uuid")
+     @staticmethod
+     def get_agent_bin_path():
Index: patches/patch-azurelinuxagent_ga_update_py
===================================================================
RCS file: patches/patch-azurelinuxagent_ga_update_py
diff -N patches/patch-azurelinuxagent_ga_update_py
--- patches/patch-azurelinuxagent_ga_update_py  23 Jun 2017 12:37:09 -0000      
1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,56 +0,0 @@
-$OpenBSD: patch-azurelinuxagent_ga_update_py,v 1.1.1.1 2017/06/23 12:37:09 
reyk Exp $
-
-from 
https://github.com/reyk/WALinuxAgent/commit/b9afe9fb4e0e6b984856c56811c41f44625b410f.patch
-
-Index: azurelinuxagent/ga/update.py
---- azurelinuxagent/ga/update.py.orig
-+++ azurelinuxagent/ga/update.py
-@@ -238,9 +238,10 @@ class UpdateHandler(object):
-         from azurelinuxagent.ga.env import get_env_handler
-         get_env_handler().run()
- 
--        from azurelinuxagent.ga.exthandlers import get_exthandlers_handler, 
migrate_handler_state
--        exthandlers_handler = get_exthandlers_handler()
--        migrate_handler_state()
-+        if conf.get_ext_enabled():
-+            from azurelinuxagent.ga.exthandlers import 
get_exthandlers_handler, migrate_handler_state
-+            exthandlers_handler = get_exthandlers_handler()
-+            migrate_handler_state()
- 
-         try:
-             send_event_time = datetime.utcnow()
-@@ -263,20 +264,20 @@ class UpdateHandler(object):
- 
-                 utc_start = datetime.utcnow()
- 
--                last_etag = exthandlers_handler.last_etag
--                exthandlers_handler.run()
--
--                log_event = last_etag != exthandlers_handler.last_etag or \
--                            (datetime.utcnow() >= send_event_time)
--                add_event(
--                    AGENT_NAME,
--                    version=CURRENT_VERSION,
--                    op=WALAEventOperation.ProcessGoalState,
--                    is_success=True,
--                    duration=elapsed_milliseconds(utc_start),
--                    log_event=log_event)
--                if log_event:
--                    send_event_time += 
timedelta(minutes=REPORT_STATUS_INTERVAL)
-+                if conf.get_ext_enabled():
-+                    last_etag = exthandlers_handler.last_etag
-+                    exthandlers_handler.run()
-+                    log_event = last_etag != exthandlers_handler.last_etag or 
\
-+                                (datetime.utcnow() >= send_event_time)
-+                    add_event(
-+                        AGENT_NAME,
-+                        version=CURRENT_VERSION,
-+                        op=WALAEventOperation.ProcessGoalState,
-+                        is_success=True,
-+                        duration=elapsed_milliseconds(utc_start),
-+                        log_event=log_event)
-+                    if log_event:
-+                        send_event_time += 
timedelta(minutes=REPORT_STATUS_INTERVAL)
- 
-                 test_agent = self.get_test_agent()
-                 if test_agent is not None and test_agent.in_slice:
Index: patches/patch-config_openbsd_waagent_conf
===================================================================
RCS file: 
/cvs/ports/sysutils/waagent/patches/patch-config_openbsd_waagent_conf,v
retrieving revision 1.2
diff -u -p -r1.2 patch-config_openbsd_waagent_conf
--- patches/patch-config_openbsd_waagent_conf   5 Jun 2020 19:51:29 -0000       
1.2
+++ patches/patch-config_openbsd_waagent_conf   23 Nov 2021 10:10:54 -0000
@@ -1,11 +1,11 @@
 $OpenBSD: patch-config_openbsd_waagent_conf,v 1.2 2020/06/05 19:51:29 sthen 
Exp $
 
-disable extensions and autoupdate
+disable autoupdate
 
 Index: config/openbsd/waagent.conf
 --- config/openbsd/waagent.conf.orig
 +++ config/openbsd/waagent.conf
-@@ -61,7 +61,7 @@ OS.EnableFIPS=n
+@@ -63,7 +63,7 @@ OS.EnableFIPS=n
  OS.RootDeviceScsiTimeout=300
  
  # If "None", the system default version is used.
@@ -14,17 +14,7 @@ Index: config/openbsd/waagent.conf
  
  # Set the path to SSH keys and configuration files
  OS.SshDir=/etc/ssh
-@@ -84,6 +84,9 @@ OS.PasswordPath=/etc/master.passwd
- #
- # Pid.File=/var/run/waagent.pid
- 
-+# Enable or disable extensions, default is enabled
-+Extension.Enabled=n
-+
- #
- # Extension.LogDir=/var/log/azure
- 
-@@ -94,7 +97,7 @@ OS.PasswordPath=/etc/master.passwd
+@@ -96,7 +96,7 @@ OS.PasswordPath=/etc/master.passwd
  # OS.EnableRDMA=y
  
  # Enable or disable goal state processing auto-update, default is enabled
Index: patches/patch-config_waagent_conf
===================================================================
RCS file: patches/patch-config_waagent_conf
diff -N patches/patch-config_waagent_conf
--- patches/patch-config_waagent_conf   23 Jun 2017 12:37:09 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-config_waagent_conf,v 1.1.1.1 2017/06/23 12:37:09 reyk Exp $
-
-from 
https://github.com/reyk/WALinuxAgent/commit/b9afe9fb4e0e6b984856c56811c41f44625b410f.patch
-
-Index: config/waagent.conf
---- config/waagent.conf.orig
-+++ config/waagent.conf
-@@ -85,6 +85,9 @@ OS.SshDir=/etc/ssh
- #
- # Pid.File=/var/run/waagent.pid
- 
-+# Enable or disable extensions, default is enabled
-+# Extension.Enabled=y
-+
- #
- # Extension.LogDir=/var/log/azure
- 


Reply via email to