diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 5 insertions, 28 deletions
@@ -46,11 +46,13 @@ src_bin_programs = xorriso-usb.sh btrfs-functions.sh btrfs-receive-root.sh | |||
46 | btrfs-send-root.sh var.sh grub-efi.sh keygen.sh initrd.sh qemu.sh \ | 46 | btrfs-send-root.sh var.sh grub-efi.sh keygen.sh initrd.sh qemu.sh \ |
47 | dnsmasq-dhcp-script.sh samizdat-password-agent samizdat-gpg-agent publish-ip.sh \ | 47 | dnsmasq-dhcp-script.sh samizdat-password-agent samizdat-gpg-agent publish-ip.sh \ |
48 | selfstrap samizdat-daily-snapshot-root samizdat-diff-root kiki-export-stdout \ | 48 | selfstrap samizdat-daily-snapshot-root samizdat-diff-root kiki-export-stdout \ |
49 | kiki-import-stdin store-child-permanently samizdat-ssh-uid $(dyndns_progs) \ | 49 | kiki-import-stdin store-child-permanently $(dyndns_progs) git-ll-remote |
50 | git-ll-remote | ||
51 | 50 | ||
52 | bin_programs=$(addprefix src/, $(src_bin_programs)) samizdat-paths.sh ${cc_files} ${btrfs_utils} | 51 | bin_programs=$(addprefix src/, $(src_bin_programs)) samizdat-paths.sh ${cc_files} ${btrfs_utils} |
53 | 52 | ||
53 | dyndns_programs = cryptonomic-dyndns-command samizdat-ssh-command samizdat-ssh-uid | ||
54 | bin_programs += $(addprefix cryptonomic-dyndns-server/bin/, $(dyndns_programs)) | ||
55 | |||
54 | btrfs_utils=$(addprefix src/btrfs-utils/, btarfs btrfs-shrink with-btrfs-seed) | 56 | btrfs_utils=$(addprefix src/btrfs-utils/, btarfs btrfs-shrink with-btrfs-seed) |
55 | 57 | ||
56 | initrd_files:=$(wildcard src/initrd/*) dynmenu samizdat-pinentry wait_for_files | 58 | initrd_files:=$(wildcard src/initrd/*) dynmenu samizdat-pinentry wait_for_files |
@@ -66,31 +68,6 @@ samizdat-paths.sh: src/samizdat-paths.in | |||
66 | @sed -e "s?PREFIX?$(prefix)?g" $< > $@ | 68 | @sed -e "s?PREFIX?$(prefix)?g" $< > $@ |
67 | include samizdat-paths.sh | 69 | include samizdat-paths.sh |
68 | 70 | ||
69 | DD_USER = dyndns | ||
70 | DD_GROUP = dyndns | ||
71 | |||
72 | install-dyndns-server: | ||
73 | ifneq ($(shell id -u),0) | ||
74 | $(SUDO_MAKE) $@ | ||
75 | else | ||
76 | : apt install pdns | ||
77 | : adduser $(DD_USER) | ||
78 | chown root:$(DD_GROUP) /etc/powerdns | ||
79 | chown pdns:$(DD_GROUP) /etc/powerdns/powerdns.sqlite3 | ||
80 | chmod g+rwx /etc/powerdns | ||
81 | chmod g+rw /etc/powerdns/powerdns.sqlite3 | ||
82 | $(MAKE) ~$(DD_USER)/.ssh/authorized_keys | ||
83 | install src/samizdat-ssh-command /usr/local/bin/ | ||
84 | install src/dyndns-command.sh ~$(DD_USER)/samizdat-default-command | ||
85 | endif | ||
86 | |||
87 | define dyndns_authorized_keys_contents | ||
88 | command="/usr/local/bin/samizdat-ssh-command /etc/powerdns/dyndns-command.sh",no-port-forwarding * Samizdat - YES WE CAN | ||
89 | endef | ||
90 | |||
91 | ~$(DD_USER)/.ssh/authorized_keys: | ||
92 | : writing file $@ $(file >$@,$(dyndns_authorized_keys_contents)) | ||
93 | |||
94 | install-nested-kvm: conf/kvm.conf | 71 | install-nested-kvm: conf/kvm.conf |
95 | install -m0644 conf/kvm.conf ${instdir}/etc/modprobe.d/ | 72 | install -m0644 conf/kvm.conf ${instdir}/etc/modprobe.d/ |
96 | modprobe -r kvm-intel kvm-amd kvm; modprobe kvm; modprobe kvm-intel; modprobe kvm-amd; true | 73 | modprobe -r kvm-intel kvm-amd kvm; modprobe kvm; modprobe kvm-intel; modprobe kvm-amd; true |
@@ -348,7 +325,7 @@ install-submodules-stamp: install-submodules | |||
348 | touch $@ | 325 | touch $@ |
349 | 326 | ||
350 | install-bin-programs: ${bin_programs} | 327 | install-bin-programs: ${bin_programs} |
351 | install -p ${bin_programs} ${instdir}${samizdat_bindir} | 328 | install -D -p -t ${instdir}${samizdat_bindir} ${bin_programs} |
352 | 329 | ||
353 | CP=cp --preserve=timestamps -r | 330 | CP=cp --preserve=timestamps -r |
354 | 331 | ||