diff --git a/comps/comps-foreman-client-el8.xml b/comps/comps-foreman-client-el8.xml
index 17b0b6e961..298e07803e 100644
--- a/comps/comps-foreman-client-el8.xml
+++ b/comps/comps-foreman-client-el8.xml
@@ -11,6 +11,7 @@
true
foreman-client-release
+ foreman_ygg_migration
foreman_ygg_worker
katello-host-tools
katello-host-tools-tracer
diff --git a/comps/comps-foreman-client-el9.xml b/comps/comps-foreman-client-el9.xml
index 17b0b6e961..298e07803e 100644
--- a/comps/comps-foreman-client-el9.xml
+++ b/comps/comps-foreman-client-el9.xml
@@ -11,6 +11,7 @@
true
foreman-client-release
+ foreman_ygg_migration
foreman_ygg_worker
katello-host-tools
katello-host-tools-tracer
diff --git a/package_manifest.yaml b/package_manifest.yaml
index 7600dcdc52..db6d2c10a8 100644
--- a/package_manifest.yaml
+++ b/package_manifest.yaml
@@ -532,6 +532,7 @@ foreman_client_packages:
children:
yggdrasil_client_packages: {}
hosts:
+ foreman_ygg_migration: {}
foreman_ygg_worker: {}
katello-host-tools: {}
katello-pull-transport-migrate: {}
diff --git a/packages/client/foreman_ygg_migration/foreman_ygg_migration.spec b/packages/client/foreman_ygg_migration/foreman_ygg_migration.spec
new file mode 100644
index 0000000000..db06d60fff
--- /dev/null
+++ b/packages/client/foreman_ygg_migration/foreman_ygg_migration.spec
@@ -0,0 +1,35 @@
+Name: foreman_ygg_migration
+Version: 0.0.1
+Summary: A helper package to ease transition from yggdrasil 0.2.z to 0.4.z
+Release: 1%{?dist}
+License: MIT
+
+%if 0%{?rhel} >= 8
+Supplements: yggdrasil >= 0.4.0
+%endif
+Conflicts: yggdrasil < 0.4.0
+
+%description
+A helper package to ease transition from yggdrasil 0.2.z to 0.4.z
+
+%post
+if systemctl is-enabled yggdrasild >/dev/null 2>/dev/null; then
+ grep -Pq '^server' /etc/yggdrasil/config.toml || sed -i 's/broker.*=/server =/' /etc/yggdrasil/config.toml
+ grep -Pq '^path-prefix' /etc/yggdrasil/config.toml || echo 'path-prefix = "yggdrasil"' >>/etc/yggdrasil/config.toml
+ grep -Pq '^data-host' /etc/yggdrasil/config.toml || echo 'data-host = ""' >>/etc/yggdrasil/config.toml
+
+ if grep -q FOREMAN_YGG_WORKER_WORKDIR /etc/systemd/system/yggdrasild.service.d/* 2>/dev/null; then
+ mkdir -p /etc/systemd/system/com.redhat.Yggdrasil1.Worker1.foreman.service.d/
+ cp -r /etc/systemd/system/yggdrasild.service.d/* /etc/systemd/system/com.redhat.Yggdrasil1.Worker1.foreman.service.d/
+ systemctl daemon-reload
+ fi
+
+ systemctl disable --now yggdrasild
+ systemctl enable --now yggdrasil
+fi
+
+%files
+
+%changelog
+* Thu Oct 03 2024 Adam Ruzicka - 0.0.1-1
+- Initial packaging