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)
dinstall: ${DEB}
dpkg -i ${DEB}
-country.dat: country.pl
- ./country.pl > country.dat
-
.PHONY: deb
deb: $(DEB)
$(DEB):
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
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
--- /dev/null
+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
--- /dev/null
+#!/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";
+}
--- /dev/null
+APT
+{
+ NeverAutoRemove
+ {
+ "^pve-kernel-.*";
+ };
+}
--- /dev/null
+# 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
--- /dev/null
+# disable suspend-to-disk, as it delays boot on systems with root on ZFS
+RESUME=none
--- /dev/null
+deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise
--- /dev/null
+/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
+}
--- /dev/null
+# 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
+++ /dev/null
-#!/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";
-}
+++ /dev/null
-/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
-}
+++ /dev/null
-APT
-{
- NeverAutoRemove
- {
- "^pve-kernel-.*";
- };
-}
+++ /dev/null
-# 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
+++ /dev/null
-# disable suspend-to-disk, as it delays boot on systems with root on ZFS
-RESUME=none
+++ /dev/null
-deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise
+++ /dev/null
-# 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