internal: store fortify path in internal

This now makes more sense due to the changes in build system.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
Ophestra 2025-02-26 12:03:25 +09:00
parent a5d2f040fb
commit 6d4ac3d9fd
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q
3 changed files with 4 additions and 1 deletions

1
dist/release.sh vendored
View File

@ -12,6 +12,7 @@ go generate ./...
go build -trimpath -v -o "${out}/bin/" -ldflags "-s -w -buildid= -extldflags '-static'
-X git.gensokyo.uk/security/fortify/internal.Version=${VERSION}
-X git.gensokyo.uk/security/fortify/internal.Fsu=/usr/bin/fsu
-X git.gensokyo.uk/security/fortify/internal.Fortify=/usr/bin/fortify
-X main.Fmain=/usr/bin/fortify" ./...
rm -f "./${out}.tar.gz" && tar -C dist -czf "${out}.tar.gz" "${pname}"

View File

@ -3,7 +3,8 @@ package internal
import "path"
var (
Fsu = compPoison
Fsu = compPoison
Fortify = compPoison
)
func Path(p string) (string, bool) {

View File

@ -50,6 +50,7 @@ buildGoModule rec {
{
Version = "v${version}";
Fsu = "/run/wrappers/bin/fsu";
Fortify = "${placeholder "out"}/libexec/fortify";
};
# nix build environment does not allow acls