diff --git a/.gitignore b/.gitignore index 34d5af178f..4b92085496 100644 --- a/.gitignore +++ b/.gitignore @@ -55,7 +55,6 @@ test-*.trs /config.* /config-extra.h /configure -/intltool-* /confdefs.h /conftest.[ch] @@ -192,7 +191,6 @@ test-*.trs /m4/intl.m4 /m4/intldir.m4 /m4/intlmacosx.m4 -/m4/intltool.m4 /m4/intmax.m4 /m4/inttypes-pri.m4 /m4/inttypes_h.m4 @@ -226,7 +224,6 @@ test-*.trs /man/common.ent /po/*.gmo -/po/.intltool-merge-cache /po/NetworkManager.pot /po/Makevars.template /po/Rules-quot @@ -483,3 +480,6 @@ test-*.trs /src/tests/test-systemd /src/tests/test-utils /src/tests/test-wired-defname +/intltool-* +/m4/intltool.m4 +/po/.intltool-merge-cache diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1327527c0b..cc3b9488f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ ######################################## # # # THIS FILE IS GENERATED, DO NOT EDIT # +# Edit .gitlab-ci/ci.template instead # # # ######################################## @@ -45,13 +46,13 @@ variables: # changing these will force rebuilding the associated image # Note: these tags have no meaning and are not tied to a particular NM version # - # This is done by running `ci-fairy generate-template` and possibly bump + # This is done by running `ci-fairy generate-template` and possibly bumping # ".default_tag". - FEDORA_TAG: '2022-06-25.1-c968ffde7c4c' - UBUNTU_TAG: '2022-06-25.1-91c79dfac3d1' - DEBIAN_TAG: '2022-06-25.1-91c79dfac3d1' - CENTOS_TAG: '2022-06-25.1-c968ffde7c4c' - ALPINE_TAG: '2022-06-25.1-58b83b32e0c4' + FEDORA_TAG: '2022-06-27.0-8441692e0ce9' + UBUNTU_TAG: '2022-06-27.0-d5ae0b779ff0' + DEBIAN_TAG: '2022-06-27.0-d5ae0b779ff0' + CENTOS_TAG: '2022-06-27.0-8441692e0ce9' + ALPINE_TAG: '2022-06-27.0-be0e42c19eb0' FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh' UBUNTU_EXEC: 'bash .gitlab-ci/debian-install.sh' @@ -167,16 +168,6 @@ fedora:37@container-prep: FDO_DISTRIBUTION_TAG: $FEDORA_TAG FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC -ubuntu:16.04@container-prep: - extends: - - .fdo.container-build@ubuntu - stage: prep - variables: - GIT_STRATEGY: none - FDO_DISTRIBUTION_VERSION: '16.04' - FDO_DISTRIBUTION_TAG: $UBUNTU_TAG - FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC - ubuntu:18.04@container-prep: extends: - .fdo.container-build@ubuntu @@ -473,15 +464,6 @@ fedora:37@container-clean: FDO_DISTRIBUTION_VERSION: '37' FDO_DISTRIBUTION_TAG: $FEDORA_TAG -ubuntu:16.04@container-clean: - extends: - - .container-clean - variables: - GIT_STRATEGY: none - CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG - FDO_DISTRIBUTION_VERSION: '16.04' - FDO_DISTRIBUTION_TAG: $UBUNTU_TAG - ubuntu:18.04@container-clean: extends: - .container-clean @@ -773,18 +755,6 @@ t_fedora:37: - "fedora:37@container-prep" when: manual -t_ubuntu:16.04: - extends: - - .build@template - - .fdo.distribution-image@ubuntu - - .nm_artifacts_debug - variables: - FDO_DISTRIBUTION_VERSION: '16.04' - FDO_DISTRIBUTION_TAG: $UBUNTU_TAG - needs: - - "ubuntu:16.04@container-prep" - when: manual - t_ubuntu:18.04: extends: - .build@template diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index 68b35849d4..094bf8b58f 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -5,6 +5,7 @@ ######################################## # # # THIS FILE IS GENERATED, DO NOT EDIT # +# Edit .gitlab-ci/ci.template instead # # # ######################################## @@ -33,7 +34,7 @@ variables: # changing these will force rebuilding the associated image # Note: these tags have no meaning and are not tied to a particular NM version # - # This is done by running `ci-fairy generate-template` and possibly bump + # This is done by running `ci-fairy generate-template` and possibly bumping # ".default_tag". {% for distro in distributions %} {{"%-13s"| format(distro.name.upper() + '_TAG:')}}'{{distro.tag}}-{{ diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml index ed53abd558..d150d2fe06 100644 --- a/.gitlab-ci/config.yml +++ b/.gitlab-ci/config.yml @@ -8,7 +8,7 @@ # # We're happy to rebuild all containers when one changes. -.default_tag: &default_tag '2022-06-25.1' +.default_tag: &default_tag '2022-06-27.0' # The list of all distributions we want to create job for. @@ -30,7 +30,6 @@ distributions: tag: *default_tag base_type: debian versions: - - '16.04' - '18.04' - '20.04' - '22.04' diff --git a/.gitlab-ci/debian-install.sh b/.gitlab-ci/debian-install.sh index 7046400e4e..446b6c3eba 100755 --- a/.gitlab-ci/debian-install.sh +++ b/.gitlab-ci/debian-install.sh @@ -2,7 +2,6 @@ set -ex -grep -q '^VERSION=.16.04.[0-9]\+ LTS' /etc/os-release && IS_UBUNTU_1604=1 || IS_UBUNTU_1604=0 grep -q '^VERSION=.\(9 (stretch)\|18.04.[0-9]\+ LTS\)' /etc/os-release && IS_DEBIAN_9=1 || IS_DEBIAN_9=0 if [ $IS_DEBIAN_9 = 1 ]; then @@ -28,12 +27,7 @@ dbus-uuidgen --ensure sed -i 's/^# \(pl_PL.UTF-8 .*\)$/\1/p' /etc/locale.gen || true locale-gen pl_PL.UTF-8 -if [ $IS_UBUNTU_1604 = 1 ]; then - pip3 install meson==0.53.2 - contrib/scripts/nm-ci-install-valgrind-in-ubuntu1604.sh -else - pip3 install meson -fi +pip3 install meson # iproute2 5.2.0 on debian:sid causes our unit tests to fail. # Downgrade to a working version. See https://www.spinics.net/lists/netdev/msg584916.html diff --git a/.gitlab-ci/run-test.sh b/.gitlab-ci/run-test.sh index be725133f6..0e2f3f52ef 100755 --- a/.gitlab-ci/run-test.sh +++ b/.gitlab-ci/run-test.sh @@ -20,6 +20,9 @@ fi do_clean() { git clean -fdx + # "make -C update-po", run on "make dist" has a silly habit of + # modifying files in-tree. Lets undo that. + git checkout -- po/ } uname -a diff --git a/Makefile.am b/Makefile.am index 45f4e216e5..355984abae 100644 --- a/Makefile.am +++ b/Makefile.am @@ -170,8 +170,6 @@ endif dist: $(dist_configure_check) $(dist_dependencies) -DISTCLEANFILES += intltool-extract intltool-merge intltool-update - ############################################################################### install-data-hook-dirs: @@ -213,9 +211,12 @@ polkit_policydir = $(datadir)/polkit-1/actions dist_polkit_policy_in_in_files = \ data/org.freedesktop.NetworkManager.policy.in.in -polkit_policy_DATA = $(dist_polkit_policy_in_in_files:.policy.in.in=.policy) +dist_polkit_policy_in_files = $(dist_polkit_policy_in_in_files:.policy.in.in=.policy.in) -@INTLTOOL_POLICY_RULE@ +polkit_policy_DATA = $(dist_polkit_policy_in_files:.policy.in=.policy) + +$(polkit_policy_DATA): $(dist_polkit_policy_in_files) + $(AM_V_GEN)$(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ DISTCLEANFILES += $(polkit_policy_DATA) @@ -5603,9 +5604,6 @@ EXTRA_DIST += \ COPYING.LGPL \ COPYING.GFDL \ \ - intltool-extract.in \ - intltool-merge.in \ - intltool-update.in \ linker-script-binary.ver \ linker-script-devices.ver \ linker-script-settings.ver \ diff --git a/autogen.sh b/autogen.sh index 8809806178..7973c51ea3 100755 --- a/autogen.sh +++ b/autogen.sh @@ -23,8 +23,7 @@ PKG_NAME=NetworkManager cd $srcdir gtkdocize -autopoint --force -AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose +autoreconf --verbose --force --install cd $olddir if test -z "$NOCONFIGURE"; then diff --git a/configure.ac b/configure.ac index fcfbb03ed1..e2f47cd2ae 100644 --- a/configure.ac +++ b/configure.ac @@ -138,10 +138,10 @@ AC_CHECK_DECLS([getrandom], dnl dnl translation support dnl -IT_PROG_INTLTOOL([0.40.0]) - AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.17]) +# Remove AM_GNU_GETTEXT_VERSION once autoreconf supports REQUIRE_VERSION +AM_GNU_GETTEXT_VERSION([0.19.8]) +AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8]) GETTEXT_PACKAGE=NetworkManager AC_SUBST(GETTEXT_PACKAGE) diff --git a/contrib/debian/REQUIRED_PACKAGES b/contrib/debian/REQUIRED_PACKAGES index 9c5f294cd3..5983cbc741 100755 --- a/contrib/debian/REQUIRED_PACKAGES +++ b/contrib/debian/REQUIRED_PACKAGES @@ -95,11 +95,3 @@ install_ignore_missing \ libgcrypt11-dev \ \ #end - -# Old. Present in Ubuntu 16.04, not in Ubuntu 18.04 -# software-properties-common -install_ignore_missing \ - libgnutls-dev \ - python-software-properties \ - \ - #end diff --git a/contrib/fedora/REQUIRED_PACKAGES b/contrib/fedora/REQUIRED_PACKAGES index 112b01bd2a..637d47e979 100755 --- a/contrib/fedora/REQUIRED_PACKAGES +++ b/contrib/fedora/REQUIRED_PACKAGES @@ -58,7 +58,6 @@ install \ gnutls-devel \ gobject-introspection-devel \ gtk-doc \ - intltool \ iptables \ jansson-devel \ libcurl-devel \ diff --git a/contrib/fedora/rpm/NetworkManager.spec b/contrib/fedora/rpm/NetworkManager.spec index 01ff26cc24..f31259722c 100644 --- a/contrib/fedora/rpm/NetworkManager.spec +++ b/contrib/fedora/rpm/NetworkManager.spec @@ -256,8 +256,7 @@ BuildRequires: meson BuildRequires: automake BuildRequires: autoconf %endif -BuildRequires: intltool -BuildRequires: gettext-devel +BuildRequires: gettext-devel >= 0.19.8 BuildRequires: dbus-devel >= %{dbus_version} BuildRequires: glib2-devel >= 2.40.0 @@ -748,7 +747,6 @@ Preferably use nmcli instead. gtkdocize %endif autoreconf --install --force -intltoolize --automake --copy --force %configure \ --with-runstatedir=%{_rundir} \ --disable-silent-rules \ diff --git a/contrib/scripts/nm-ci-install-valgrind-in-ubuntu1604.sh b/contrib/scripts/nm-ci-install-valgrind-in-ubuntu1604.sh deleted file mode 100755 index 864cce04be..0000000000 --- a/contrib/scripts/nm-ci-install-valgrind-in-ubuntu1604.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -set -exv - -# Ubuntu 16.04 (trusty) ships a valgrind version where __get_cpuid() announces -# rdrand support, but later valgrind crashes with unsupported opcode. -# -# See https://bugs.kde.org/show_bug.cgi?id=353370#c9 -# https://bugs.launchpad.net/ubuntu/+source/valgrind/+bug/1501545 -# -# We call rdrand for hash-tables of systemd: -# https://github.com/systemd/systemd/blob/e7b621ee1f1abfbcaae1cd17da4d815daf218679/src/basic/random-util.c#L36 -# -# Work around that by installing valgrind from bionic. - -grep -q 'PRETTY_NAME="Ubuntu 16.04.[0-9]\+ LTS"' /etc/os-release || exit 0 -dpkg -s valgrind | grep -q 'Version: 1:3.11.0-1ubuntu4.2$' || exit 0 - - -cat < /etc/apt/sources.list.d/bionic1804.list -deb http://us.archive.ubuntu.com/ubuntu/ bionic main -EOF - -cat < /etc/apt/preferences.d/bionic1804.pref -Package: * -Pin: release n=bionic -Pin-Priority: -10 - -Package: valgrind -Pin: release n=bionic -Pin-Priority: 500 -EOF - -apt-get update - -apt-get install valgrind -y diff --git a/data/meson.build b/data/meson.build index 35e3de5254..d617025a25 100644 --- a/data/meson.build +++ b/data/meson.build @@ -59,11 +59,10 @@ if enable_polkit configuration: data_conf, ) - custom_target( - policy, + i18n.merge_file( input: policy_in, output: '@BASENAME@', - command: intltool_xml_cmd, + po_dir: po_dir, install: true, install_dir: polkit_gobject_policydir, ) diff --git a/data/org.freedesktop.NetworkManager.policy.in.in b/data/org.freedesktop.NetworkManager.policy.in.in index 8d46dac735..13a0a5b504 100644 --- a/data/org.freedesktop.NetworkManager.policy.in.in +++ b/data/org.freedesktop.NetworkManager.policy.in.in @@ -10,8 +10,8 @@ nm-icon - <_description>Enable or disable system networking - <_message>System policy prevents enabling or disabling system networking + Enable or disable system networking + System policy prevents enabling or disabling system networking no yes @@ -19,8 +19,8 @@ - <_description>Reload NetworkManager configuration - <_message>System policy prevents reloading NetworkManager + Reload NetworkManager configuration + System policy prevents reloading NetworkManager auth_admin_keep auth_admin_keep @@ -29,8 +29,8 @@ - <_description>Put NetworkManager to sleep or wake it up (should only be used by system power management) - <_message>System policy prevents putting NetworkManager to sleep or waking it up + Put NetworkManager to sleep or wake it up (should only be used by system power management) + System policy prevents putting NetworkManager to sleep or waking it up no no @@ -38,8 +38,8 @@ - <_description>Enable or disable Wi-Fi devices - <_message>System policy prevents enabling or disabling Wi-Fi devices + Enable or disable Wi-Fi devices + System policy prevents enabling or disabling Wi-Fi devices no yes @@ -47,8 +47,8 @@ - <_description>Enable or disable mobile broadband devices - <_message>System policy prevents enabling or disabling mobile broadband devices + Enable or disable mobile broadband devices + System policy prevents enabling or disabling mobile broadband devices no yes @@ -56,8 +56,8 @@ - <_description>Enable or disable WiMAX mobile broadband devices - <_message>System policy prevents enabling or disabling WiMAX mobile broadband devices + Enable or disable WiMAX mobile broadband devices + System policy prevents enabling or disabling WiMAX mobile broadband devices no yes @@ -65,8 +65,8 @@ - <_description>Allow control of network connections - <_message>System policy prevents control of network connections + Allow control of network connections + System policy prevents control of network connections auth_admin yes @@ -75,8 +75,8 @@ - <_description>Allow control of Wi-Fi scans - <_message>System policy prevents Wi-Fi scans + Allow control of Wi-Fi scans + System policy prevents Wi-Fi scans auth_admin yes @@ -85,8 +85,8 @@ - <_description>Connection sharing via a protected Wi-Fi network - <_message>System policy prevents sharing connections via a protected Wi-Fi network + Connection sharing via a protected Wi-Fi network + System policy prevents sharing connections via a protected Wi-Fi network no yes @@ -94,8 +94,8 @@ - <_description>Connection sharing via an open Wi-Fi network - <_message>System policy prevents sharing connections via an open Wi-Fi network + Connection sharing via an open Wi-Fi network + System policy prevents sharing connections via an open Wi-Fi network no yes @@ -103,8 +103,8 @@ - <_description>Modify personal network connections - <_message>System policy prevents modification of personal network settings + Modify personal network connections + System policy prevents modification of personal network settings auth_self_keep yes @@ -113,8 +113,8 @@ - <_description>Modify network connections for all users - <_message>System policy prevents modification of network settings for all users + Modify network connections for all users + System policy prevents modification of network settings for all users auth_admin_keep @NM_MODIFY_SYSTEM_POLICY@ @@ -123,8 +123,8 @@ - <_description>Modify persistent system hostname - <_message>System policy prevents modification of the persistent system hostname + Modify persistent system hostname + System policy prevents modification of the persistent system hostname auth_admin_keep auth_admin_keep @@ -133,8 +133,8 @@ - <_description>Modify persistent global DNS configuration - <_message>System policy prevents modification of the persistent global DNS configuration + Modify persistent global DNS configuration + System policy prevents modification of the persistent global DNS configuration auth_admin_keep auth_admin_keep @@ -143,8 +143,8 @@ - <_description>Perform a checkpoint or rollback of interfaces configuration - <_message>System policy prevents the creation of a checkpoint or its rollback + Perform a checkpoint or rollback of interfaces configuration + System policy prevents the creation of a checkpoint or its rollback auth_admin_keep auth_admin_keep @@ -153,8 +153,8 @@ - <_description>Enable or disable device statistics - <_message>System policy prevents enabling or disabling device statistics + Enable or disable device statistics + System policy prevents enabling or disabling device statistics no yes @@ -162,8 +162,8 @@ - <_description>Enable or disable connectivity checking - <_message>System policy prevents enabling or disabling connectivity checking + Enable or disable connectivity checking + System policy prevents enabling or disabling connectivity checking no yes diff --git a/meson.build b/meson.build index 0aa3c03a3c..cd8a35db26 100644 --- a/meson.build +++ b/meson.build @@ -78,11 +78,6 @@ build_root = meson.current_build_dir() po_dir = join_paths(meson.source_root(), 'po') -intltool_merge = find_program('intltool-merge') -intltool_cache = join_paths(po_dir, '.intltool-merge-cache') -intltool_desktop_cmd = [intltool_merge, '-d', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@'] -intltool_xml_cmd = [intltool_merge, '-x', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@'] - top_inc = include_directories('.') perl = find_program('perl') diff --git a/po/Makevars b/po/Makevars new file mode 100644 index 0000000000..ebd690f6bd --- /dev/null +++ b/po/Makevars @@ -0,0 +1,78 @@ +# Makefile variables for PO directory in any package using GNU gettext. + +# Usually the message domain is the same as the package name. +DOMAIN = $(PACKAGE) + +# These two variables depend on the location of this directory. +subdir = po +top_builddir = .. + +# These options get passed to xgettext. +XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments + +# This is the copyright holder that gets inserted into the header of the +# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding +# package. (Note that the msgstr strings, extracted from the package's +# sources, belong to the copyright holder of the package.) Translators are +# expected to transfer the copyright for their translations to this person +# or entity, or to disclaim their copyright. The empty string stands for +# the public domain; in this case the translators are expected to disclaim +# their copyright. +COPYRIGHT_HOLDER = The NetworkManager Authors. + +# This tells whether or not to prepend "GNU " prefix to the package +# name that gets inserted into the header of the $(DOMAIN).pot file. +# Possible values are "yes", "no", or empty. If it is empty, try to +# detect it automatically by scanning the files in $(top_srcdir) for +# "GNU packagename" string. +PACKAGE_GNU = no + +# This is the email address or URL to which the translators shall report +# bugs in the untranslated strings: +# - Strings which are not entire sentences, see the maintainer guidelines +# in the GNU gettext documentation, section 'Preparing Strings'. +# - Strings which use unclear terms or require additional context to be +# understood. +# - Strings which make invalid assumptions about notation of date, time or +# money. +# - Pluralisation problems. +# - Incorrect English spelling. +# - Incorrect formatting. +# It can be your email address, or a mailing list address where translators +# can write to without being subscribed, or the URL of a web page through +# which the translators can contact you. +MSGID_BUGS_ADDRESS = https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues + +# This is the list of locale categories, beyond LC_MESSAGES, for which the +# message catalogs shall be used. It is usually empty. +EXTRA_LOCALE_CATEGORIES = + +# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' +# context. Possible values are "yes" and "no". Set this to yes if the +# package uses functions taking also a message context, like pgettext(), or +# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. +USE_MSGCTXT = yes + +# These options get passed to msgmerge. +# Useful options are in particular: +# --previous to keep previous msgids of translated messages, +# --quiet to reduce the verbosity. +MSGMERGE_OPTIONS = + +# These options get passed to msginit. +# If you want to disable line wrapping when writing PO files, add +# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and +# MSGINIT_OPTIONS. +MSGINIT_OPTIONS = + +# This tells whether or not to regenerate a PO file when $(DOMAIN).pot +# has changed. Possible values are "yes" and "no". Set this to no if +# the POT file is checked in the repository and the version control +# program ignores timestamps. +PO_DEPENDS_ON_POT = no + +# This tells whether or not to forcibly update $(DOMAIN).pot and +# regenerate PO files on "make dist". Possible values are "yes" and +# "no". Set this to no if the POT file and PO files are maintained +# externally. +DIST_DEPENDS_ON_UPDATE_PO = yes diff --git a/po/POTFILES.in b/po/POTFILES.in index 151f58fca9..c7b1c90d9f 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,4 +1,3 @@ -[encoding: UTF-8] # List of source files containing translatable strings. # Please keep this file sorted alphabetically. data/org.freedesktop.NetworkManager.policy.in.in