Commit Graph

210 Commits

Author SHA1 Message Date
Christian Goll
4379c4c18d use grub/shim from host system
Also the boot method is now configured globaly as this is
the only way to make sure that unkonwn nodes get the right
stuff

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Christian Goll
60dc8f6251 enable grub boot for all nodes
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-01-17 18:02:04 -07:00
Jonathon Anderson
038329ebce Remove ipxe binaries and configure for Rocky Linux
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-12-09 01:29:48 -07:00
Christian Goll
7e1cb014c2 use distribution ipxe binaries
exclude .github and .vscode for make dist
honor git tag when generating spec file

Signed-off-by: Christian Goll <cgoll@suse.com>
2023-12-08 22:38:57 -07:00
Christian Goll
8cbeb25c8b seperate the path for the iPXE binaries
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-12-08 22:38:43 -07:00
Christian Goll
48768abb6d Update Makefile to install symlinks and dirs
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-11-25 01:16:48 -07:00
Jonathon Anderson
f015d85996 Increase linter timeout to 5 minutes
Fixes #968

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-11-24 11:47:16 -07:00
Jonathon Anderson
6a49c8df0c Add make fmt to Makefile
Implemented using the standard golang formatter.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-10-23 17:55:52 -06:00
Jonathon Anderson
cc55dbd7fb Move non-offline build deps to Makefile end
Dependencies defined for $(protofiles) were before $(protifiles) was
defined.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-10-16 10:17:23 +02:00
Jonathon Anderson
8c4f68849d Un-mark vendor target as phony
Contrary to #945, marking vendor as phony causes binaries to be re-built
on a repeated call to `make`.  Though we can't determine when vendor
needs to be rebuilt, this is preferable to not knowing when Warewulf
binaries need to be rebuilt.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-10-16 10:17:23 +02:00
Jonathon Anderson
0d3eeb09e5 Workaround for CentOS 7 gzip
The CentOS 7 gzip doesn't have `--keep`.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-10-16 10:17:22 +02:00
Jonathon Anderson
77f1bd6797 Split tidy into separate target
This allows `make vendor` to download packages to satisfy `go.mod`
without changing `go.mod`.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-10-16 10:17:22 +02:00
Jonathon Anderson
d08aeb2adc Mark vendor target phony and update
The vendor target can't reliably determine when it needs to run, so mark
it phony. At the same time, update go.mod.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-10-06 00:41:48 -06:00
Jonathon Anderson
ff22633261 Consolidate OFFLINE_BUILD behavior
Rather than implementing OFFLINE_BUILD individually within each relevant
target, define all such target dependencies once.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-10-06 00:24:27 -06:00
Christian Goll
a152beec49 do not download protobuf stuff on offline builds
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-09-20 17:28:14 +02:00
Jonathon Anderson
6df8b4907b Add cleanproto target
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-09-01 07:31:51 -06:00
Jonathon Anderson
ebe676c385 Separate proto golang files in Makefile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-09-01 07:27:47 -06:00
Jonathon Anderson
41f86f7f58 Separate man_pages into new docs target
This allows `make` and `make all` to avoid unnecessary repeat builds,
and saves automatic generation of man pages for `install`.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-31 17:06:47 -06:00
Jonathon Anderson
bfe9804296 Define a config variable in Makefile
Using a `config` variable in target dependencies allows the underlying
targets to be referenced properly, rather than passing through a "phony"
`config` target. This allows dependent targets to not have to re-run if
their dependencies have remained static, as expected.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-31 16:35:24 -06:00
Jonathon Anderson
67a39061ae Move all target to top of Makefile
The `all` target should be the default for make; but placing it after
the `include` directives allowed the targets within the included files
to take precedence.

Moving `all` before the `include` directives restores it to default
status.

I also used this opportunity to restore the `build` target as the
defining target, and then just set up a dependency between `all` and
`build`.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-31 16:35:24 -06:00
Jonathon Anderson
1047032bae Updated Makefile to account for vendor/ in dist
The previous PR #890 introduced a `Defaults.mk` target for defining
default variables for future calls to `make`. This functionality was
already present in a different form, but this new "real" target had an
unintended side-effect of causing the target to be called automatically
at reference, even the optional reference `-include Defaults.mk`. This
is undesirable as it causes the generation of defaults even during a
`make clean`.

This commit resolves these issues and further refactors the Makefile,
building on the work in #890, but with additional understanding:

