diff --git a/CHANGELOG.md b/CHANGELOG.md index d9a0f5c3..61516c5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,6 +68,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed a bug where error occurs when editing node. #1024 - Optionally detect network and netmask from CIDR IP address. #1016 - Fix startup of wwclient on systemd hosts #1066 +- Change ownership of overlays to root:root #1086 ### Changed @@ -164,6 +165,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added documentation about of how to configure warewulf with multiple networks - Added installation instructions for using dnsmasq +- Move built-in overlays to a rootfs directory #1086 ## [4.4.0] 2023-01-18 diff --git a/Makefile b/Makefile index 55eb8aee..2a6d8bfb 100644 --- a/Makefile +++ b/Makefile @@ -93,8 +93,8 @@ install: build docs install -d -m 0755 $(DESTDIR)$(BINDIR) install -d -m 0755 $(DESTDIR)$(WWCHROOTDIR) install -d -m 0755 $(DESTDIR)$(WWPROVISIONDIR) - install -d -m 0755 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/$(WWCLIENTDIR) - install -d -m 0755 $(DESTDIR)$(WWOVERLAYDIR)/host/$(TFTPDIR)/warewulf/ + install -d -m 0755 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/rootfs/$(WWCLIENTDIR) + install -d -m 0755 $(DESTDIR)$(WWOVERLAYDIR)/host/rootfs/$(TFTPDIR)/warewulf/ install -d -m 0755 $(DESTDIR)$(WWCONFIGDIR)/examples install -d -m 0755 $(DESTDIR)$(WWCONFIGDIR)/ipxe install -d -m 0755 $(DESTDIR)$(WWCONFIGDIR)/grub @@ -116,19 +116,19 @@ install: build docs for f in etc/examples/*.ww; do install -m 0644 $$f $(DESTDIR)$(WWCONFIGDIR)/examples/; done for f in etc/ipxe/*.ipxe; do install -m 0644 $$f $(DESTDIR)$(WWCONFIGDIR)/ipxe/; done install -m 0644 etc/grub/grub.cfg.ww $(DESTDIR)$(WWCONFIGDIR)/grub/grub.cfg.ww - install -m 0644 etc/grub/chainload.ww $(DESTDIR)$(WWOVERLAYDIR)/host$(TFTPDIR)/warewulf/grub.cfg.ww + install -m 0644 etc/grub/chainload.ww $(DESTDIR)$(WWOVERLAYDIR)/host/rootfs$(TFTPDIR)/warewulf/grub.cfg.ww (cd overlays && find * -type f -exec install -D -m 0644 {} $(DESTDIR)$(WWOVERLAYDIR)/{} \;) (cd overlays && find * -type d -exec mkdir -pv $(DESTDIR)$(WWOVERLAYDIR)/{} \;) (cd overlays && find * -type l -exec cp -av {} $(DESTDIR)$(WWOVERLAYDIR)/{} \;) - chmod 0755 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/init - chmod 0755 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/$(WWCLIENTDIR)/wwinit - chmod 0600 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/etc/ssh/ssh* - chmod 0600 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/etc/NetworkManager/system-connections/ww4-managed.ww - chmod 0644 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/etc/ssh/ssh*.pub.ww - chmod 0600 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/warewulf/config.ww - chmod 0750 $(DESTDIR)$(WWOVERLAYDIR)/host + chmod 0755 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/rootfs/init + chmod 0755 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/rootfs/$(WWCLIENTDIR)/wwinit + chmod 0600 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/rootfs/etc/ssh/ssh* + chmod 0600 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/rootfs/etc/NetworkManager/system-connections/ww4-managed.ww + chmod 0644 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/rootfs/etc/ssh/ssh*.pub.ww + chmod 0600 $(DESTDIR)$(WWOVERLAYDIR)/wwinit/rootfs/warewulf/config.ww + chmod 0750 $(DESTDIR)$(WWOVERLAYDIR)/host/rootfs install -m 0755 wwctl $(DESTDIR)$(BINDIR) - install -m 0755 wwclient $(DESTDIR)$(WWOVERLAYDIR)/wwinit/$(WWCLIENTDIR)/wwclient + install -m 0755 wwclient $(DESTDIR)$(WWOVERLAYDIR)/wwinit/rootfs/$(WWCLIENTDIR)/wwclient install -m 0755 wwapic $(DESTDIR)$(BINDIR) install -m 0755 wwapid $(DESTDIR)$(BINDIR) install -m 0755 wwapird $(DESTDIR)$(BINDIR) diff --git a/overlays/debug/warewulf/template-variables.md.ww b/overlays/debug/rootfs/warewulf/template-variables.md.ww similarity index 100% rename from overlays/debug/warewulf/template-variables.md.ww rename to overlays/debug/rootfs/warewulf/template-variables.md.ww diff --git a/overlays/generic/etc/group.ww b/overlays/generic/rootfs/etc/group.ww similarity index 100% rename from overlays/generic/etc/group.ww rename to overlays/generic/rootfs/etc/group.ww diff --git a/overlays/generic/etc/hosts.ww b/overlays/generic/rootfs/etc/hosts.ww similarity index 100% rename from overlays/generic/etc/hosts.ww rename to overlays/generic/rootfs/etc/hosts.ww diff --git a/overlays/generic/etc/passwd.ww b/overlays/generic/rootfs/etc/passwd.ww similarity index 100% rename from overlays/generic/etc/passwd.ww rename to overlays/generic/rootfs/etc/passwd.ww diff --git a/overlays/generic/root/.ssh/authorized_keys.ww b/overlays/generic/rootfs/root/.ssh/authorized_keys.ww similarity index 100% rename from overlays/generic/root/.ssh/authorized_keys.ww rename to overlays/generic/rootfs/root/.ssh/authorized_keys.ww diff --git a/overlays/host/etc/dhcp/dhcpd.conf.ww b/overlays/host/rootfs/etc/dhcp/dhcpd.conf.ww similarity index 100% rename from overlays/host/etc/dhcp/dhcpd.conf.ww rename to overlays/host/rootfs/etc/dhcp/dhcpd.conf.ww diff --git a/overlays/host/etc/dhcpd.conf b/overlays/host/rootfs/etc/dhcpd.conf similarity index 100% rename from overlays/host/etc/dhcpd.conf rename to overlays/host/rootfs/etc/dhcpd.conf diff --git a/overlays/host/etc/dhcpd.conf.ww b/overlays/host/rootfs/etc/dhcpd.conf.ww similarity index 100% rename from overlays/host/etc/dhcpd.conf.ww rename to overlays/host/rootfs/etc/dhcpd.conf.ww diff --git a/overlays/host/etc/dnsmasq.d/ww4-hosts.conf.ww b/overlays/host/rootfs/etc/dnsmasq.d/ww4-hosts.conf.ww similarity index 100% rename from overlays/host/etc/dnsmasq.d/ww4-hosts.conf.ww rename to overlays/host/rootfs/etc/dnsmasq.d/ww4-hosts.conf.ww diff --git a/overlays/host/etc/exports.ww b/overlays/host/rootfs/etc/exports.ww similarity index 100% rename from overlays/host/etc/exports.ww rename to overlays/host/rootfs/etc/exports.ww diff --git a/overlays/host/etc/hosts.ww b/overlays/host/rootfs/etc/hosts.ww similarity index 100% rename from overlays/host/etc/hosts.ww rename to overlays/host/rootfs/etc/hosts.ww diff --git a/overlays/host/etc/profile.d/ssh_setup.csh b/overlays/host/rootfs/etc/profile.d/ssh_setup.csh similarity index 100% rename from overlays/host/etc/profile.d/ssh_setup.csh rename to overlays/host/rootfs/etc/profile.d/ssh_setup.csh diff --git a/overlays/host/etc/profile.d/ssh_setup.sh b/overlays/host/rootfs/etc/profile.d/ssh_setup.sh similarity index 100% rename from overlays/host/etc/profile.d/ssh_setup.sh rename to overlays/host/rootfs/etc/profile.d/ssh_setup.sh diff --git a/overlays/wwinit/etc/NetworkManager/system-connections/ww4-managed.ww b/overlays/wwinit/rootfs/etc/NetworkManager/system-connections/ww4-managed.ww similarity index 100% rename from overlays/wwinit/etc/NetworkManager/system-connections/ww4-managed.ww rename to overlays/wwinit/rootfs/etc/NetworkManager/system-connections/ww4-managed.ww diff --git a/overlays/wwinit/etc/fstab.ww b/overlays/wwinit/rootfs/etc/fstab.ww similarity index 100% rename from overlays/wwinit/etc/fstab.ww rename to overlays/wwinit/rootfs/etc/fstab.ww diff --git a/overlays/wwinit/etc/hostname.ww b/overlays/wwinit/rootfs/etc/hostname.ww similarity index 100% rename from overlays/wwinit/etc/hostname.ww rename to overlays/wwinit/rootfs/etc/hostname.ww diff --git a/overlays/wwinit/etc/issue.ww b/overlays/wwinit/rootfs/etc/issue.ww similarity index 100% rename from overlays/wwinit/etc/issue.ww rename to overlays/wwinit/rootfs/etc/issue.ww diff --git a/overlays/wwinit/etc/network/interfaces b/overlays/wwinit/rootfs/etc/network/interfaces similarity index 100% rename from overlays/wwinit/etc/network/interfaces rename to overlays/wwinit/rootfs/etc/network/interfaces diff --git a/overlays/wwinit/etc/network/interfaces.d/default.ww b/overlays/wwinit/rootfs/etc/network/interfaces.d/default.ww similarity index 100% rename from overlays/wwinit/etc/network/interfaces.d/default.ww rename to overlays/wwinit/rootfs/etc/network/interfaces.d/default.ww diff --git a/overlays/wwinit/etc/resolv.conf.ww b/overlays/wwinit/rootfs/etc/resolv.conf.ww similarity index 100% rename from overlays/wwinit/etc/resolv.conf.ww rename to overlays/wwinit/rootfs/etc/resolv.conf.ww diff --git a/overlays/wwinit/etc/ssh/ssh_host_dsa_key.pub.ww b/overlays/wwinit/rootfs/etc/ssh/ssh_host_dsa_key.pub.ww similarity index 100% rename from overlays/wwinit/etc/ssh/ssh_host_dsa_key.pub.ww rename to overlays/wwinit/rootfs/etc/ssh/ssh_host_dsa_key.pub.ww diff --git a/overlays/wwinit/etc/ssh/ssh_host_dsa_key.ww b/overlays/wwinit/rootfs/etc/ssh/ssh_host_dsa_key.ww similarity index 100% rename from overlays/wwinit/etc/ssh/ssh_host_dsa_key.ww rename to overlays/wwinit/rootfs/etc/ssh/ssh_host_dsa_key.ww diff --git a/overlays/wwinit/etc/ssh/ssh_host_ecdsa_key.pub.ww b/overlays/wwinit/rootfs/etc/ssh/ssh_host_ecdsa_key.pub.ww similarity index 100% rename from overlays/wwinit/etc/ssh/ssh_host_ecdsa_key.pub.ww rename to overlays/wwinit/rootfs/etc/ssh/ssh_host_ecdsa_key.pub.ww diff --git a/overlays/wwinit/etc/ssh/ssh_host_ecdsa_key.ww b/overlays/wwinit/rootfs/etc/ssh/ssh_host_ecdsa_key.ww similarity index 100% rename from overlays/wwinit/etc/ssh/ssh_host_ecdsa_key.ww rename to overlays/wwinit/rootfs/etc/ssh/ssh_host_ecdsa_key.ww diff --git a/overlays/wwinit/etc/ssh/ssh_host_ed25519_key.pub.ww b/overlays/wwinit/rootfs/etc/ssh/ssh_host_ed25519_key.pub.ww similarity index 100% rename from overlays/wwinit/etc/ssh/ssh_host_ed25519_key.pub.ww rename to overlays/wwinit/rootfs/etc/ssh/ssh_host_ed25519_key.pub.ww diff --git a/overlays/wwinit/etc/ssh/ssh_host_ed25519_key.ww b/overlays/wwinit/rootfs/etc/ssh/ssh_host_ed25519_key.ww similarity index 100% rename from overlays/wwinit/etc/ssh/ssh_host_ed25519_key.ww rename to overlays/wwinit/rootfs/etc/ssh/ssh_host_ed25519_key.ww diff --git a/overlays/wwinit/etc/ssh/ssh_host_rsa_key.pub.ww b/overlays/wwinit/rootfs/etc/ssh/ssh_host_rsa_key.pub.ww similarity index 100% rename from overlays/wwinit/etc/ssh/ssh_host_rsa_key.pub.ww rename to overlays/wwinit/rootfs/etc/ssh/ssh_host_rsa_key.pub.ww diff --git a/overlays/wwinit/etc/ssh/ssh_host_rsa_key.ww b/overlays/wwinit/rootfs/etc/ssh/ssh_host_rsa_key.ww similarity index 100% rename from overlays/wwinit/etc/ssh/ssh_host_rsa_key.ww rename to overlays/wwinit/rootfs/etc/ssh/ssh_host_rsa_key.ww diff --git a/overlays/wwinit/etc/sysconfig/network-scripts/ifcfg.ww b/overlays/wwinit/rootfs/etc/sysconfig/network-scripts/ifcfg.ww similarity index 100% rename from overlays/wwinit/etc/sysconfig/network-scripts/ifcfg.ww rename to overlays/wwinit/rootfs/etc/sysconfig/network-scripts/ifcfg.ww diff --git a/overlays/wwinit/etc/sysconfig/network.ww b/overlays/wwinit/rootfs/etc/sysconfig/network.ww similarity index 100% rename from overlays/wwinit/etc/sysconfig/network.ww rename to overlays/wwinit/rootfs/etc/sysconfig/network.ww diff --git a/overlays/wwinit/etc/systemd/network/10-persistent-net.link.ww b/overlays/wwinit/rootfs/etc/systemd/network/10-persistent-net.link.ww similarity index 100% rename from overlays/wwinit/etc/systemd/network/10-persistent-net.link.ww rename to overlays/wwinit/rootfs/etc/systemd/network/10-persistent-net.link.ww diff --git a/overlays/wwinit/etc/systemd/system/ignition-ww4-disks.service b/overlays/wwinit/rootfs/etc/systemd/system/ignition-ww4-disks.service similarity index 100% rename from overlays/wwinit/etc/systemd/system/ignition-ww4-disks.service rename to overlays/wwinit/rootfs/etc/systemd/system/ignition-ww4-disks.service diff --git a/overlays/wwinit/etc/systemd/system/local-fs.target.wants/ignition-ww4-disks.service b/overlays/wwinit/rootfs/etc/systemd/system/local-fs.target.wants/ignition-ww4-disks.service similarity index 100% rename from overlays/wwinit/etc/systemd/system/local-fs.target.wants/ignition-ww4-disks.service rename to overlays/wwinit/rootfs/etc/systemd/system/local-fs.target.wants/ignition-ww4-disks.service diff --git a/overlays/wwinit/etc/systemd/system/local-fs.target.wants/ww4-disks.target b/overlays/wwinit/rootfs/etc/systemd/system/local-fs.target.wants/ww4-disks.target similarity index 100% rename from overlays/wwinit/etc/systemd/system/local-fs.target.wants/ww4-disks.target rename to overlays/wwinit/rootfs/etc/systemd/system/local-fs.target.wants/ww4-disks.target diff --git a/overlays/wwinit/etc/systemd/system/multi-user.target.wants/wwclient.service b/overlays/wwinit/rootfs/etc/systemd/system/multi-user.target.wants/wwclient.service similarity index 100% rename from overlays/wwinit/etc/systemd/system/multi-user.target.wants/wwclient.service rename to overlays/wwinit/rootfs/etc/systemd/system/multi-user.target.wants/wwclient.service diff --git a/overlays/wwinit/etc/systemd/system/ww4-disks.target.ww b/overlays/wwinit/rootfs/etc/systemd/system/ww4-disks.target.ww similarity index 100% rename from overlays/wwinit/etc/systemd/system/ww4-disks.target.ww rename to overlays/wwinit/rootfs/etc/systemd/system/ww4-disks.target.ww diff --git a/overlays/wwinit/etc/systemd/system/ww4-mounts.ww b/overlays/wwinit/rootfs/etc/systemd/system/ww4-mounts.ww similarity index 100% rename from overlays/wwinit/etc/systemd/system/ww4-mounts.ww rename to overlays/wwinit/rootfs/etc/systemd/system/ww4-mounts.ww diff --git a/overlays/wwinit/etc/systemd/system/wwclient.service b/overlays/wwinit/rootfs/etc/systemd/system/wwclient.service similarity index 100% rename from overlays/wwinit/etc/systemd/system/wwclient.service rename to overlays/wwinit/rootfs/etc/systemd/system/wwclient.service diff --git a/overlays/wwinit/etc/udev/rules.d/70-ww4-netname.rules.ww b/overlays/wwinit/rootfs/etc/udev/rules.d/70-ww4-netname.rules.ww similarity index 100% rename from overlays/wwinit/etc/udev/rules.d/70-ww4-netname.rules.ww rename to overlays/wwinit/rootfs/etc/udev/rules.d/70-ww4-netname.rules.ww diff --git a/overlays/wwinit/etc/warewulf/warewulf.conf.ww b/overlays/wwinit/rootfs/etc/warewulf/warewulf.conf.ww similarity index 100% rename from overlays/wwinit/etc/warewulf/warewulf.conf.ww rename to overlays/wwinit/rootfs/etc/warewulf/warewulf.conf.ww diff --git a/overlays/wwinit/etc/wicked/ifconfig/ifcfg.xml.ww b/overlays/wwinit/rootfs/etc/wicked/ifconfig/ifcfg.xml.ww similarity index 100% rename from overlays/wwinit/etc/wicked/ifconfig/ifcfg.xml.ww rename to overlays/wwinit/rootfs/etc/wicked/ifconfig/ifcfg.xml.ww diff --git a/overlays/wwinit/init b/overlays/wwinit/rootfs/init similarity index 100% rename from overlays/wwinit/init rename to overlays/wwinit/rootfs/init diff --git a/overlays/wwinit/warewulf/config.ww b/overlays/wwinit/rootfs/warewulf/config.ww similarity index 100% rename from overlays/wwinit/warewulf/config.ww rename to overlays/wwinit/rootfs/warewulf/config.ww diff --git a/overlays/wwinit/warewulf/ignition.json.ww b/overlays/wwinit/rootfs/warewulf/ignition.json.ww similarity index 100% rename from overlays/wwinit/warewulf/ignition.json.ww rename to overlays/wwinit/rootfs/warewulf/ignition.json.ww diff --git a/overlays/wwinit/warewulf/init.d/20-loopback b/overlays/wwinit/rootfs/warewulf/init.d/20-loopback similarity index 100% rename from overlays/wwinit/warewulf/init.d/20-loopback rename to overlays/wwinit/rootfs/warewulf/init.d/20-loopback diff --git a/overlays/wwinit/warewulf/init.d/50-ipmi b/overlays/wwinit/rootfs/warewulf/init.d/50-ipmi similarity index 100% rename from overlays/wwinit/warewulf/init.d/50-ipmi rename to overlays/wwinit/rootfs/warewulf/init.d/50-ipmi diff --git a/overlays/wwinit/warewulf/init.d/75-vnfs_fixes b/overlays/wwinit/rootfs/warewulf/init.d/75-vnfs_fixes similarity index 100% rename from overlays/wwinit/warewulf/init.d/75-vnfs_fixes rename to overlays/wwinit/rootfs/warewulf/init.d/75-vnfs_fixes diff --git a/overlays/wwinit/warewulf/init.d/80-wwclient.ww b/overlays/wwinit/rootfs/warewulf/init.d/80-wwclient.ww similarity index 100% rename from overlays/wwinit/warewulf/init.d/80-wwclient.ww rename to overlays/wwinit/rootfs/warewulf/init.d/80-wwclient.ww diff --git a/overlays/wwinit/warewulf/init.d/90-selinux b/overlays/wwinit/rootfs/warewulf/init.d/90-selinux similarity index 100% rename from overlays/wwinit/warewulf/init.d/90-selinux rename to overlays/wwinit/rootfs/warewulf/init.d/90-selinux diff --git a/overlays/wwinit/warewulf/wwinit b/overlays/wwinit/rootfs/warewulf/wwinit similarity index 100% rename from overlays/wwinit/warewulf/wwinit rename to overlays/wwinit/rootfs/warewulf/wwinit diff --git a/warewulf.spec.in b/warewulf.spec.in index edf08312..026c6ee3 100644 --- a/warewulf.spec.in +++ b/warewulf.spec.in @@ -145,7 +145,12 @@ yq e ' %dir %{_sharedstatedir}/warewulf %{_sharedstatedir}/warewulf/chroots -%{_sharedstatedir}/warewulf/overlays +%dir %{_sharedstatedir}/warewulf/overlays +%dir %{_sharedstatedir}/warewulf/overlays/debug +%dir %{_sharedstatedir}/warewulf/overlays/generic +%dir %{_sharedstatedir}/warewulf/overlays/host +%dir %{_sharedstatedir}/warewulf/overlays/wwinit +%attr(-, root, root) %{_sharedstatedir}/warewulf/overlays/*/rootfs %attr(-, root, root) %{_bindir}/wwctl %attr(-, root, root) %{_bindir}/wwapi*