Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strongswan: Add dependency to virtual package strongswan-mod-socket #16263

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Thermi
Copy link
Contributor

@Thermi Thermi commented Aug 1, 2021

Required to model the dependency of the charon daemon onto one of the two socket abstractions
Otherwise none will be installed and the daemon is not usable

Closes #16261

Signed-off-by: Noel Kuntze noel.kuntze@thermi.consulting

Maintainer: me / @pprindeville
Compile tested: x86_64, trunk
Run tested: Not yet

Description:

Copy link
Member

@dangowrt dangowrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't add the -virt suffix, we don't do that anywhere for PROVIDES and it will confuse people. Rather just let both of them provide strongswan-mod-socket and then depend on that.

@Thermi Thermi requested a review from dangowrt August 1, 2021 20:58
@Thermi Thermi changed the title strongswan: Add dependency to virtual package strongswan-mod-socket-virt strongswan: Add dependency to virtual package strongswan-mod-socket Aug 1, 2021
Copy link
Member

@dangowrt dangowrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch itself looks good. Please change the commit description to no longer mention -virt suffix.

@Thermi Thermi force-pushed the strongswan-mod-socket-dep branch 2 times, most recently from 355976b to 4c79aed Compare August 3, 2021 18:54
@Thermi Thermi requested a review from dangowrt August 3, 2021 19:01
@dangowrt dangowrt added the dependencies Pull requests that update a dependency file label Aug 3, 2021
Copy link
Member

@pprindeville pprindeville left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of questions...

$$(call Package/strongswan/Default)
TITLE:= StrongSwan $(2) plugin
DEPENDS:= strongswan $(3)
PROVIDES:= strongswan-mod-socket
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the big difference? This line here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

PROVIDES:= strongswan-mod-socket
endef

define Package/strongswan-mod-$(1)/install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't chain to the one below? These look identical...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How? The defines have defined ends, declared by endef.
If I were to chain it by starting the define for the BuildPluginModSocketVirt just before the one for BuildPlugin without terminating it beforehand (instead, afterwards), any call to BuildPlugin would declare a version of BuildPlugin where $(1), $(2), and $(3) are filled in with the particular values of BuildPluginModSocketVirt.

That's not good. It'd at best throw an error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we unnested, and had them both BuildPlugin*'s invoke the common version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that, but it's one more level of nesting and I couldn't make it work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jow- @nbd168 @dangowrt Can you guys help out with this problem? Shed any insight?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged both PR's as #16367

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I did that, make complained all the other calls to the function didn't have a fourth argument.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can solve that without adding the fourth argument to all calls, by adding a wrapper function. Rename BuildPlugin to BuildPluginProvides, and add:

define BuildPlugin
  $(call BuildPluginProvides,$1,$2,$3,)
endef

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See PR #16367.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any consensus?

I don't like the macro name BuildPluginModSocketVirt because it's more specific than the real essence of the macro...

stintel added a commit to stintel/openwrt-packages that referenced this pull request Aug 15, 2021
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
stintel added a commit to stintel/openwrt-packages that referenced this pull request Aug 15, 2021
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
pprindeville pushed a commit to pprindeville/packages that referenced this pull request Aug 15, 2021
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
pprindeville pushed a commit to pprindeville/packages that referenced this pull request Aug 15, 2021
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
stintel added a commit to stintel/openwrt-packages that referenced this pull request Aug 15, 2021
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
stintel added a commit to stintel/openwrt-packages that referenced this pull request Aug 15, 2021
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
stintel added a commit to stintel/openwrt-packages that referenced this pull request Aug 15, 2021
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
stintel added a commit to stintel/openwrt-packages that referenced this pull request Aug 16, 2021
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
stintel added a commit to stintel/openwrt-packages that referenced this pull request Aug 16, 2021
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
stintel added a commit to stintel/openwrt-packages that referenced this pull request Aug 18, 2021
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
stintel added a commit to stintel/openwrt-packages that referenced this pull request Aug 18, 2021
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
stintel added a commit to stintel/openwrt-packages that referenced this pull request Aug 18, 2021
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
stintel added a commit to stintel/openwrt-packages that referenced this pull request Aug 20, 2021
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
@neheb
Copy link
Contributor

neheb commented Nov 12, 2021

Needs a rebase.

pprindeville pushed a commit to pprindeville/packages that referenced this pull request Feb 3, 2022
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
pprindeville pushed a commit to pprindeville/packages that referenced this pull request Feb 4, 2022
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
pprindeville pushed a commit to pprindeville/packages that referenced this pull request Feb 4, 2022
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
@Thermi
Copy link
Contributor Author

Thermi commented Feb 7, 2022

Builds for me.

@pprindeville
Copy link
Member

Needs a rebase.

@Thermi Thermi force-pushed the strongswan-mod-socket-dep branch from 4c79aed to cab3024 Compare May 15, 2022 21:52
@Thermi
Copy link
Contributor Author

Thermi commented May 17, 2022

Builds and constructs the right dependencies here. strongswan-full and -minimal (metapackages) depend on socket-default, but strongswan-charon depends on strongswan-mod-socket, which is a virtual package provided by -socket-default and -socket-dynamic. So if somebody wants to uninstall -socket-default but has socket-default and -socket-dynamic, dependencies of strongswan-full and -minimal will not be satisfied anymore. If the user uninstalls them then the only dependencies on strongswan packges that are from an explicitly installed packages are from -mod-socket-dynamic which requires strongswan and libc. strongswan only packages libstrongswan. So in total if somebody switches to -socket-dynamic, removes -socket-default, and removes all unrequired packages, they will have an incomplete and unusable installation of strongwan. We could fix that by making -full and -minimal depend on -mod-socket. So it's a dependency on the virtual package.

@pprindeville thoughts?

@Thermi
Copy link
Contributor Author

Thermi commented May 23, 2022

All the other expressions in the file have exactly one plus. Do you know better in that regard? It still throws syntax errors when building.

Required to model the dependency of the charon daemon onto one of the two socket abstractions
Otherwise none will be installed and the daemon is not usable

Closes openwrt#16261

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Closes openwrt#16261

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Closes openwrt#16261

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
stokito pushed a commit to stokito/packages that referenced this pull request Dec 6, 2022
This a virtual package that is satisfied by either
strongswan-mod-socket-default or strongswan-mod-socket-dynamic, and is
required by the charon daemon. When neither of these packages is
installed, charon will not function.

Closes openwrt#16261, openwrt#16263 and openwrt#16367.

Signed-off-by: Noel Kuntze <noel.kuntze@thermi.consulting>
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
@pprindeville
Copy link
Member

Is this still open?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

strongswan: missing deps
5 participants