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

Use DefaultWorkspaceDir from container instead of hardcoding /home/build #1728

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dannf
Copy link
Contributor

@dannf dannf commented Jan 3, 2025

We have /home/build hardcoded in several places. It seems like container.DefaultWorkspaceDir is the canonical definition, so let's just use it. Also use it to do ${{package.srcdir}} substitutions (which is what I'm really after here).

Note: This is my first time touching melange code. There may be a very good reason we aren't importing container here - but it isn't clear to me.

dannf added a commit to wolfi-dev/os that referenced this pull request Jan 3, 2025
This package requires lazy binding to build, which conflicts with
the `-Wl,-z,now` flag in openssf-compiler-options. Instead of disabling
all of the openssf options, let's just drop that one flag.

I tried to implement this completely within openssf-compiler-options,
as described here[*], but the %{!Wl,-z,now:...} syntax doesn't seem
to work for detecting these options. I also tried including various
spec file snippets to tweak the *link_command and friends, but failed.

For now, let's just make our own copy of openssf.spec and edit/use it.

Note: spec files need to have fully qualified paths. melange doesn't
support ${{package.srcdir}} expansion in environment variables yet[**],
so I've hardcoded `/home/build` for now.

[*] #34568 (comment)
[**] chainguard-dev/melange#1728

Signed-off-by: dann frazier <[email protected]>
dannf added a commit to wolfi-dev/os that referenced this pull request Jan 3, 2025
This package requires lazy binding to build, which conflicts with
the `-Wl,-z,now` flag in openssf-compiler-options. Instead of disabling
all of the openssf options, let's just drop that one flag.

I tried to implement this completely within openssf-compiler-options,
as described here[*], but the %{!Wl,-z,now:...} syntax doesn't seem
to work for detecting these options. I also tried including various
spec file snippets to tweak the *link_command and friends, but failed.

For now, let's just make our own copy of openssf.spec and edit/use it.

Note: spec files need to have fully qualified paths. melange doesn't
support ${{package.srcdir}} expansion in environment variables yet[**],
so I've hardcoded `/home/build` for now.

[*] #34568 (comment)
[**] chainguard-dev/melange#1728

Signed-off-by: dann frazier <[email protected]>
dannf added a commit to wolfi-dev/os that referenced this pull request Jan 3, 2025
…lazy binding

This package requires lazy binding to build, which conflicts with
the `-Wl,-z,now` flag in openssf-compiler-options. Instead of disabling
all of the openssf options, let's just drop that one flag.

I tried to implement this completely within openssf-compiler-options,
as described here[*], but the %{!Wl,-z,now:...} syntax doesn't seem
to work for detecting these options. I also tried including various
spec file snippets to tweak the *link_command and friends, but failed.

For now, let's just make our own copy of openssf.spec and edit/use it.

Note: spec files need to have fully qualified paths. melange doesn't
support ${{package.srcdir}} expansion in environment variables yet[**],
so I've hardcoded `/home/build` for now.

[*] #34568 (comment)
[**] chainguard-dev/melange#1728

Signed-off-by: dann frazier <[email protected]>
dannf added a commit to dannf/os that referenced this pull request Jan 15, 2025
…w lazy binding

This package requires lazy binding to build, which conflicts with
the `-Wl,-z,now` flag in openssf-compiler-options. Instead of disabling
all of the openssf options, let's just drop that one flag.

I tried to implement this completely within openssf-compiler-options,
as described here[*], but the %{!Wl,-z,now:...} syntax doesn't seem
to work for detecting these options. I also tried including various
spec file snippets to tweak the *link_command and friends, but failed.

For now, let's just make our own copy of openssf.spec and edit/use it.

Note: spec files need to have fully qualified paths. melange doesn't
support ${{package.srcdir}} expansion in environment variables yet[**],
so I've hardcoded `/home/build` for now.

[*] wolfi-dev#34568 (comment)
[**] chainguard-dev/melange#1728

Signed-off-by: dann frazier <[email protected]>
dannf added a commit to dannf/os that referenced this pull request Jan 15, 2025
…lazy binding

This package requires lazy binding to build, which conflicts with
the `-Wl,-z,now` flag in openssf-compiler-options. Instead of disabling
all of the openssf options, let's just drop that one flag.

I tried to implement this completely within openssf-compiler-options,
as described here[*], but the %{!Wl,-z,now:...} syntax doesn't seem
to work for detecting these options. I also tried including various
spec file snippets to tweak the *link_command and friends, but failed.

For now, let's just make our own copy of openssf.spec and edit/use it.

Note: spec files need to have fully qualified paths. melange doesn't
support ${{package.srcdir}} expansion in environment variables yet[**],
so I've hardcoded `/home/build` for now.

[*] wolfi-dev#34568 (comment)
[**] chainguard-dev/melange#1728

Signed-off-by: dann frazier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant