Fix so Warewulf can build and lint without make config
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -17,7 +17,7 @@
|
||||
/usr/share/man/man1/
|
||||
/etc/bash_completion.d/
|
||||
warewulf.spec
|
||||
internal/pkg/buildconfig/buildconfig.go
|
||||
internal/pkg/buildconfig/setconfigs.go
|
||||
include/systemd/warewulfd.service
|
||||
_dist/
|
||||
config
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
package buildconfig
|
||||
|
||||
const (
|
||||
BINDIR = "@BINDIR@"
|
||||
SYSCONFDIR = "@SYSCONFDIR@"
|
||||
LOCALSTATEDIR = "@LOCALSTATEDIR@"
|
||||
SRVDIR = "@SRVDIR@"
|
||||
TFTPDIR = "@TFTPDIR@"
|
||||
FIREWALLDDIR = "@FIREWALLDDIR@"
|
||||
SYSTEMDDIR = "@SYSTEMDDIR@"
|
||||
WWOVERLAYDIR = "@WWOVERLAYDIR@"
|
||||
WWCHROOTDIR = "@WWCHROOTDIR@"
|
||||
WWPROVISIONDIR = "@WWPROVISIONDIR@"
|
||||
VERSION = "@VERSION@"
|
||||
RELEASE = "@RELEASE@"
|
||||
)
|
||||
16
internal/pkg/buildconfig/defaults.go
Normal file
16
internal/pkg/buildconfig/defaults.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package buildconfig
|
||||
|
||||
var (
|
||||
BINDIR string = "UNDEF"
|
||||
SYSCONFDIR string = "UNDEF"
|
||||
LOCALSTATEDIR string = "UNDEF"
|
||||
SRVDIR string = "UNDEF"
|
||||
TFTPDIR string = "UNDEF"
|
||||
FIREWALLDDIR string = "UNDEF"
|
||||
SYSTEMDDIR string = "UNDEF"
|
||||
WWOVERLAYDIR string = "UNDEF"
|
||||
WWCHROOTDIR string = "UNDEF"
|
||||
WWPROVISIONDIR string = "UNDEF"
|
||||
VERSION string = "UNDEF"
|
||||
RELEASE string = "UNDEF"
|
||||
)
|
||||
16
internal/pkg/buildconfig/setconfigs.go.in
Normal file
16
internal/pkg/buildconfig/setconfigs.go.in
Normal file
@@ -0,0 +1,16 @@
|
||||
package buildconfig
|
||||
|
||||
func init() {
|
||||
BINDIR = "@BINDIR@"
|
||||
SYSCONFDIR = "@SYSCONFDIR@"
|
||||
LOCALSTATEDIR = "@LOCALSTATEDIR@"
|
||||
SRVDIR = "@SRVDIR@"
|
||||
TFTPDIR = "@TFTPDIR@"
|
||||
FIREWALLDDIR = "@FIREWALLDDIR@"
|
||||
SYSTEMDDIR = "@SYSTEMDDIR@"
|
||||
WWOVERLAYDIR = "@WWOVERLAYDIR@"
|
||||
WWCHROOTDIR = "@WWCHROOTDIR@"
|
||||
WWPROVISIONDIR = "@WWPROVISIONDIR@"
|
||||
VERSION = "@VERSION@"
|
||||
RELEASE = "@RELEASE@"
|
||||
}
|
||||
Reference in New Issue
Block a user