random-archer / mkinitcpio-systemd-tool

Provisioning tool for systemd in initramfs (systemd-tool)
https://www.archlinux.org/packages/community/any/mkinitcpio-systemd-tool/
Other
113 stars 27 forks source link

Makefile and FHS compliance #30

Closed dvzrv closed 4 years ago

dvzrv commented 4 years ago

To be able to package this project properly, it needs to become FHS compliant.

For this purpose I have created a Makefile, that installs the various files to their correct locations. Certain files had to be relocated, due to their nature (e.g. scripts are not allowed in /etc, services need to be packaged to /usr/lib, network configuration for initrd should not influence the running system) and I think that mkinitcpio-install.sh potentially needs some further adjustments to make this work (feedback is of course very much welcome!).

Ideally the script should derive whatever is enabled or overridden by systemctl cat <service> instead of relying on a hardcoded path and then assemble the required files and services.

Andrei-Pozolotin commented 4 years ago

@dvzrv David:

  1. did you test this change?
  2. please squash commits into 1
dvzrv commented 4 years ago

@Andrei-Pozolotin Now I have. Had to fix some small things here and there.

I've just successfully enabled initrd-network.service, initrd-shell.service and initrd-tinysshd.service to unlock my laptop remotely using this pull request.

Andrei-Pozolotin commented 4 years ago

@dvzrv great, thank you

  1. what should be done regarding Makefile use in PKGBUILD ? https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mkinitcpio-systemd-tool
dvzrv commented 4 years ago

@Andrei-Pozolotin sure thing!

well, once this is merged, you can tag a new version and I could also move this to [community].

Andrei-Pozolotin commented 4 years ago

@dvzrv David:

  1. I granted you admin rights to both https://github.com/random-archer/mkinitcpio-systemd-tool and https://aur.archlinux.org/packages/mkinitcpio-systemd-tool/

  2. please feel free to finalize the transfer the best way you see fit