From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] configs: drop unused country.dat file from install
Date: Thu, 28 Aug 2025 12:35:48 +0200 [thread overview]
Message-ID: <20250828103621.936206-1-c.heiss@proxmox.com> (raw)
I could not find _any_ reference to it in current checkouts of ~every
Proxmox repository.
AFAICT this was copied from pve-installer in pve-installer commit
f0583fd4e ("copied country.pl form pve-manager")
in 2017 and simply never dropped here afterwards, so it's an unused
leftover.
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
That script and file has been long replaced in pve-installer too, FWIW.
Makefile | 2 +-
configs/Makefile | 9 ++----
configs/country.pl | 81 ----------------------------------------------
3 files changed, 3 insertions(+), 89 deletions(-)
delete mode 100755 configs/country.pl
diff --git a/Makefile b/Makefile
index 13fc7c6e0..6c8b82e1a 100644
--- a/Makefile
+++ b/Makefile
@@ -75,7 +75,7 @@ distclean: clean
.PHONY: clean
clean:
set -e && for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
- rm -f $(PACKAGE)*.tar* country.dat *.deb *.dsc *.build *.buildinfo *.changes
+ rm -f $(PACKAGE)*.tar* *.deb *.dsc *.build *.buildinfo *.changes
rm -rf dest $(PACKAGE)-[0-9]*/
.PHONY: dinstall
diff --git a/configs/Makefile b/configs/Makefile
index 6b89e8b3a..0619b97c7 100644
--- a/configs/Makefile
+++ b/configs/Makefile
@@ -1,21 +1,16 @@
include ../defines.mk
-all: country.dat
-
-country.dat: country.pl
- ./country.pl > country.dat
+all:
.PHONY: install
-install: country.dat vzdump.conf pve-sources.sources pve-initramfs.conf pve-blacklist.conf pve.logrotate virtual-function-pinning.rules virtual-function-pinning-helper
+install: vzdump.conf pve-sources.sources pve-initramfs.conf pve-blacklist.conf pve.logrotate virtual-function-pinning.rules virtual-function-pinning-helper
install -D -m 0644 pve.logrotate $(DESTDIR)/etc/logrotate.d/pve
install -D -m 0644 pve-sources.sources $(DESTDIR)/etc/apt/sources.list.d/pve-enterprise.sources
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
install -D -m 0644 proxmox-ve-default.link $(DESTDIR)/usr/lib/systemd/network/99-default.link.d/proxmox-mac-address-policy.conf
install -D -m 0644 virtual-function-pinning.rules $(DESTDIR)/usr/lib/udev/rules.d/70-virtual-function-pinning.rules
install -D -m 0755 virtual-function-pinning-helper $(DESTDIR)/usr/lib/udev/virtual-function-naming-helper
clean:
- rm -f country.dat
diff --git a/configs/country.pl b/configs/country.pl
deleted file mode 100755
index bf74e2c9e..000000000
--- a/configs/country.pl
+++ /dev/null
@@ -1,81 +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";
-}
--
2.50.1
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-08-28 10:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-28 10:35 Christoph Heiss [this message]
2025-08-28 21:24 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250828103621.936206-1-c.heiss@proxmox.com \
--to=c.heiss@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.