[pve-devel] [PATCH manager 4/6] cleanup: add configs directory and move respective files

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jun 20 12:47:01 CEST 2018


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 Makefile                                      | 15 ++-------------
 configs/Makefile                              | 19 +++++++++++++++++++
 country.pl => configs/country.pl              |  0
 pve-apt.conf => configs/pve-apt.conf          |  0
 .../pve-blacklist.conf                        |  0
 .../pve-initramfs.conf                        |  0
 pve-sources.list => configs/pve-sources.list  |  0
 {debian => configs}/pve.logrotate             |  0
 vzdump.conf => configs/vzdump.conf            |  0
 9 files changed, 21 insertions(+), 13 deletions(-)
 create mode 100644 configs/Makefile
 rename country.pl => configs/country.pl (100%)
 rename pve-apt.conf => configs/pve-apt.conf (100%)
 rename pve-blacklist.conf => configs/pve-blacklist.conf (100%)
 rename pve-initramfs.conf => configs/pve-initramfs.conf (100%)
 rename pve-sources.list => configs/pve-sources.list (100%)
 rename {debian => configs}/pve.logrotate (100%)
 rename vzdump.conf => configs/vzdump.conf (100%)

diff --git a/Makefile b/Makefile
index 4b253c36..dbf810a0 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
 
 DESTDIR=
 
-SUBDIRS = aplinfo PVE bin www services
+SUBDIRS = aplinfo PVE bin www services configs
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 GITVERSION:=$(shell git rev-parse HEAD)
@@ -20,9 +20,6 @@ check:
 dinstall: ${DEB}
 	dpkg -i ${DEB}
 
-country.dat: country.pl
-	./country.pl > country.dat
-
 .PHONY: deb
 deb: $(DEB)
 $(DEB):
@@ -41,9 +38,8 @@ upload: ${DEB} check
 	tar cf - ${DEB} | ssh -X repoman at repo.proxmox.com upload --product pve --dist stretch
 
 .PHONY: install
-install: country.dat vzdump.conf vzdump-hook-script.pl pve-apt.conf mtu bridgevlan bridgevlanport vlan vlan-down
+install: vzdump-hook-script.pl mtu bridgevlan bridgevlanport vlan vlan-down
 	install -d -m 0700 -o www-data -g www-data ${DESTDIR}/var/log/pveproxy
-	install -D -m 0644 debian/pve.logrotate ${DESTDIR}/etc/logrotate.d/pve
 	install -d ${DESTDIR}/usr/share/${PACKAGE}
 	install -d ${DESTDIR}/usr/share/man/man1
 	install -d ${DOCDIR}/examples
@@ -52,21 +48,14 @@ install: country.dat vzdump.conf vzdump-hook-script.pl pve-apt.conf mtu bridgevl
 	install -d ${DESTDIR}/var/lib/vz/template/cache
 	install -d ${DESTDIR}/var/lib/vz/template/iso
 	install -d ${DESTDIR}/var/lib/vz/template/qemu
-	install -D -m 0644 pve-apt.conf ${DESTDIR}/etc/apt/apt.conf.d/75pveconf
-	install -D -m 0644 pve-sources.list ${DESTDIR}/etc/apt/sources.list.d/pve-enterprise.list
-	install -D -m 0644 pve-blacklist.conf ${DESTDIR}/etc/modprobe.d/pve-blacklist.conf
-	install -D -m 0644 vzdump.conf ${DESTDIR}/etc/vzdump.conf
 	install -D -m 0755 mtu ${DESTDIR}/etc/network/if-up.d/mtu
 	install -D -m 0755 bridgevlan ${DESTDIR}/etc/network/if-up.d/bridgevlan
 	install -D -m 0755 bridgevlanport ${DESTDIR}/etc/network/if-up.d/bridgevlanport
 	install -D -m 0755 vlan ${DESTDIR}/etc/network/if-pre-up.d/vlan
 	install -D -m 0755 vlan-down ${DESTDIR}/etc/network/if-post-down.d/vlan
 
-	install -D -m 0644 pve-initramfs.conf ${DESTDIR}/etc/initramfs-tools/conf.d/pve-initramfs.conf
-
 	install -m 0644 vzdump-hook-script.pl ${DOCDIR}/examples/vzdump-hook-script.pl
 	install -m 0644 spice-example-sh ${DOCDIR}/examples/spice-example-sh
-	install -m 0644 country.dat ${DESTDIR}/usr/share/${PACKAGE}
 
 	set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
 
diff --git a/configs/Makefile b/configs/Makefile
new file mode 100644
index 00000000..8ee5ba05
--- /dev/null
+++ b/configs/Makefile
@@ -0,0 +1,19 @@
+include ../defines.mk
+
+all:
+
+country.dat: country.pl
+	./country.pl > country.dat
+
+.PHONY: install
+install: country.dat vzdump.conf pve-apt.conf pve-sources.list pve-initramfs.conf pve-blacklist.conf pve.logrotate
+	install -D -m 0644 pve.logrotate ${DESTDIR}/etc/logrotate.d/pve
+	install -D -m 0644 pve-apt.conf ${DESTDIR}/etc/apt/apt.conf.d/75pveconf
+	install -D -m 0644 pve-sources.list ${DESTDIR}/etc/apt/sources.list.d/pve-enterprise.list
+	install -D -m 0644 pve-blacklist.conf ${DESTDIR}/etc/modprobe.d/pve-blacklist.conf
+	install -D -m 0644 vzdump.conf ${DESTDIR}/etc/vzdump.conf
+	install -D -m 0644 pve-initramfs.conf ${DESTDIR}/etc/initramfs-tools/conf.d/pve-initramfs.conf
+	install -D -m 0644 country.dat ${DESTDIR}/usr/share/${PACKAGE}/country.dat
+
+clean:
+	rm -f country.dat
diff --git a/country.pl b/configs/country.pl
similarity index 100%
rename from country.pl
rename to configs/country.pl
diff --git a/pve-apt.conf b/configs/pve-apt.conf
similarity index 100%
rename from pve-apt.conf
rename to configs/pve-apt.conf
diff --git a/pve-blacklist.conf b/configs/pve-blacklist.conf
similarity index 100%
rename from pve-blacklist.conf
rename to configs/pve-blacklist.conf
diff --git a/pve-initramfs.conf b/configs/pve-initramfs.conf
similarity index 100%
rename from pve-initramfs.conf
rename to configs/pve-initramfs.conf
diff --git a/pve-sources.list b/configs/pve-sources.list
similarity index 100%
rename from pve-sources.list
rename to configs/pve-sources.list
diff --git a/debian/pve.logrotate b/configs/pve.logrotate
similarity index 100%
rename from debian/pve.logrotate
rename to configs/pve.logrotate
diff --git a/vzdump.conf b/configs/vzdump.conf
similarity index 100%
rename from vzdump.conf
rename to configs/vzdump.conf
-- 
2.17.1





More information about the pve-devel mailing list