Commit Graph

234 Commits

Author SHA1 Message Date
Jonathon Anderson
97cc5576b1 Remove non-POSIX commands from Makefile
The use of `<()` in `dist` was incompatible with the GitHub runner.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-07 12:53:02 -07:00
Jonathon Anderson
3f652ceb02 Run staticcheck as part of GitHub CI
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-06 22:11:13 -07:00
Jonathon Anderson
6dbfa52dbc Create site overlay directory
This was previously added to warewulf.spec, but the directory wasn't actually
being created.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-05 09:23:19 -07:00
Jonathon Anderson
ea7cd49f85 Simplify Makefile and spec
- explicitly indicate what to include in dist
- prevent duplication of files in specfile

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-02-05 09:23:06 -07:00
Jonathon Anderson
53c939608b Enforce updating license dependencies
- Closes: #1148

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-21 09:42:27 -07:00
Jonathon Anderson
ed78da4123 Move distribution overlays to datadir
This typically puts the overlays into `/usr/share/warewulf/overlays/`.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-20 11:12:47 +01:00
Jonathon Anderson
a80ba8ee01 Configure nodes.conf path dynamically from config
Removes the use of init() to initialize the variable.

- Closes: #1596
- See also: #1569

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-12-17 11:04:43 -07:00
Christian Goll
4597fdfaa9 use ipmitool created from template file
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-11-07 23:01:32 -07:00
Jonathon Anderson
df92a270c7 Add deadcode to Makefile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-18 15:09:09 -06:00
Jonathon Anderson
adb54a870d Remove vestigial default.conf components
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-10-17 23:00:57 -04:00
Christian Goll
132869f8b3 Merge pull request #1306 from anderbubble/split-test-overlays
Split overlays into discrete functionality and test
2024-09-27 14:59:37 +02:00
Jonathon Anderson
8d4cb37b24 Move UTC selection to testsuite environment variable
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-26 18:23:47 -06:00
Jonathon Anderson
57f7a8f158 Omit internal tests from overlay installation
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-26 10:48:40 -06:00
Jonathon Anderson
053dd9953a Split overlays into discrete functionality and test
- Closes #987

To make the overlays testable in isolation, and after discussion with
the TSC, removed host/time/source from overlay files.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-09-26 10:48:38 -06:00
Jonathon Anderson
614cb9a339 Fixes for logrotate.d packaging
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-08-02 17:36:32 -06:00
Christian Goll
fbf3e3c0a8 Add a logrotate config for warewulfd.log
Signed-off-by: Christian Goll <cgoll@suse.com>
2024-08-02 17:06:21 -06:00
Jonathon Anderson
f23b95f69f Prevent make dist from including previous dists
`make dist` may accidentially include previously-made dist tarballs;
this change adjusts the target to exclude these tarballs from the dist.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-07-05 11:16:22 -06:00
Jonathon Anderson
18cebb8652 New warewulf-dracut subpackage
warewulf-dracut includes a dracut module to be installed in a container
image to support building an initramfs that can boot from Warewulf.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-06-06 03:15:08 -04:00
Jonathon Anderson
864a4e7447 Don't build the API for CentOS 7
A recent security update breaks compatibility with CentOS 7 through
gpgme. This change omits building the API by default and does not build
it when packaging for EL 7.

- Closes #1171

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-04-17 19:54:18 -06:00
Jonathon Anderson
f07401ce41 Calculate VERSION and RELEASE dynamically from git
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-04-05 19:48:26 -06:00
Jonathon Anderson
bd468537ed Never attempt to build protocol buffers offline
Building protocol buffers requires fetching utilities from the
Internet. Typically this is done at development time and the finished
buffers are included in dist; but if timestamps get off this can lead
mock to try to rebuild them during an offline build, causing the build
to fail.

This change moves all of the protoc targets into a section of the
Makefile that is disabled during an offline build.

- Closes #1155

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-03-28 16:55:08 -06:00
Jonathon Anderson
6cc13455f6 Move overlays to rootfs and and set ownership
Move all overlay contents to a rootfs subdirectory, which was already
supported, and set ownership to root:root.

Closes #1078

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-02-17 10:39:06 -07:00
Christian Goll
5e94766895 do not export version and rc
create also a new warewulf.conf so that the compiled
in paths are in sync with the configuration

Signed-off-by: Christian Goll <cgoll@suse.com>
2024-02-16 17:38:34 -07:00
Jonathon Anderson
a1832ad8c1 Complete transfer of Warewulf from HPCng
Warewulf is now being maintained in its own GitHub organization at
github.com/warewulf

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2024-01-26 21:35:04 -07:00
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