-
Notifications
You must be signed in to change notification settings - Fork 18
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
idea: {{deps.foo.bar.prefix.relative}} #116
Comments
|
the problem with the above is relative to what? I think we can assume relative the working-directory but that can change and the moustaches are static in how our mind model of them works. sorta. Possibly this should be a tool we provide instead that can figure out relative paths |
relative to Basically, # path for gvproxy to add to platform config
GVISOR_MAJOR: |-
$(cd "{{deps.github.com/containers/gvisor-tap-vsock.prefix}}/../\
/v{{deps.github.com/containers/gvisor-tap-vsock.version.major}}" \
&& pwd | sed -e "s_$TEA_PREFIX/__") Even a moustache like |
k I think always relative to |
I can't see a way this gets simpler since you need the major version of the dep. I can see utility for here I think the cleanest current way to do this is: script:
- run: |
sed -i.bak -f $PROP config_{darwin,linux}.go
rm config_{darwin,linux}.go.bak
working-directory:
vendor/github.com/containers/common/pkg/config
prop: |-
s_\(^var defaultHelperBinariesDir.*\)_\
\1\n "\$BINDIR/../../../github.com/containers/gvisor-tap-vsock/$GVISOR_MAJOR/bin",_
env:
GVISOR_MAJOR:
v{{deps.github.com/containers/gvisor-tap-vsock.version.major}} |
yeah, my assumption was that you'd always use the major for this kind of linkage, and match the dep to that. |
Satisfies a very weird problem set. @ABevier is packaging
podman.io
, which has oddly strict requirements for where to find things:Error: unable to start host networking: "could not find \"gvproxy\" in one of [/usr/local/opt/podman/libexec /opt/homebrew/bin /opt/homebrew/opt/podman/libexec /usr/local/bin /usr/local/libexec/podman /usr/local/lib/podman /usr/libexec/podman /usr/lib/podman $BINDIR/../libexec/podman]. To resolve this error, set the helper_binaries_dir key in the `[engine]` section of containers.conf to the directory containing your helper binaries."
Since
{{prefix}}/libexec
is one of the options, one of my pitches to him is:Assuming
{{prefix}}
==$(tea --prefix)/podman.io/v$x
, I'd expect{{deps.foo.bar.prefix.relative}}
==../../foo.bar/v$y
. This is tighter coupling than I'd like, so we should (probably) discourage its usage, but it would solve issues like the above without having to alter the source code ofpodman
. Which is the other option.The text was updated successfully, but these errors were encountered: