Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: opennebula-context-voidlinux-0.0.2
@ 2024-01-06 10:33 brodriguez-opennebula
  2024-01-06 11:34 ` [PR PATCH] [Updated] " brodriguez-opennebula
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: brodriguez-opennebula @ 2024-01-06 10:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2389 bytes --]

There is a new pull request by brodriguez-opennebula against master on the void-packages repository

https://github.com/brodriguez-opennebula/void-packages opennebula-context-voidlinux
https://github.com/void-linux/void-packages/pull/48089

New package: opennebula-context-voidlinux-0.0.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl

#### Comments

This is a clean up and custom rewrite of the [OpenNebula](https://opennebula.io/) [contextualization scripts](https://github.com/OpenNebula/addon-context-linux) that provide contextualization in a guest system for an image. In this case the original package is not being used because it was created with "main" distributions in mind (redhat-alike, debian-alike).

Contextualization in OpenNebula tries to keep it simple (it doesn't want to be cloud-init). Everytime the context of the VM is changed, an ISO is generated and loaded into the VM. A `udev` rule then restarts the service, which in its turn runs the scripts that reconfigure the system. 

OpenNebula tries to be distribution agnostic so most scripts are written in shell (I know it goes against the rules), but they provide added value. The package also provides the ruby-written `onegate` command that gathers information about different elements running in a virtual infrastructure.

Its dependencies would be:
- `jq` is used to parse some `iproute2` commands
- `curl` for reporting that the VM is ready
- `ruby` for onegate (script that gathers information from the virtualization system)
- `qemu-ga`, the qemu guest agent for the VM

Thank you

A patch file from https://github.com/void-linux/void-packages/pull/48089.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-opennebula-context-voidlinux-48089.patch --]
[-- Type: text/x-diff, Size: 2592 bytes --]

From b004a37f419202071117a1aa050ef9790531af7e Mon Sep 17 00:00:00 2001
From: Bruno Rodriguez <brodriguez@opennebula.io>
Date: Sat, 6 Jan 2024 11:04:59 +0100
Subject: [PATCH] New package: opennebula-context-voidlinux-0.0.2

---
 .../opennebula-context-voidlinux/INSTALL.msg  | 15 +++++++++
 srcpkgs/opennebula-context-voidlinux/template | 31 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/opennebula-context-voidlinux/INSTALL.msg
 create mode 100644 srcpkgs/opennebula-context-voidlinux/template

diff --git a/srcpkgs/opennebula-context-voidlinux/INSTALL.msg b/srcpkgs/opennebula-context-voidlinux/INSTALL.msg
new file mode 100644
index 0000000000000..8297f6f1a27cf
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/INSTALL.msg
@@ -0,0 +1,15 @@
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+To enable opennebula contextualization in a clean installation:
+
+- Enable service `one-contextd`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Enable service `qemu-ga`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Execute onesysprep
+
+Contextualized network config is stored in `/etc/network_config`
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
diff --git a/srcpkgs/opennebula-context-voidlinux/template b/srcpkgs/opennebula-context-voidlinux/template
new file mode 100644
index 0000000000000..1ce7a134a6f27
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/template
@@ -0,0 +1,31 @@
+# Template file for 'opennebula-context'
+pkgname=opennebula-context-voidlinux
+version=0.0.2
+revision=1
+build_style=gnu-makefile
+short_desc="Contextualization scripts for opennebula"
+depends="curl jq qemu-ga ruby"
+maintainer="brodriguez <brodriguez@opennebula.io>"
+license="Apache-2.0"
+homepage="https://github.com/brodriguez-opennebula/opennebula-context-voidlinux"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=d5f46e318fb1d01cf70d2868bf3528646021d4e6f12440955853a38a747b4314 
+
+do_build() {
+    make install
+}
+
+do_install() {
+    vinstall /usr/bin/onesysprep 540 /usr/bin
+    vinstall /usr/bin/growpart 540 /usr/bin
+    vinstall /usr/bin/one-contextd 540 /usr/bin
+    vinstall /usr/bin/onegate.rb 540 /usr/bin
+    vinstall /usr/bin/onegate 540 /usr/bin
+
+    vmkdir /etc/one-context.d 
+    vcopy /etc/one-context.d/* /etc/one-context.d 
+    vinstall /usr/lib/udev/rules.d/65-context.rules 0444 usr/lib/udev/rules.d/
+    vinstall /etc/sv/one-contextd/run 0544 etc/sv/one-contextd
+    vinstall /etc/sv/one-contextd/log/run 0544 etc/sv/one-contextd/log
+}
+

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PR PATCH] [Updated] New package: opennebula-context-voidlinux-0.0.2
  2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
@ 2024-01-06 11:34 ` brodriguez-opennebula
  2024-01-06 20:04 ` ahesford
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: brodriguez-opennebula @ 2024-01-06 11:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]

There is an updated pull request by brodriguez-opennebula against master on the void-packages repository

https://github.com/brodriguez-opennebula/void-packages opennebula-context-voidlinux
https://github.com/void-linux/void-packages/pull/48089

New package: opennebula-context-voidlinux-0.0.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl

#### Comments

This is a clean up and custom rewrite of the [OpenNebula](https://opennebula.io/) [contextualization scripts](https://github.com/OpenNebula/addon-context-linux) that provide contextualization in a guest system for an image. In this case the original package is not being used because it was created with "main" distributions in mind (redhat-alike, debian-alike).

Contextualization in OpenNebula tries to keep it simple (it doesn't want to be cloud-init). Everytime the context of the VM is changed, an ISO is generated and loaded into the VM. A `udev` rule then restarts the service, which in its turn runs the scripts that reconfigure the system. 

OpenNebula tries to be distribution agnostic so most scripts are written in shell (I know it goes against the rules), but they provide added value. The package also provides the ruby-written `onegate` command that gathers information about different elements running in a virtual infrastructure.

Its dependencies would be:
- `jq` is used to parse some `iproute2` commands
- `curl` for reporting that the VM is ready
- `ruby` for onegate (script that gathers information from the virtualization system)
- `qemu-ga`, the qemu guest agent for the VM

Thank you

A patch file from https://github.com/void-linux/void-packages/pull/48089.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-opennebula-context-voidlinux-48089.patch --]
[-- Type: text/x-diff, Size: 2565 bytes --]

From 59d434379e5bf515a7aa4283e9215c6fa9e8b595 Mon Sep 17 00:00:00 2001
From: Bruno Rodriguez <brodriguez@opennebula.io>
Date: Sat, 6 Jan 2024 11:04:59 +0100
Subject: [PATCH] New package: opennebula-context-voidlinux-0.0.2

---
 .../opennebula-context-voidlinux/INSTALL.msg  | 15 ++++++++++
 srcpkgs/opennebula-context-voidlinux/template | 30 +++++++++++++++++++
 2 files changed, 45 insertions(+)
 create mode 100644 srcpkgs/opennebula-context-voidlinux/INSTALL.msg
 create mode 100644 srcpkgs/opennebula-context-voidlinux/template

diff --git a/srcpkgs/opennebula-context-voidlinux/INSTALL.msg b/srcpkgs/opennebula-context-voidlinux/INSTALL.msg
new file mode 100644
index 0000000000000..8297f6f1a27cf
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/INSTALL.msg
@@ -0,0 +1,15 @@
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+To enable opennebula contextualization in a clean installation:
+
+- Enable service `one-contextd`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Enable service `qemu-ga`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Execute onesysprep
+
+Contextualized network config is stored in `/etc/network_config`
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
diff --git a/srcpkgs/opennebula-context-voidlinux/template b/srcpkgs/opennebula-context-voidlinux/template
new file mode 100644
index 0000000000000..fdd69b73508d4
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/template
@@ -0,0 +1,30 @@
+# Template file for 'opennebula-context-voidlinux'
+pkgname=opennebula-context-voidlinux
+version=0.0.2
+revision=1
+build_style=gnu-makefile
+depends="curl jq qemu-ga ruby"
+short_desc="Contextualization scripts for opennebula"
+maintainer="brodriguez <brodriguez@opennebula.io>"
+license="Apache-2.0"
+homepage="https://github.com/brodriguez-opennebula/opennebula-context-voidlinux"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=d5f46e318fb1d01cf70d2868bf3528646021d4e6f12440955853a38a747b4314
+
+do_build() {
+	make install
+}
+
+do_install() {
+	vinstall /usr/bin/onesysprep 540 /usr/bin
+	vinstall /usr/bin/growpart 540 /usr/bin
+	vinstall /usr/bin/one-contextd 540 /usr/bin
+	vinstall /usr/bin/onegate.rb 540 /usr/bin
+	vinstall /usr/bin/onegate 540 /usr/bin
+
+	vmkdir /etc/one-context.d
+	vcopy /etc/one-context.d/* /etc/one-context.d
+	vinstall /usr/lib/udev/rules.d/65-context.rules 0444 usr/lib/udev/rules.d/
+	vinstall /etc/sv/one-contextd/run 0544 etc/sv/one-contextd
+	vinstall /etc/sv/one-contextd/log/run 0544 etc/sv/one-contextd/log
+}

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: New package: opennebula-context-voidlinux-0.0.2
  2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
  2024-01-06 11:34 ` [PR PATCH] [Updated] " brodriguez-opennebula
