Skip to content

Commit

Permalink
Merge pull request #3151 from reubenmiller/fix-packaging-mosquitto-de…
Browse files Browse the repository at this point in the history
…pendency

fix: add mosquitto as a weak dependency to tedge
  • Loading branch information
reubenmiller authored Oct 4, 2024
2 parents dd72d04 + 73aeac6 commit 77dfda5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
11 changes: 8 additions & 3 deletions configuration/package_manifests/nfpm.tedge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,19 @@ overrides:
# * shadow-utils (fedora)
# * shadow (opensuse)

# Note: Only keep a weak reference to the mosquitto package, so don't install it by default.
# mosquitto can be installed automatically when installing the tedge-full virtual package
# This way, it allows the tedge-agent package to be installed directly on child devices
# without automatically pulling in mosquitto

apk:
scripts:
preinstall: configuration/package_scripts/_generated/tedge/apk/preinst
postinstall: configuration/package_scripts/_generated/tedge/apk/postinst
preremove: configuration/package_scripts/_generated/tedge/apk/prerm
postremove: configuration/package_scripts/_generated/tedge/apk/postrm

depends:
suggests:
- mosquitto

rpm:
Expand All @@ -51,7 +56,7 @@ overrides:
postinstall: configuration/package_scripts/_generated/tedge/rpm/postinst
preremove: configuration/package_scripts/_generated/tedge/rpm/prerm
postremove: configuration/package_scripts/_generated/tedge/rpm/postrm
depends:
suggests:
- mosquitto

deb:
Expand All @@ -60,7 +65,7 @@ overrides:
postinstall: configuration/package_scripts/_generated/tedge/deb/postinst
preremove: configuration/package_scripts/_generated/tedge/deb/prerm
postremove: configuration/package_scripts/_generated/tedge/deb/postrm
depends:
suggests:
- mosquitto

deb:
Expand Down
3 changes: 3 additions & 0 deletions configuration/package_manifests/virtual/nfpm.tedge-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ overrides:
# slightly different formats
apk:
depends:
- mosquitto
- tedge = ${APK_VERSION}
- tedge-mapper = ${APK_VERSION}
- tedge-agent = ${APK_VERSION}
Expand All @@ -38,6 +39,7 @@ overrides:
depends:
# FIXME: Work out a better way to reference the full package specific version which includes the release number (-1) suffix
# without having to manually add it
- mosquitto
- ca-certificates
- tedge = ${RPM_VERSION}-1
- tedge-mapper = ${RPM_VERSION}-1
Expand All @@ -49,6 +51,7 @@ overrides:
- c8y-firmware-plugin = ${RPM_VERSION}-1
deb:
depends:
- mosquitto
- tedge (= ${DEB_VERSION})
- tedge-mapper (= ${DEB_VERSION})
- tedge-agent (= ${DEB_VERSION})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,19 @@ overrides:
# slightly different formats
apk:
depends:
- mosquitto
- tedge = ${APK_VERSION}
- tedge-mapper = ${APK_VERSION}
rpm:
depends:
# FIXME: Work out a better way to reference the full package specific version which includes the release number (-1) suffix
# without having to manually add it
- mosquitto
- tedge = ${RPM_VERSION}-1
- tedge-mapper = ${RPM_VERSION}-1
deb:
depends:
- mosquitto
- tedge (= ${DEB_VERSION})
- tedge-mapper (= ${DEB_VERSION})

Expand Down

0 comments on commit 77dfda5

Please sign in to comment.