Commit Graph

1899 Commits

Author SHA1 Message Date
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
Jonathon Anderson
575d0539d8 Fix a typo in Dockerfile
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-31 16:32:40 -06:00
Christian Goll
f1eab8c363 Merge pull request #827 from mslacken/gendersTemplate
added genders examples
2023-09-06 14:16:50 +02:00
Christian Goll
1e13d5025e Merge branch 'development' into gendersTemplate 2023-09-06 14:08:09 +02:00
Christian Goll
bb160363dd Merge pull request #904 from ArnaudLcm/feature/canary
Canary feature & Little Makefile fix
2023-09-06 11:18:39 +02:00
Arnaud LECOMTE
aeb7793fba Switching cp to copy 2023-09-05 14:37:29 +02:00
Arnaud Lecomte
f2392f6e37 Updating documentation & API endpoint for container copy 2023-08-28 08:39:15 +02:00
Arnaud Lecomte
b56f024e6f Core of image's duplication feature 2023-08-25 13:54:39 +02:00
Jonathon Anderson
84e97d2169 Merge pull request #868 from anderbubble/ciq-com
Update ciq.com URLs
2023-08-24 00:28:23 -06:00
Jonathon Anderson
2f06913483 Merge pull request #808 from hpcng/FixWWclient
fix warewulf.conf location for wwclient
2023-08-23 23:55:05 -06:00
Jonathon Anderson
ab537a8136 Update ciq.com URLs
Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2023-08-23 14:51:11 -06:00
Christian Goll
7ac2970d83 fix warewulf.conf location for wwclient
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-23 14:18:43 -06:00
Christian Goll
00ad5db153 Remove redundant entries from changelog
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-23 14:16:52 -06:00
Brian Clemens
27b2107efb Merge pull request #901 from nap23carc/development-1 2023-08-23 21:43:20 +09:00
Nicholas Porter
9a8396adea Update el8.rst 2023-08-22 16:17:50 -06:00
Jonathon Anderson
071e5928de Merge pull request #786 from mslacken/DiskIgnition
disk support for warewulf
2023-08-22 14:36:57 -06:00
Jonathon Anderson
9058682b18 Add tests for disk data and ignition json
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-22 14:28:02 -06:00
Christian Goll
d060c3d447 Add ignition documentation
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
2892781078 Update tested golang version
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
d96c55022d Use systemd mount units for mounting ignition
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
cfbb38d570 Use ignition as a systemd service
simple init.d ignition fails as systemd is needed to set up drivers,
etc.

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
a7df560a30 Add json output for ignition
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-08-21 16:19:13 -06:00
Christian Goll
45539a0d1f Recursive handling for command line flags
Every struct in a NodeConf with `lopt:"foo" set is now added as a
command-line flag with the RecursiveCreateFlags call. For maps a struct
with the key UNDEF is added so that it can be parsed out.

As the flags for the command-line need variables which hold the values,
for every map an element map[UNDEF] is added.  When now calling the
internal add, these map element can be filtered out and replace by the
given name. (e.g., --netname)

* rewrote node/profile add for recursive functions
* rewrote node/profile set for recursive functions
* rewrote node/profile list for recursive functions

Signed-off-by: Christian Goll <cgoll@suse.com>
2023-08-21 16:19:13 -06:00
Christian Goll
c55c5a2ac4 Add recursive setter functions
when transforming a NodeInfo struct to a NodeConf (set the NodeConf from
the NodeInfo) nested structures were seperately handled. This means a
there were seperate handles for e.g *Netdevs and *IpmiConfig. The new
getter traverses through the datastucture and sets the right value for a
Entry struct, but calls itself again if a Pointer is detected.

This adds the posiblity to add new nested structures to NodeConf and
NodeInfo without the need of seperately handling them in the transformer
functions.

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
fdd233a25f Add recursive getter functions
When transforming a NodeConf struct to a NodeInfo (get the NodeInfo from
the Nodconf) nested structures were seperately handled. This means there
were seperate handles for e.g *Netdevs and *IpmiConfig. The new getter
traverses through the datastucture and sets the right value for an Entry
struct, but calls itself again if a Pointer is detected.

This adds the posiblity to add new nested structures to NodeConf and
NodeInfo without the need of seperate handling them in the transformer
functions.

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
f2bc70ad00 Add structures for devices and filesystems
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Christian Goll
4d50f053d7 Minor test fixes
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-08-21 16:19:13 -06:00
Jonathon Anderson
cc2ae4b5fb Merge pull request #893 from mslacken/fixCocer
remove and ignore *.coverprofile
2023-08-15 21:01:27 -06:00
Christian Goll
ede1a9149e remove and ignore *.coverprofile
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-08-15 17:16:08 +02:00
Christian Goll
baa8254dd5 Merge pull request #871 from mslacken/RealyReboot
reboot also without systemd
2023-08-15 12:49:15 +02:00
Christian Goll
0f48516eb7 Merge pull request #890 from anderbubble/makefile-refactor
Makefile refactor
2023-08-15 12:48:27 +02:00
Christian Goll
244cecf693 Merge pull request #891 from mslacken/NodeSpecificFiles
added example for host specific files
2023-08-15 12:48:10 +02:00
Christian Goll
320c92e55e added example for host specific files
Signed-off-by: Christian Goll <cgoll@suse.com>
2023-08-14 11:38:16 +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
d4c0e11a92 Merge pull request #854 from MatthewHink/mhink-build
Build fixes for API
2023-08-10 17:09:31 -06:00
Jonathon Anderson
526c96fb5e Update changelog to reflect Makefile changes
Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2023-08-10 11:45:10 -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
9ea3381b9d Remove extraneous backup file
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