@ 2024-01-06 20:04 ` ahesford
  2024-01-07 10:17 ` [PR PATCH] [Updated] " brodriguez-opennebula
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ahesford @ 2024-01-06 20:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/48089#issuecomment-1879814643

Comment:
Application usage instructions belong in `/usr/share/doc/${pkgname}/README.voidlinux`, not `INSTALL.msg`.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PR PATCH] [Updated] New package: opennebula-context-voidlinux-0.0.2
  2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
  2024-01-06 11:34 ` [PR PATCH] [Updated] " brodriguez-opennebula
  2024-01-06 20:04 ` ahesford
@ 2024-01-07 10:17 ` brodriguez-opennebula
  2024-01-07 10:25 ` brodriguez-opennebula
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: brodriguez-opennebula @ 2024-01-07 10:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]

There is an updated pull request by brodriguez-opennebula against master on the void-packages repository

https://github.com/brodriguez-opennebula/void-packages opennebula-context-voidlinux
https://github.com/void-linux/void-packages/pull/48089

New package: opennebula-context-voidlinux-0.0.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl

#### Comments

This is a clean up and custom rewrite of the [OpenNebula](https://opennebula.io/) [contextualization scripts](https://github.com/OpenNebula/addon-context-linux) that provide contextualization in a guest system for an image. In this case the original package is not being used because it was created with "main" distributions in mind (redhat-alike, debian-alike).

Contextualization in OpenNebula tries to keep it simple (it doesn't want to be cloud-init). Everytime the context of the VM is changed, an ISO is generated and loaded into the VM. A `udev` rule then restarts the service, which in its turn runs the scripts that reconfigure the system. 

OpenNebula tries to be distribution agnostic so most scripts are written in shell (I know it goes against the rules), but they provide added value. The package also provides the ruby-written `onegate` command that gathers information about different elements running in a virtual infrastructure.

Its dependencies would be:
- `jq` is used to parse some `iproute2` commands
- `curl` for reporting that the VM is ready
- `ruby` for onegate (script that gathers information from the virtualization system)
- `qemu-ga`, the qemu guest agent for the VM

Thank you

A patch file from https://github.com/void-linux/void-packages/pull/48089.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-opennebula-context-voidlinux-48089.patch --]
[-- Type: text/x-diff, Size: 3347 bytes --]

From 445ec40a82038a0744d42332e0774447176891cd Mon Sep 17 00:00:00 2001
From: Bruno Rodriguez <brodriguez@opennebula.io>
Date: Sat, 6 Jan 2024 11:04:59 +0100
Subject: [PATCH] New package: opennebula-context-voidlinux-0.0.2

---
 .../files/README.voidlinux                    | 35 +++++++++++++++++++
 srcpkgs/opennebula-context-voidlinux/template | 30 ++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
 create mode 100644 srcpkgs/opennebula-context-voidlinux/template

diff --git a/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
new file mode 100644
index 0000000000000..c6b58bde6e575
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
@@ -0,0 +1,35 @@
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+# OpenNebula contextualization package
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+This package provides the necessary scripts to configure automatically 
+the system via OpenNebula contextualization.
+
+To enable it in a clean installation:
+
+- Enable service `one-contextd`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Enable service `qemu-ga`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Execute onesysprep
+
+After this, use the image for a template.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+NETWORKING NOTES
+
+For other distributions OpenNebula does rely on it (i.e. networkd, 
+NetworkManager, etc.). 
+
+As Void linux gives you freedom to choose the way you want to 
+configure your network and OpenNebula likes to keep things simple, 
+this contextualization package will generate just the necessary 
+iproute2 commands to configure it. 
+
+This contextualized network config is stored in `/etc/network_config`
+and will be regenerated every time the context changes.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
diff --git a/srcpkgs/opennebula-context-voidlinux/template b/srcpkgs/opennebula-context-voidlinux/template
new file mode 100644
index 0000000000000..fdd69b73508d4
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/template
@@ -0,0 +1,30 @@
+# Template file for 'opennebula-context-voidlinux'
+pkgname=opennebula-context-voidlinux
+version=0.0.2
+revision=1
+build_style=gnu-makefile
+depends="curl jq qemu-ga ruby"
+short_desc="Contextualization scripts for opennebula"
+maintainer="brodriguez <brodriguez@opennebula.io>"
+license="Apache-2.0"
+homepage="https://github.com/brodriguez-opennebula/opennebula-context-voidlinux"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=d5f46e318fb1d01cf70d2868bf3528646021d4e6f12440955853a38a747b4314
+
+do_build() {
+	make install
+}
+
+do_install() {
+	vinstall /usr/bin/onesysprep 540 /usr/bin
+	vinstall /usr/bin/growpart 540 /usr/bin
+	vinstall /usr/bin/one-contextd 540 /usr/bin
+	vinstall /usr/bin/onegate.rb 540 /usr/bin
+	vinstall /usr/bin/onegate 540 /usr/bin
+
+	vmkdir /etc/one-context.d
+	vcopy /etc/one-context.d/* /etc/one-context.d
+	vinstall /usr/lib/udev/rules.d/65-context.rules 0444 usr/lib/udev/rules.d/
+	vinstall /etc/sv/one-contextd/run 0544 etc/sv/one-contextd
+	vinstall /etc/sv/one-contextd/log/run 0544 etc/sv/one-contextd/log
+}

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PR PATCH] [Updated] New package: opennebula-context-voidlinux-0.0.2
  2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
                   ` (2 preceding siblings ...)
  2024-01-07 10:17 ` [PR PATCH] [Updated] " brodriguez-opennebula
@ 2024-01-07 10:25 ` brodriguez-opennebula
  2024-01-07 10:27 ` brodriguez-opennebula
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: brodriguez-opennebula @ 2024-01-07 10:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]

There is an updated pull request by brodriguez-opennebula against master on the void-packages repository

https://github.com/brodriguez-opennebula/void-packages opennebula-context-voidlinux
https://github.com/void-linux/void-packages/pull/48089

New package: opennebula-context-voidlinux-0.0.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl

#### Comments

This is a clean up and custom rewrite of the [OpenNebula](https://opennebula.io/) [contextualization scripts](https://github.com/OpenNebula/addon-context-linux) that provide contextualization in a guest system for an image. In this case the original package is not being used because it was created with "main" distributions in mind (redhat-alike, debian-alike).

Contextualization in OpenNebula tries to keep it simple (it doesn't want to be cloud-init). Everytime the context of the VM is changed, an ISO is generated and loaded into the VM. A `udev` rule then restarts the service, which in its turn runs the scripts that reconfigure the system. 

OpenNebula tries to be distribution agnostic so most scripts are written in shell (I know it goes against the rules), but they provide added value. The package also provides the ruby-written `onegate` command that gathers information about different elements running in a virtual infrastructure.

Its dependencies would be:
- `jq` is used to parse some `iproute2` commands
- `curl` for reporting that the VM is ready
- `ruby` for onegate (script that gathers information from the virtualization system)
- `qemu-ga`, the qemu guest agent for the VM

Thank you

A patch file from https://github.com/void-linux/void-packages/pull/48089.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-opennebula-context-voidlinux-48089.patch --]
[-- Type: text/x-diff, Size: 3347 bytes --]

From 1ab983089ebabb2960ccbb99fc7d179b57279c3e Mon Sep 17 00:00:00 2001
From: Bruno Rodriguez <brodriguez@opennebula.io>
Date: Sat, 6 Jan 2024 11:04:59 +0100
Subject: [PATCH] New package: opennebula-context-voidlinux-0.0.2

---
 .../files/README.voidlinux                    | 35 +++++++++++++++++++
 srcpkgs/opennebula-context-voidlinux/template | 30 ++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
 create mode 100644 srcpkgs/opennebula-context-voidlinux/template

diff --git a/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
new file mode 100644
index 0000000000000..c6b58bde6e575
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
@@ -0,0 +1,35 @@
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+# OpenNebula contextualization package
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+This package provides the necessary scripts to configure automatically 
+the system via OpenNebula contextualization.
+
+To enable it in a clean installation:
+
+- Enable service `one-contextd`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Enable service `qemu-ga`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Execute onesysprep
+
+After this, use the image for a template.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+NETWORKING NOTES
+
+For other distributions OpenNebula does rely on it (i.e. networkd, 
+NetworkManager, etc.). 
+
+As Void linux gives you freedom to choose the way you want to 
+configure your network and OpenNebula likes to keep things simple, 
+this contextualization package will generate just the necessary 
+iproute2 commands to configure it. 
+
+This contextualized network config is stored in `/etc/network_config`
+and will be regenerated every time the context changes.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
diff --git a/srcpkgs/opennebula-context-voidlinux/template b/srcpkgs/opennebula-context-voidlinux/template
new file mode 100644
index 0000000000000..fdd69b73508d4
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/template
@@ -0,0 +1,30 @@
+# Template file for 'opennebula-context-voidlinux'
+pkgname=opennebula-context-voidlinux
+version=0.0.2
+revision=1
+build_style=gnu-makefile
+depends="curl jq qemu-ga ruby"
+short_desc="Contextualization scripts for opennebula"
+maintainer="brodriguez <brodriguez@opennebula.io>"
+license="Apache-2.0"
+homepage="https://github.com/brodriguez-opennebula/opennebula-context-voidlinux"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=d5f46e318fb1d01cf70d2868bf3528646021d4e6f12440955853a38a747b4314
+
+do_build() {
+	make install
+}
+
+do_install() {
+	vinstall /usr/bin/onesysprep 540 /usr/bin
+	vinstall /usr/bin/growpart 540 /usr/bin
+	vinstall /usr/bin/one-contextd 540 /usr/bin
+	vinstall /usr/bin/onegate.rb 540 /usr/bin
+	vinstall /usr/bin/onegate 540 /usr/bin
+
+	vmkdir /etc/one-context.d
+	vcopy /etc/one-context.d/* /etc/one-context.d
+	vinstall /usr/lib/udev/rules.d/65-context.rules 0444 usr/lib/udev/rules.d/
+	vinstall /etc/sv/one-contextd/run 0544 etc/sv/one-contextd
+	vinstall /etc/sv/one-contextd/log/run 0544 etc/sv/one-contextd/log
+}

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: New package: opennebula-context-voidlinux-0.0.2
  2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
                   ` (3 preceding siblings ...)
  2024-01-07 10:25 ` brodriguez-opennebula
@ 2024-01-07 10:27 ` brodriguez-opennebula
  2024-01-07 10:30 ` [PR PATCH] [Updated] " brodriguez-opennebula
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: brodriguez-opennebula @ 2024-01-07 10:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

New comment by brodriguez-opennebula on void-packages repository

https://github.com/void-linux/void-packages/pull/48089#issuecomment-1880018184

Comment:
Thank you very much. Modified, built and tested in the same conditions, changed revision.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PR PATCH] [Updated] New package: opennebula-context-voidlinux-0.0.2
  2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
                   ` (4 preceding siblings ...)
  2024-01-07 10:27 ` brodriguez-opennebula
@ 2024-01-07 10:30 ` brodriguez-opennebula
  2024-01-07 10:32 ` brodriguez-opennebula
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: brodriguez-opennebula @ 2024-01-07 10:30 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]

There is an updated pull request by brodriguez-opennebula against master on the void-packages repository

https://github.com/brodriguez-opennebula/void-packages opennebula-context-voidlinux
https://github.com/void-linux/void-packages/pull/48089

New package: opennebula-context-voidlinux-0.0.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl

#### Comments

This is a clean up and custom rewrite of the [OpenNebula](https://opennebula.io/) [contextualization scripts](https://github.com/OpenNebula/addon-context-linux) that provide contextualization in a guest system for an image. In this case the original package is not being used because it was created with "main" distributions in mind (redhat-alike, debian-alike).

Contextualization in OpenNebula tries to keep it simple (it doesn't want to be cloud-init). Everytime the context of the VM is changed, an ISO is generated and loaded into the VM. A `udev` rule then restarts the service, which in its turn runs the scripts that reconfigure the system. 

OpenNebula tries to be distribution agnostic so most scripts are written in shell (I know it goes against the rules), but they provide added value. The package also provides the ruby-written `onegate` command that gathers information about different elements running in a virtual infrastructure.

Its dependencies would be:
- `jq` is used to parse some `iproute2` commands
- `curl` for reporting that the VM is ready
- `ruby` for onegate (script that gathers information from the virtualization system)
- `qemu-ga`, the qemu guest agent for the VM

Thank you

A patch file from https://github.com/void-linux/void-packages/pull/48089.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-opennebula-context-voidlinux-48089.patch --]
[-- Type: text/x-diff, Size: 3347 bytes --]

From 897001f19ffc70349a4a8fa91723a207123e51c2 Mon Sep 17 00:00:00 2001
From: Bruno Rodriguez <brodriguez@opennebula.io>
Date: Sat, 6 Jan 2024 11:04:59 +0100
Subject: [PATCH] New package: opennebula-context-voidlinux-0.0.2

---
 .../files/README.voidlinux                    | 35 +++++++++++++++++++
 srcpkgs/opennebula-context-voidlinux/template | 30 ++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
 create mode 100644 srcpkgs/opennebula-context-voidlinux/template

diff --git a/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
new file mode 100644
index 0000000000000..c6b58bde6e575
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
@@ -0,0 +1,35 @@
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+# OpenNebula contextualization package
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+This package provides the necessary scripts to configure automatically 
+the system via OpenNebula contextualization.
+
+To enable it in a clean installation:
+
+- Enable service `one-contextd`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Enable service `qemu-ga`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Execute onesysprep
+
+After this, use the image for a template.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+NETWORKING NOTES
+
+For other distributions OpenNebula does rely on it (i.e. networkd, 
+NetworkManager, etc.). 
+
+As Void linux gives you freedom to choose the way you want to 
+configure your network and OpenNebula likes to keep things simple, 
+this contextualization package will generate just the necessary 
+iproute2 commands to configure it. 
+
+This contextualized network config is stored in `/etc/network_config`
+and will be regenerated every time the context changes.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
diff --git a/srcpkgs/opennebula-context-voidlinux/template b/srcpkgs/opennebula-context-voidlinux/template
new file mode 100644
index 0000000000000..fdd69b73508d4
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/template
@@ -0,0 +1,30 @@
+# Template file for 'opennebula-context-voidlinux'
+pkgname=opennebula-context-voidlinux
+version=0.0.2
+revision=1
+build_style=gnu-makefile
+depends="curl jq qemu-ga ruby"
+short_desc="Contextualization scripts for opennebula"
+maintainer="brodriguez <brodriguez@opennebula.io>"
+license="Apache-2.0"
+homepage="https://github.com/brodriguez-opennebula/opennebula-context-voidlinux"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=d5f46e318fb1d01cf70d2868bf3528646021d4e6f12440955853a38a747b4314
+
+do_build() {
+	make install
+}
+
+do_install() {
+	vinstall /usr/bin/onesysprep 540 /usr/bin
+	vinstall /usr/bin/growpart 540 /usr/bin
+	vinstall /usr/bin/one-contextd 540 /usr/bin
+	vinstall /usr/bin/onegate.rb 540 /usr/bin
+	vinstall /usr/bin/onegate 540 /usr/bin
+
+	vmkdir /etc/one-context.d
+	vcopy /etc/one-context.d/* /etc/one-context.d
+	vinstall /usr/lib/udev/rules.d/65-context.rules 0444 usr/lib/udev/rules.d/
+	vinstall /etc/sv/one-contextd/run 0544 etc/sv/one-contextd
+	vinstall /etc/sv/one-contextd/log/run 0544 etc/sv/one-contextd/log
+}

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PR PATCH] [Updated] New package: opennebula-context-voidlinux-0.0.2
  2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
                   ` (5 preceding siblings ...)
  2024-01-07 10:30 ` [PR PATCH] [Updated] " brodriguez-opennebula
@ 2024-01-07 10:32 ` brodriguez-opennebula
  2024-01-07 18:51 ` brodriguez-opennebula
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: brodriguez-opennebula @ 2024-01-07 10:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]

There is an updated pull request by brodriguez-opennebula against master on the void-packages repository

https://github.com/brodriguez-opennebula/void-packages opennebula-context-voidlinux
https://github.com/void-linux/void-packages/pull/48089

New package: opennebula-context-voidlinux-0.0.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl

#### Comments

This is a clean up and custom rewrite of the [OpenNebula](https://opennebula.io/) [contextualization scripts](https://github.com/OpenNebula/addon-context-linux) that provide contextualization in a guest system for an image. In this case the original package is not being used because it was created with "main" distributions in mind (redhat-alike, debian-alike).

Contextualization in OpenNebula tries to keep it simple (it doesn't want to be cloud-init). Everytime the context of the VM is changed, an ISO is generated and loaded into the VM. A `udev` rule then restarts the service, which in its turn runs the scripts that reconfigure the system. 

OpenNebula tries to be distribution agnostic so most scripts are written in shell (I know it goes against the rules), but they provide added value. The package also provides the ruby-written `onegate` command that gathers information about different elements running in a virtual infrastructure.

Its dependencies would be:
- `jq` is used to parse some `iproute2` commands
- `curl` for reporting that the VM is ready
- `ruby` for onegate (script that gathers information from the virtualization system)
- `qemu-ga`, the qemu guest agent for the VM

Thank you

A patch file from https://github.com/void-linux/void-packages/pull/48089.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-opennebula-context-voidlinux-48089.patch --]
[-- Type: text/x-diff, Size: 3466 bytes --]

From c831191bca7e666948f789089208fd3294ae1f51 Mon Sep 17 00:00:00 2001
From: Bruno Rodriguez <brodriguez@opennebula.io>
Date: Sat, 6 Jan 2024 11:04:59 +0100
Subject: [PATCH] New package: opennebula-context-voidlinux-0.0.2

---
 .../files/README.voidlinux                    | 35 +++++++++++++++++++
 srcpkgs/opennebula-context-voidlinux/template | 34 ++++++++++++++++++
 2 files changed, 69 insertions(+)
 create mode 100644 srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
 create mode 100644 srcpkgs/opennebula-context-voidlinux/template

diff --git a/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
new file mode 100644
index 0000000000000..c6b58bde6e575
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
@@ -0,0 +1,35 @@
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+# OpenNebula contextualization package
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+This package provides the necessary scripts to configure automatically 
+the system via OpenNebula contextualization.
+
+To enable it in a clean installation:
+
+- Enable service `one-contextd`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Enable service `qemu-ga`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Execute onesysprep
+
+After this, use the image for a template.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+NETWORKING NOTES
+
+For other distributions OpenNebula does rely on it (i.e. networkd, 
+NetworkManager, etc.). 
+
+As Void linux gives you freedom to choose the way you want to 
+configure your network and OpenNebula likes to keep things simple, 
+this contextualization package will generate just the necessary 
+iproute2 commands to configure it. 
+
+This contextualized network config is stored in `/etc/network_config`
+and will be regenerated every time the context changes.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
diff --git a/srcpkgs/opennebula-context-voidlinux/template b/srcpkgs/opennebula-context-voidlinux/template
new file mode 100644
index 0000000000000..b29d239acfd55
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/template
@@ -0,0 +1,34 @@
+# Template file for 'opennebula-context-voidlinux'
+pkgname=opennebula-context-voidlinux
+version=0.0.2
+revision=2
+build_style=gnu-makefile
+depends="curl jq qemu-ga ruby"
+short_desc="Contextualization scripts for opennebula"
+maintainer="brodriguez <brodriguez@opennebula.io>"
+license="Apache-2.0"
+homepage="https://github.com/brodriguez-opennebula/opennebula-context-voidlinux"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=d5f46e318fb1d01cf70d2868bf3528646021d4e6f12440955853a38a747b4314
+
+do_build() {
+	make install
+}
+
+do_install() {
+	vinstall /usr/bin/onesysprep 540 /usr/bin
+	vinstall /usr/bin/growpart 540 /usr/bin
+	vinstall /usr/bin/one-contextd 540 /usr/bin
+	vinstall /usr/bin/onegate.rb 540 /usr/bin
+	vinstall /usr/bin/onegate 540 /usr/bin
+
+	vmkdir /etc/one-context.d
+	vcopy /etc/one-context.d/* /etc/one-context.d
+	vinstall /usr/lib/udev/rules.d/65-context.rules 0444 usr/lib/udev/rules.d/
+	vinstall /etc/sv/one-contextd/run 0544 etc/sv/one-contextd
+	vinstall /etc/sv/one-contextd/log/run 0544 etc/sv/one-contextd/log
+
+	vmkdir usr/share/doc/${pkgname}
+	vcopy ${FILESDIR}/README.voidlinux usr/share/doc/${pkgname}/README.voidlinux
+
+}

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PR PATCH] [Updated] New package: opennebula-context-voidlinux-0.0.2
  2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
                   ` (6 preceding siblings ...)
  2024-01-07 10:32 ` brodriguez-opennebula
@ 2024-01-07 18:51 ` brodriguez-opennebula
  2024-01-09 10:57 ` brodriguez-opennebula
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: brodriguez-opennebula @ 2024-01-07 18:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]

There is an updated pull request by brodriguez-opennebula against master on the void-packages repository

https://github.com/brodriguez-opennebula/void-packages opennebula-context-voidlinux
https://github.com/void-linux/void-packages/pull/48089

New package: opennebula-context-voidlinux-0.0.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl

#### Comments

This is a clean up and custom rewrite of the [OpenNebula](https://opennebula.io/) [contextualization scripts](https://github.com/OpenNebula/addon-context-linux) that provide contextualization in a guest system for an image. In this case the original package is not being used because it was created with "main" distributions in mind (redhat-alike, debian-alike).

Contextualization in OpenNebula tries to keep it simple (it doesn't want to be cloud-init). Everytime the context of the VM is changed, an ISO is generated and loaded into the VM. A `udev` rule then restarts the service, which in its turn runs the scripts that reconfigure the system. 

OpenNebula tries to be distribution agnostic so most scripts are written in shell (I know it goes against the rules), but they provide added value. The package also provides the ruby-written `onegate` command that gathers information about different elements running in a virtual infrastructure.

Its dependencies would be:
- `jq` is used to parse some `iproute2` commands
- `curl` for reporting that the VM is ready
- `ruby` for onegate (script that gathers information from the virtualization system)
- `qemu-ga`, the qemu guest agent for the VM

Thank you

A patch file from https://github.com/void-linux/void-packages/pull/48089.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-opennebula-context-voidlinux-48089.patch --]
[-- Type: text/x-diff, Size: 3466 bytes --]

From 0729a6715f4fc0394bc84976de83c700bec7eaf7 Mon Sep 17 00:00:00 2001
From: Bruno Rodriguez <brodriguez@opennebula.io>
Date: Sat, 6 Jan 2024 11:04:59 +0100
Subject: [PATCH] New package: opennebula-context-voidlinux-0.0.2

---
 .../files/README.voidlinux                    | 35 +++++++++++++++++++
 srcpkgs/opennebula-context-voidlinux/template | 34 ++++++++++++++++++
 2 files changed, 69 insertions(+)
 create mode 100644 srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
 create mode 100644 srcpkgs/opennebula-context-voidlinux/template

diff --git a/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
new file mode 100644
index 0000000000000..c6b58bde6e575
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
@@ -0,0 +1,35 @@
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+# OpenNebula contextualization package
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+This package provides the necessary scripts to configure automatically 
+the system via OpenNebula contextualization.
+
+To enable it in a clean installation:
+
+- Enable service `one-contextd`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Enable service `qemu-ga`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Execute onesysprep
+
+After this, use the image for a template.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+NETWORKING NOTES
+
+For other distributions OpenNebula does rely on it (i.e. networkd, 
+NetworkManager, etc.). 
+
+As Void linux gives you freedom to choose the way you want to 
+configure your network and OpenNebula likes to keep things simple, 
+this contextualization package will generate just the necessary 
+iproute2 commands to configure it. 
+
+This contextualized network config is stored in `/etc/network_config`
+and will be regenerated every time the context changes.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
diff --git a/srcpkgs/opennebula-context-voidlinux/template b/srcpkgs/opennebula-context-voidlinux/template
new file mode 100644
index 0000000000000..b29d239acfd55
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/template
@@ -0,0 +1,34 @@
+# Template file for 'opennebula-context-voidlinux'
+pkgname=opennebula-context-voidlinux
+version=0.0.2
+revision=2
+build_style=gnu-makefile
+depends="curl jq qemu-ga ruby"
+short_desc="Contextualization scripts for opennebula"
+maintainer="brodriguez <brodriguez@opennebula.io>"
+license="Apache-2.0"
+homepage="https://github.com/brodriguez-opennebula/opennebula-context-voidlinux"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=d5f46e318fb1d01cf70d2868bf3528646021d4e6f12440955853a38a747b4314
+
+do_build() {
+	make install
+}
+
+do_install() {
+	vinstall /usr/bin/onesysprep 540 /usr/bin
+	vinstall /usr/bin/growpart 540 /usr/bin
+	vinstall /usr/bin/one-contextd 540 /usr/bin
+	vinstall /usr/bin/onegate.rb 540 /usr/bin
+	vinstall /usr/bin/onegate 540 /usr/bin
+
+	vmkdir /etc/one-context.d
+	vcopy /etc/one-context.d/* /etc/one-context.d
+	vinstall /usr/lib/udev/rules.d/65-context.rules 0444 usr/lib/udev/rules.d/
+	vinstall /etc/sv/one-contextd/run 0544 etc/sv/one-contextd
+	vinstall /etc/sv/one-contextd/log/run 0544 etc/sv/one-contextd/log
+
+	vmkdir usr/share/doc/${pkgname}
+	vcopy ${FILESDIR}/README.voidlinux usr/share/doc/${pkgname}/README.voidlinux
+
+}

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PR PATCH] [Updated] New package: opennebula-context-voidlinux-0.0.2
  2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
                   ` (7 preceding siblings ...)
  2024-01-07 18:51 ` brodriguez-opennebula
@ 2024-01-09 10:57 ` brodriguez-opennebula
  2024-04-09  1:45 ` github-actions
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: brodriguez-opennebula @ 2024-01-09 10:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]

There is an updated pull request by brodriguez-opennebula against master on the void-packages repository

https://github.com/brodriguez-opennebula/void-packages opennebula-context-voidlinux
https://github.com/void-linux/void-packages/pull/48089

New package: opennebula-context-voidlinux-0.0.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl

#### Comments

This is a clean up and custom rewrite of the [OpenNebula](https://opennebula.io/) [contextualization scripts](https://github.com/OpenNebula/addon-context-linux) that provide contextualization in a guest system for an image. In this case the original package is not being used because it was created with "main" distributions in mind (redhat-alike, debian-alike).

Contextualization in OpenNebula tries to keep it simple (it doesn't want to be cloud-init). Everytime the context of the VM is changed, an ISO is generated and loaded into the VM. A `udev` rule then restarts the service, which in its turn runs the scripts that reconfigure the system. 

OpenNebula tries to be distribution agnostic so most scripts are written in shell (I know it goes against the rules), but they provide added value. The package also provides the ruby-written `onegate` command that gathers information about different elements running in a virtual infrastructure.

Its dependencies would be:
- `jq` is used to parse some `iproute2` commands
- `curl` for reporting that the VM is ready
- `ruby` for onegate (script that gathers information from the virtualization system)
- `qemu-ga`, the qemu guest agent for the VM

Thank you

A patch file from https://github.com/void-linux/void-packages/pull/48089.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-opennebula-context-voidlinux-48089.patch --]
[-- Type: text/x-diff, Size: 3466 bytes --]

From e023b5b5effac96e0180c23dec3fd3b31f68ad5e Mon Sep 17 00:00:00 2001
From: Bruno Rodriguez <brodriguez@opennebula.io>
Date: Sat, 6 Jan 2024 11:04:59 +0100
Subject: [PATCH] New package: opennebula-context-voidlinux-0.0.2

---
 .../files/README.voidlinux                    | 35 +++++++++++++++++++
 srcpkgs/opennebula-context-voidlinux/template | 34 ++++++++++++++++++
 2 files changed, 69 insertions(+)
 create mode 100644 srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
 create mode 100644 srcpkgs/opennebula-context-voidlinux/template

diff --git a/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
new file mode 100644
index 0000000000000..c6b58bde6e575
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
@@ -0,0 +1,35 @@
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+# OpenNebula contextualization package
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+This package provides the necessary scripts to configure automatically 
+the system via OpenNebula contextualization.
+
+To enable it in a clean installation:
+
+- Enable service `one-contextd`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Enable service `qemu-ga`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Execute onesysprep
+
+After this, use the image for a template.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+NETWORKING NOTES
+
+For other distributions OpenNebula does rely on it (i.e. networkd, 
+NetworkManager, etc.). 
+
+As Void linux gives you freedom to choose the way you want to 
+configure your network and OpenNebula likes to keep things simple, 
+this contextualization package will generate just the necessary 
+iproute2 commands to configure it. 
+
+This contextualized network config is stored in `/etc/network_config`
+and will be regenerated every time the context changes.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
diff --git a/srcpkgs/opennebula-context-voidlinux/template b/srcpkgs/opennebula-context-voidlinux/template
new file mode 100644
index 0000000000000..010fdcd8a67dc
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/template
@@ -0,0 +1,34 @@
+# Template file for 'opennebula-context-voidlinux'
+pkgname=opennebula-context-voidlinux
+version=0.0.2
+revision=1
+build_style=gnu-makefile
+depends="curl jq qemu-ga ruby"
+short_desc="Contextualization scripts for opennebula"
+maintainer="brodriguez <brodriguez@opennebula.io>"
+license="Apache-2.0"
+homepage="https://github.com/brodriguez-opennebula/opennebula-context-voidlinux"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=d5f46e318fb1d01cf70d2868bf3528646021d4e6f12440955853a38a747b4314
+
+do_build() {
+	make install
+}
+
+do_install() {
+	vinstall /usr/bin/onesysprep 540 /usr/bin
+	vinstall /usr/bin/growpart 540 /usr/bin
+	vinstall /usr/bin/one-contextd 540 /usr/bin
+	vinstall /usr/bin/onegate.rb 540 /usr/bin
+	vinstall /usr/bin/onegate 540 /usr/bin
+
+	vmkdir /etc/one-context.d
+	vcopy /etc/one-context.d/* /etc/one-context.d
+	vinstall /usr/lib/udev/rules.d/65-context.rules 0444 usr/lib/udev/rules.d/
+	vinstall /etc/sv/one-contextd/run 0544 etc/sv/one-contextd
+	vinstall /etc/sv/one-contextd/log/run 0544 etc/sv/one-contextd/log
+
+	vmkdir usr/share/doc/${pkgname}
+	vcopy ${FILESDIR}/README.voidlinux usr/share/doc/${pkgname}/README.voidlinux
+
+}

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: New package: opennebula-context-voidlinux-0.0.2
  2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
                   ` (8 preceding siblings ...)
  2024-01-09 10:57 ` brodriguez-opennebula
@ 2024-04-09  1:45 ` github-actions
  2024-04-09  8:13 ` brodriguez-opennebula
  2024-04-09 13:31 ` [PR PATCH] [Updated] " brodriguez-opennebula
  11 siblings, 0 replies; 13+ messages in thread
From: github-actions @ 2024-04-09  1:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/48089#issuecomment-2043994824

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: New package: opennebula-context-voidlinux-0.0.2
  2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
                   ` (9 preceding siblings ...)
  2024-04-09  1:45 ` github-actions
@ 2024-04-09  8:13 ` brodriguez-opennebula
  2024-04-09 13:31 ` [PR PATCH] [Updated] " brodriguez-opennebula
  11 siblings, 0 replies; 13+ messages in thread
From: brodriguez-opennebula @ 2024-04-09  8:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

New comment by brodriguez-opennebula on void-packages repository

https://github.com/void-linux/void-packages/pull/48089#issuecomment-2044407422

Comment:
I would like to bump it. Currently I'm working to make a PR to add this context scripts to the official OpenNebula context package 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PR PATCH] [Updated] New package: opennebula-context-voidlinux-0.0.2
  2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
                   ` (10 preceding siblings ...)
  2024-04-09  8:13 ` brodriguez-opennebula
@ 2024-04-09 13:31 ` brodriguez-opennebula
  11 siblings, 0 replies; 13+ messages in thread
From: brodriguez-opennebula @ 2024-04-09 13:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]

There is an updated pull request by brodriguez-opennebula against master on the void-packages repository

https://github.com/brodriguez-opennebula/void-packages opennebula-context-voidlinux
https://github.com/void-linux/void-packages/pull/48089

New package: opennebula-context-voidlinux-0.0.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl

#### Comments

This is a clean up and custom rewrite of the [OpenNebula](https://opennebula.io/) [contextualization scripts](https://github.com/OpenNebula/addon-context-linux) that provide contextualization in a guest system for an image. In this case the original package is not being used because it was created with "main" distributions in mind (redhat-alike, debian-alike).

Contextualization in OpenNebula tries to keep it simple (it doesn't want to be cloud-init). Everytime the context of the VM is changed, an ISO is generated and loaded into the VM. A `udev` rule then restarts the service, which in its turn runs the scripts that reconfigure the system. 

OpenNebula tries to be distribution agnostic so most scripts are written in shell (I know it goes against the rules), but they provide added value. The package also provides the ruby-written `onegate` command that gathers information about different elements running in a virtual infrastructure.

Its dependencies would be:
- `jq` is used to parse some `iproute2` commands
- `curl` for reporting that the VM is ready
- `ruby` for onegate (script that gathers information from the virtualization system)
- `qemu-ga`, the qemu guest agent for the VM

Thank you

A patch file from https://github.com/void-linux/void-packages/pull/48089.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-opennebula-context-voidlinux-48089.patch --]
[-- Type: text/x-diff, Size: 3470 bytes --]

From e023b5b5effac96e0180c23dec3fd3b31f68ad5e Mon Sep 17 00:00:00 2001
From: Bruno Rodriguez <brodriguez@opennebula.io>
Date: Sat, 6 Jan 2024 11:04:59 +0100
Subject: [PATCH] New package: opennebula-context-voidlinux-0.0.2

---
 .../files/README.voidlinux                    | 35 +++++++++++++++++++
 srcpkgs/opennebula-context-voidlinux/template | 34 ++++++++++++++++++
 2 files changed, 69 insertions(+)
 create mode 100644 srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
 create mode 100644 srcpkgs/opennebula-context-voidlinux/template

diff --git a/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
new file mode 100644
index 00000000000000..c6b58bde6e575a
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
@@ -0,0 +1,35 @@
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+# OpenNebula contextualization package
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+This package provides the necessary scripts to configure automatically 
+the system via OpenNebula contextualization.
+
+To enable it in a clean installation:
+
+- Enable service `one-contextd`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Enable service `qemu-ga`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Execute onesysprep
+
+After this, use the image for a template.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+NETWORKING NOTES
+
+For other distributions OpenNebula does rely on it (i.e. networkd, 
+NetworkManager, etc.). 
+
+As Void linux gives you freedom to choose the way you want to 
+configure your network and OpenNebula likes to keep things simple, 
+this contextualization package will generate just the necessary 
+iproute2 commands to configure it. 
+
+This contextualized network config is stored in `/etc/network_config`
+and will be regenerated every time the context changes.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
diff --git a/srcpkgs/opennebula-context-voidlinux/template b/srcpkgs/opennebula-context-voidlinux/template
new file mode 100644
index 00000000000000..010fdcd8a67dcf
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/template
@@ -0,0 +1,34 @@
+# Template file for 'opennebula-context-voidlinux'
+pkgname=opennebula-context-voidlinux
+version=0.0.2
+revision=1
+build_style=gnu-makefile
+depends="curl jq qemu-ga ruby"
+short_desc="Contextualization scripts for opennebula"
+maintainer="brodriguez <brodriguez@opennebula.io>"
+license="Apache-2.0"
+homepage="https://github.com/brodriguez-opennebula/opennebula-context-voidlinux"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=d5f46e318fb1d01cf70d2868bf3528646021d4e6f12440955853a38a747b4314
+
+do_build() {
+	make install
+}
+
+do_install() {
+	vinstall /usr/bin/onesysprep 540 /usr/bin
+	vinstall /usr/bin/growpart 540 /usr/bin
+	vinstall /usr/bin/one-contextd 540 /usr/bin
+	vinstall /usr/bin/onegate.rb 540 /usr/bin
+	vinstall /usr/bin/onegate 540 /usr/bin
+
+	vmkdir /etc/one-context.d
+	vcopy /etc/one-context.d/* /etc/one-context.d
+	vinstall /usr/lib/udev/rules.d/65-context.rules 0444 usr/lib/udev/rules.d/
+	vinstall /etc/sv/one-contextd/run 0544 etc/sv/one-contextd
+	vinstall /etc/sv/one-contextd/log/run 0544 etc/sv/one-contextd/log
+
+	vmkdir usr/share/doc/${pkgname}
+	vcopy ${FILESDIR}/README.voidlinux usr/share/doc/${pkgname}/README.voidlinux
+
+}

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-04-09 13:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
2024-01-06 11:34 ` [PR PATCH] [Updated] " brodriguez-opennebula
2024-01-06 20:04 ` ahesford
2024-01-07 10:17 ` [PR PATCH] [Updated] " brodriguez-opennebula
2024-01-07 10:25 ` brodriguez-opennebula
2024-01-07 10:27 ` brodriguez-opennebula
2024-01-07 10:30 ` [PR PATCH] [Updated] " brodriguez-opennebula
2024-01-07 10:32 ` brodriguez-opennebula
2024-01-07 18:51 ` brodriguez-opennebula
2024-01-09 10:57 ` brodriguez-opennebula
2024-04-09  1:45 ` github-actions
2024-04-09  8:13 ` brodriguez-opennebula
2024-04-09 13:31 ` [PR PATCH] [Updated] " brodriguez-opennebula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).