Commit Graph

182 Commits

Author SHA1 Message Date
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
Christian Goll
b00a619746 moved location of defaults.conf
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-23 11:10:58 +01:00
Christian Goll
4a8384dbf3 added Changelog
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-23 11:10:21 +01:00
Christian Goll
290c6449dd removed getters as configs must exportable
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-23 11:09:20 +01:00
Christian Goll
4deae97bc8 make the configuration to be based in warewulf.conf
defaults will be se by the Makefile

Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-23 11:09:20 +01:00
Christian Goll
1a19cfda63 moved print_defaults to wwctl genconfig defaults
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-23 11:09:20 +01:00
Christian Goll
fa78d582eb generate reference documentation
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-23 11:09:19 +01:00
Christian Goll
ee7bc75bd7 generate man pages via sub command
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-23 11:09:19 +01:00
Christian Goll
3526c2bd5f added wwctl genconf used to generate completions
Signed-off-by: Christian Goll <cgoll@suse.de>
2023-03-23 11:09:19 +01:00
Jonathon Anderson
4c21a72572 Restrict access to /warewulf/config from overlays
The wwinit overlay populates /warewulf/config with information about the
Warewulf configuration. This includes the IPMI password, which should not be
visible to regular users. This changes the installed permissions of the file to
be readable by root only.

Closes #728

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2023-03-20 15:16:48 -06:00
Christian Goll
063c05602d Merge pull request #665 from mslacken/ContainerMnt
Container mnt
2023-02-24 15:13:12 +01:00
Christian Goll
3eaeac46d2 use canonical os.TempDir 2023-02-03 15:39:00 +01:00
Christian Goll
c4afe34df4 Merge pull request #578 from mslacken/podmanBuild
Dockerfile for warewulf host container
2023-02-03 11:53:08 +01:00
Jonathon Anderson
37daa19808 Merge pull request #668 from mslacken/FixConfigPerm
fix permission of config.ww
2023-02-02 18:00:58 -07:00
Jonathon Anderson
e8e9c4f3bd Merge branch 'development' into lint-update 2023-02-02 14:38:33 -07:00
Christian Goll
e1b8988a4e fix permission of config.ww 2023-02-01 09:25:13 +01:00
Christian Goll
157c3cd923 getting defaults mounts from warewulf.conf 2023-01-31 16:04:08 +01:00
Christian Goll
d82314460f added support for mounts.conf for container exec 2023-01-31 16:04:07 +01:00
Christian Goll
09ad83b02f add TMPDIR 2023-01-31 16:04:07 +01:00
Christian Goll
afcdb21ed7 Tag 4.4.0 release 2023-01-18 21:33:04 +01:00
Christian Goll
3baf4f57af update to 0.4..4rc3
Signed-off-by: Christian Goll <cgoll@suse.de>
2022-12-22 15:13:19 +01:00
Christian Goll
93c666031e Merge pull request #596 from anderbubble/ignore-wwapi-conf
Treat wwapi config files as built versions
2022-12-15 14:19:30 +01:00
Christian Goll
73578d38e9 Merge pull request #592 from anderbubble/more-wwconfigdir
Use WWCONFIGDIR for all relevant install paths
2022-12-15 12:09:02 +01:00
Christian Goll
c7a50447cc Merge pull request #591 from mslacken/fixNM
NetworkManager config needs to be 600
2022-12-15 12:04:55 +01:00
Jonathon Anderson
4b8141f7c7 Additions to and install staticfiles README
Building off the work in #581, add additional detail to the staticfiles
README, and install an iPXE README alongside the iPXE files in their
final location.

Closes #189

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-12-14 12:27:56 -07:00
Jonathon Anderson
3ad4b42896 Treat wwapi config files as built versions
The wwapi*.conf files are build from .in variants, so they should not be
tracked in the tree. Adding them to gitignore prevents them from being
added back in, and adding them to Makefile:clean cleans them up.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-12-14 00:23:50 -07:00
Jonathon Anderson
48fe714e8e Use WWCONFIGDIR for all relevant install paths
Makefile was checking WWCONFIGDIR in some places. In others it was
duplicating the explicit paths that make up WWCONFIGDIR. Here, update
all such references to always use the WWCONFIGDIR macro.

Signed-off-by: Jonathon Anderson <janderson@ciq.co>
2022-12-13 13:51:48 -07:00
Christian Goll
64cb589fe6 NetworkManager config needs to be 600 2022-12-13 10:34:38 +01:00
Christian Goll
c67699ae30 Update tag to rc2 2022-12-09 17:53:33 +01:00