]> git.proxmox.com Git - pve-manager.git/commitdiff
cleanup: add configs directory and move respective files
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 20 Jun 2018 10:47:01 +0000 (12:47 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 20 Jun 2018 11:04:51 +0000 (13:04 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
16 files changed:
Makefile
configs/Makefile [new file with mode: 0644]
configs/country.pl [new file with mode: 0755]
configs/pve-apt.conf [new file with mode: 0644]
configs/pve-blacklist.conf [new file with mode: 0644]
configs/pve-initramfs.conf [new file with mode: 0644]
configs/pve-sources.list [new file with mode: 0644]
configs/pve.logrotate [new file with mode: 0644]
configs/vzdump.conf [new file with mode: 0644]
country.pl [deleted file]
debian/pve.logrotate [deleted file]
pve-apt.conf [deleted file]
pve-blacklist.conf [deleted file]
pve-initramfs.conf [deleted file]
pve-sources.list [deleted file]
vzdump.conf [deleted file]

index 4b253c3696fdd6ba5f39f1e3186f5871e8fd049d..dbf810a01138a9a0366af35e94141c6df60b80f6 100644 (file)
--- 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@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 (file)
index 0000000..8ee5ba0
--- /dev/null
@@ -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/configs/country.pl b/configs/country.pl
new file mode 100755 (executable)
index 0000000..119a5c7
--- /dev/null
@@ -0,0 +1,82 @@
+#!/usr/bin/perl -w
+
+use strict;
+use PVE::Tools;
+
+# see also: http://en.wikipedia.org/wiki/Keyboard_layout
+#
+# country codes from: /usr/share/zoneinfo/iso3166.tab
+# timezones from: /usr/share/zoneinfo/zone.tab
+# keymaps: find /usr/share/keymaps/i386/ -type f -name '*.kmap.gz'
+# x11 layouts: /usr/share/X11/xkb/rules/xorg.lst
+
+my $country = {};
+
+my $line;
+open (TMP, "</usr/share/zoneinfo/iso3166.tab");
+while (defined ($line = <TMP>)) {
+    if ($line =~ m/^([A-Z][A-Z])\s+(.*\S)\s*$/) {
+       $country->{lc($1)} = $2;
+    }
+}
+close (TMP);
+
+# we need mappings for X11, console, and kvm vnc
+
+# LC(-LC)? => [DESC, kvm, console, X11, X11variant]
+my $keymaps = PVE::Tools::kvmkeymaps();
+
+foreach my $km (sort keys %$keymaps) {
+    my ($desc, $kvm, $console, $x11, $x11var) = @{$keymaps->{$km}};
+
+    if ($km =~m/^([a-z][a-z])-([a-z][a-z])$/i) {
+       defined ($country->{$2}) || die "undefined country code '$2'";
+    } else {
+       defined ($country->{$km}) || die "undefined country code '$km'";
+    }
+
+    $x11var = '' if !defined ($x11var);
+    print "map:$km:$desc:$kvm:$console:$x11:$x11var:\n";
+}
+
+my $defmap = {
+   'us' => 'en-us',
+   'be' => 'fr-be',
+   'br' => 'pt-br',
+   'ca' => 'en-us',
+   'dk' => 'dk',
+   'nl' => 'en-us', # most Dutch people us US layout
+   'fi' => 'fi',
+   'fr' => 'fr',
+   'de' => 'de',
+   'at' => 'de',
+   'hu' => 'hu',
+   'is' => 'is',
+   'it' => 'it',
+   'va' => 'it',
+   'jp' => 'jp',
+   'lt' => 'lt',
+   'mk' => 'mk',
+   'no' => 'no',
+   'pl' => 'pl',
+   'pt' => 'pt',
+   'si' => 'si',
+   'es' => 'es',
+   'gi' => 'es',
+   'ch' => 'de-ch',
+   'gb' => 'en-gb',
+   'lu' => 'fr-ch',
+   'li' => 'de-ch',
+};
+
+
+my $mirrors = PVE::Tools::debmirrors();
+foreach my $cc (keys %$mirrors) {
+    die "undefined country code '$cc'" if !defined ($country->{$cc});
+}
+
+foreach my $cc (sort keys %$country) {
+    my $map = $defmap->{$cc} || '';
+    my $mir = $mirrors->{$cc} || '';
+    print "$cc:$country->{$cc}:$map:$mir:\n";
+}
diff --git a/configs/pve-apt.conf b/configs/pve-apt.conf
new file mode 100644 (file)
index 0000000..0391b74
--- /dev/null
@@ -0,0 +1,7 @@
+APT
+{
+  NeverAutoRemove
+  {
+       "^pve-kernel-.*";
+  };
+}
diff --git a/configs/pve-blacklist.conf b/configs/pve-blacklist.conf
new file mode 100644 (file)
index 0000000..9687961
--- /dev/null
@@ -0,0 +1,4 @@
+# This file contains a list of modules which are not supported by Proxmox VE 
+
+# nidiafb see bugreport https://bugzilla.proxmox.com/show_bug.cgi?id=701
+blacklist nvidiafb
diff --git a/configs/pve-initramfs.conf b/configs/pve-initramfs.conf
new file mode 100644 (file)
index 0000000..fc6bedc
--- /dev/null
@@ -0,0 +1,2 @@
+# disable suspend-to-disk, as it delays boot on systems with root on ZFS
+RESUME=none
diff --git a/configs/pve-sources.list b/configs/pve-sources.list
new file mode 100644 (file)
index 0000000..27c0fbc
--- /dev/null
@@ -0,0 +1 @@
+deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise
diff --git a/configs/pve.logrotate b/configs/pve.logrotate
new file mode 100644 (file)
index 0000000..f5e615b
--- /dev/null
@@ -0,0 +1,14 @@
+/var/log/pveproxy/access.log {
+        rotate 7
+        daily  
+       missingok
+       compress
+       delaycompress
+       notifempty
+       create 640 www-data www-data
+       sharedscripts
+       postrotate
+               /bin/systemctl try-reload-or-restart pveproxy.service
+               /bin/systemctl try-reload-or-restart spiceproxy.service
+       endscript
+}
diff --git a/configs/vzdump.conf b/configs/vzdump.conf
new file mode 100644 (file)
index 0000000..c533030
--- /dev/null
@@ -0,0 +1,17 @@
+# vzdump default settings
+
+#tmpdir: DIR
+#dumpdir: DIR
+#storage: STORAGE_ID
+#mode: snapshot|suspend|stop
+#bwlimit: KBPS
+#ionice: PRI
+#lockwait: MINUTES
+#stopwait: MINUTES
+#size: MB
+#stdexcludes: BOOLEAN
+#mailto: ADDRESSLIST
+#maxfiles: N
+#script: FILENAME
+#exclude-path: PATHLIST
+#pigz: N:
\ No newline at end of file
diff --git a/country.pl b/country.pl
deleted file mode 100755 (executable)
index 119a5c7..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use PVE::Tools;
-
-# see also: http://en.wikipedia.org/wiki/Keyboard_layout
-#
-# country codes from: /usr/share/zoneinfo/iso3166.tab
-# timezones from: /usr/share/zoneinfo/zone.tab
-# keymaps: find /usr/share/keymaps/i386/ -type f -name '*.kmap.gz'
-# x11 layouts: /usr/share/X11/xkb/rules/xorg.lst
-
-my $country = {};
-
-my $line;
-open (TMP, "</usr/share/zoneinfo/iso3166.tab");
-while (defined ($line = <TMP>)) {
-    if ($line =~ m/^([A-Z][A-Z])\s+(.*\S)\s*$/) {
-       $country->{lc($1)} = $2;
-    }
-}
-close (TMP);
-
-# we need mappings for X11, console, and kvm vnc
-
-# LC(-LC)? => [DESC, kvm, console, X11, X11variant]
-my $keymaps = PVE::Tools::kvmkeymaps();
-
-foreach my $km (sort keys %$keymaps) {
-    my ($desc, $kvm, $console, $x11, $x11var) = @{$keymaps->{$km}};
-
-    if ($km =~m/^([a-z][a-z])-([a-z][a-z])$/i) {
-       defined ($country->{$2}) || die "undefined country code '$2'";
-    } else {
-       defined ($country->{$km}) || die "undefined country code '$km'";
-    }
-
-    $x11var = '' if !defined ($x11var);
-    print "map:$km:$desc:$kvm:$console:$x11:$x11var:\n";
-}
-
-my $defmap = {
-   'us' => 'en-us',
-   'be' => 'fr-be',
-   'br' => 'pt-br',
-   'ca' => 'en-us',
-   'dk' => 'dk',
-   'nl' => 'en-us', # most Dutch people us US layout
-   'fi' => 'fi',
-   'fr' => 'fr',
-   'de' => 'de',
-   'at' => 'de',
-   'hu' => 'hu',
-   'is' => 'is',
-   'it' => 'it',
-   'va' => 'it',
-   'jp' => 'jp',
-   'lt' => 'lt',
-   'mk' => 'mk',
-   'no' => 'no',
-   'pl' => 'pl',
-   'pt' => 'pt',
-   'si' => 'si',
-   'es' => 'es',
-   'gi' => 'es',
-   'ch' => 'de-ch',
-   'gb' => 'en-gb',
-   'lu' => 'fr-ch',
-   'li' => 'de-ch',
-};
-
-
-my $mirrors = PVE::Tools::debmirrors();
-foreach my $cc (keys %$mirrors) {
-    die "undefined country code '$cc'" if !defined ($country->{$cc});
-}
-
-foreach my $cc (sort keys %$country) {
-    my $map = $defmap->{$cc} || '';
-    my $mir = $mirrors->{$cc} || '';
-    print "$cc:$country->{$cc}:$map:$mir:\n";
-}
diff --git a/debian/pve.logrotate b/debian/pve.logrotate
deleted file mode 100644 (file)
index f5e615b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/var/log/pveproxy/access.log {
-        rotate 7
-        daily  
-       missingok
-       compress
-       delaycompress
-       notifempty
-       create 640 www-data www-data
-       sharedscripts
-       postrotate
-               /bin/systemctl try-reload-or-restart pveproxy.service
-               /bin/systemctl try-reload-or-restart spiceproxy.service
-       endscript
-}
diff --git a/pve-apt.conf b/pve-apt.conf
deleted file mode 100644 (file)
index 0391b74..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-APT
-{
-  NeverAutoRemove
-  {
-       "^pve-kernel-.*";
-  };
-}
diff --git a/pve-blacklist.conf b/pve-blacklist.conf
deleted file mode 100644 (file)
index 9687961..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# This file contains a list of modules which are not supported by Proxmox VE 
-
-# nidiafb see bugreport https://bugzilla.proxmox.com/show_bug.cgi?id=701
-blacklist nvidiafb
diff --git a/pve-initramfs.conf b/pve-initramfs.conf
deleted file mode 100644 (file)
index fc6bedc..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# disable suspend-to-disk, as it delays boot on systems with root on ZFS
-RESUME=none
diff --git a/pve-sources.list b/pve-sources.list
deleted file mode 100644 (file)
index 27c0fbc..0000000
+++ /dev/null
@@ -1 +0,0 @@
-deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise
diff --git a/vzdump.conf b/vzdump.conf
deleted file mode 100644 (file)
index c533030..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# vzdump default settings
-
-#tmpdir: DIR
-#dumpdir: DIR
-#storage: STORAGE_ID
-#mode: snapshot|suspend|stop
-#bwlimit: KBPS
-#ionice: PRI
-#lockwait: MINUTES
-#stopwait: MINUTES
-#size: MB
-#stdexcludes: BOOLEAN
-#mailto: ADDRESSLIST
-#maxfiles: N
-#script: FILENAME
-#exclude-path: PATHLIST
-#pigz: N:
\ No newline at end of file