* Convert the `Defaults.mk` target to the "phony" `defaults` target,
  preventing automatic generation
* Refactor and split `clean` targets
* Update `cleanvendor` to reflect `OFFLINE_BUILD`, similar to the
  `vendor` target
* Move "tools" targets into `Tools.mk`
* Add `ARCH` to `Variables.mk` for architecture-specific actions

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-31 16:35:21 -06:00
Arnaud Lecomte
f2392f6e37 Updating documentation & API endpoint for container copy 2023-08-28 08:39:15 +02:00
Christian Goll
ede1a9149e remove and ignore *.coverprofile
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-08-15 17:16:08 +02:00
Jonathon Anderson
9a453c1702 Capture proto dependency installs as targets
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-11 16:15:33 -06:00
Jonathon Anderson
b6c774c4b5 Use no config file when generating completions
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
b3b7591796 Audit Makefile clean target and gitignore
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
d2b63ecb75 Simplier dist generation prep
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
0561c3009a Improve specification of command builds
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
5ff899293e Manage examples, ipxe, and overlays with install
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
0b9702a7d3 Separate out bash completions in Makefile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
daab6075d7 Remove extraneous rm from clean Makefile target
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
1c3b566d43 Test targets depend on config
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
081ead8c9b Use zero-led octals for all install permissions
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
bf3995d6f5 Clean up test targets in Makefile
Most notably, replaces the test-it target with a more simply named test
target.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
ec15f0fe36 Generate defaults.conf explicitly in Makefile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
1fdd3742c3 Improve the generation of man pages
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
f375ff32cb Remove unused debian targets from Makefile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
88001ecfb0 Remove extraneous whitespace
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
3ef88f8fb0 Collapse files target into install
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
c1d56885ac Refactor Makefile config / Defaults.mk
Makefile has included a Defaults.mk file to store variable configuration
from one run for implicit inclusion in future runs, but the creation of
this file has been automatic and opaque, and the state of it managed by
a series of PHONY targets (e.g., config, genconfig, rm_config). This
commit refactors config to name its files explicitly (so they can be
more properly monitored by make) and makes the generation of Defaults.mk
explicit so that its behavior is more obvious.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:43:46 -06:00
Jonathon Anderson
64fd43bb86 Apply PHONY and remove extraneous comments
Several of the targets in Makefile don't create a file of their name,
and PHONY identifies these targets to make. Alongside, several comments
in Makefile don't provide additional details beyond what is
self-documented by the command or target name itself.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 10:50:29 -06:00
Jonathon Anderson
315b78bcce Remove echo and hidden commands from Makefile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 10:49:09 -06:00
Jonathon Anderson
94e80b17d7 Split Makefile variables into a separate file
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 10:46:13 -06:00
Matthew Hink
2094533894 Build fixes for API
- Updated the linter from 1.50 to 1.53.2 because the previous version
  was falling over (likely OOM).

- Updated protoc build command for newer version of protobuf.

The make command below should work now:

```shell
make clean setup proto all build wwapid wwapic wwapird ; echo $?
```

Signed-off-by: MatthewHink <matthew_hink@ciq.com>
2023-08-09 11:42:37 -06:00
griznog
e05438fdc0 Use warewulf.conf from build instead of installed warewulf.conf. 2023-07-26 11:46:13 -05:00
John Hanks
22df58eab4 More aggressive cleaning based on contents of .gitignore. 2023-07-25 18:53:14 -05:00
Christian Goll
cf5658fed9 fixed targets for doc build
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-06-15 08:54:17 +02:00
Jonathon Anderson
387cd0f7be Refactor BaseConf Read and Parse
Also refactor New and Get to return pointers to match BaseConf methods.
This makes calling the methods immediately on the return values of the
constructors easier.

Also move config.ConfigFile to buildconfig.go.in. ConfigFile is still
used by wwctl as a default config file to reference; but it is removed
from other locations now.

Removed Persist, as nothing called it.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2023-04-19 14:02:43 -06:00
Jonathon Anderson
c461e65a98 Rename pkg/warewulfconf to pkg/config
Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2023-04-19 14:02:43 -06:00
Jonathon Anderson
9c77d7b50c Fixes to build process
* Fixed a misspelling of genconfig in Makefile
* Updated completions path in warewulf.spec.in

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2023-03-23 11:11:01 +01:00