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
sct: fix segfault when DISPLAY is empty, clean up derivation #29801
Conversation
9664a8e
to
ebdefa1
Compare
ebdefa1
to
44beb56
Compare
# failed builds as the checksum had changed. | ||
# The checksum is updated for now, however, this is unpractical and potentially unsafe | ||
# so any future changes might warrant a fork of the (feature complete) project. | ||
# The code is under public domain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you keep this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several problems with this comment:
The code is in public domain
is now in metadata.- The change that has been made is not unknown and basically incorporates
patchPhase
that I've also removed. - Digest change is not potentially unsafe, that's misleading. It can only result in failed builds.
Also I'd argue that it's overly verbose. Keep in mind that sct.c
hasn't been updated for a year and a half and probably never will be. The discussion (#17163) is mentioned in 62ba6b0 and is easily retrievable in case if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we host this file somewhere else, where it won't be changed (gist)? Otherwise it will break nixpkgs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mic92 This was already decided in #17163. Author (one of OpenBSD commiters, tedu@) knows that several distros rely on this file being unchanged, and probably didn't anticipated this when he had changed the file previously. I could have made https://web.archive.org copy and link to it, but unfortunately author's website uses a custom TLS certificate and https://web.archive.org can't archive when certificate is not valid/not in cert store.
}; | ||
phases = ["patchPhase" "buildPhase" "installPhase"]; | ||
patchPhase = '' | ||
sed -re "/Xlibint/d" ${src} > sct.c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is no longer necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer necessary.
Incorporating this patch was the unknown change that the comment has mentioned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. I was not aware of this change.
Thanks! |
Motivation for this change
patchPhase
that is now redundant (libXint
is not present in source code anymore: it was the unknown small change that was described in derivation comments)meta.license
,meta.homepage
not setgcc
was explicitly used instead ofcc
sct
segfaults whenDISPLAY
environment variable is empty:This patch fixes that. Now it just exits with error code 1.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)