all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] configs: drop unused country.dat file from install
@ 2025-08-28 10:35 Christoph Heiss
  2025-08-28 21:24 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Heiss @ 2025-08-28 10:35 UTC (permalink / raw)
  To: pve-devel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH manager] configs: drop unused country.dat file from install
  2025-08-28 10:35 [pve-devel] [PATCH manager] configs: drop unused country.dat file from install Christoph Heiss
@ 2025-08-28 21:24 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2025-08-28 21:24 UTC (permalink / raw)
  To: pve-devel, Christoph Heiss

On Thu, 28 Aug 2025 12:35:48 +0200, Christoph Heiss wrote:
> 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")
> 
> [...]

I could swear I wanted to delete this already once, but really not sure what
happened back then, and as I couldn't remember or find any usage too I applied
it, in the unlikely case that we're both wrong we can just revert this and then
record the actual reason with that.

Applied, thanks!

[1/1] configs: drop unused country.dat file from install
      commit: d9d4cd1f906b02cb06173e7de53405a5a41319c6


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-28 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-28 10:35 [pve-devel] [PATCH manager] configs: drop unused country.dat file from install Christoph Heiss
2025-08-28 21:24 ` [pve-devel] applied: " Thomas Lamprecht

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal