diff options
40 files changed, 308 insertions, 192 deletions
diff --git a/Makefile.am b/Makefile.am index 1cc657acca..ec711bd184 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2816,9 +2816,6 @@ systemd_detect_virt_SOURCES = \ systemd_detect_virt_LDADD = \ libsystemd-shared.la -INSTALL_EXEC_HOOKS += \ - systemd-detect-virt-install-hook - # ------------------------------------------------------------------------------ systemd_delta_SOURCES = \ src/delta/delta.c @@ -3610,9 +3607,9 @@ test_resolve_LDADD = \ libsystemd-shared.la busctl_SOURCES = \ - src/libsystemd/sd-bus/busctl.c \ - src/libsystemd/sd-bus/busctl-introspect.c \ - src/libsystemd/sd-bus/busctl-introspect.h + src/busctl/busctl.c \ + src/busctl/busctl-introspect.c \ + src/busctl/busctl-introspect.h busctl_LDADD = \ libsystemd-shared.la @@ -3881,7 +3878,7 @@ src/udev/keyboard-keys-list.txt: $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($$2 != "KEY_MAX") { print $$2 } }' > $@ src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys-list.txt - $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@ + $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key_name { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@ src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf $(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@ @@ -5024,10 +5021,6 @@ systemd_localed_LDADD = \ libsystemd-shared.la \ -ldl -systemd_localed_CFLAGS = \ - $(AM_CFLAGS) \ - $(XKBCOMMON_CFLAGS) - nodist_systemunit_DATA += \ units/systemd-localed.service @@ -5084,8 +5077,6 @@ dist_zshcompletion_data += \ shell-completion/zsh/_localectl endif -.PHONY: update-kbd-model-map - polkitpolicy_in_files += \ src/locale/org.freedesktop.locale1.policy.in @@ -6275,7 +6266,6 @@ substitutions = \ '|exec_prefix=$(exec_prefix)|' \ '|libdir=$(libdir)|' \ '|includedir=$(includedir)|' \ - '|VERSION=$(VERSION)|' \ '|rootprefix=$(rootprefix)|' \ '|udevlibexecdir=$(udevlibexecdir)|' \ '|SUSHELL=$(SUSHELL)|' \ @@ -6406,7 +6396,7 @@ XSLTPROC_FLAGS = \ --stringparam funcsynopsis.style ansi \ --stringparam man.authors.section.enabled 0 \ --stringparam man.copyright.section.enabled 0 \ - --stringparam systemd.version $(VERSION) \ + --stringparam systemd.version $(PACKAGE_VERSION) \ --path '$(builddir)/man:$(srcdir)/man' XSLT = $(if $(XSLTPROC), $(XSLTPROC), xsltproc) @@ -6640,11 +6630,11 @@ built-sources: $(BUILT_SOURCES) .PHONY: git-tag git-tag: - git tag -s "v$(VERSION)" -m "systemd $(VERSION)" + git tag -s "v$(PACKAGE_VERSION)" -m "systemd $(PACKAGE_VERSION)" .PHONY: git-tar git-tar: - git archive -o systemd-$(VERSION).tar.gz --prefix=systemd-$(VERSION)/ HEAD + git archive -o systemd-$(PACKAGE_VERSION).tar.gz --prefix=systemd-$(PACKAGE_VERSION)/ HEAD %.asc: % gpg2 --detach-sign -a -o $@ $< diff --git a/configure.ac b/configure.ac index cf37ca6493..4f139adc78 100644 --- a/configure.ac +++ b/configure.ac @@ -1113,7 +1113,7 @@ if test "x$enable_logind" != "xno"; then have_logind=yes fi AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"]) -AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ]) +AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(ENABLE_LOGIND, [1], [Logind support available]) ]) AC_ARG_WITH([kill-user-processes], [AS_HELP_STRING([--without-kill-user-processes], [set logind's KillUserProcesses=no by default])]) @@ -1674,7 +1674,7 @@ AC_CONFIG_FILES([ AC_OUTPUT AC_MSG_RESULT([ - $PACKAGE_NAME $VERSION + $PACKAGE_NAME $PACKAGE_VERSION libcryptsetup: ${have_libcryptsetup} PAM: ${have_pam} diff --git a/hwdb/60-sensor.hwdb b/hwdb/60-sensor.hwdb index 454f403761..2436ca7367 100644 --- a/hwdb/60-sensor.hwdb +++ b/hwdb/60-sensor.hwdb @@ -47,6 +47,9 @@ sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP500LB* ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 0 +sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP300LJ* + ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1 + ######################################### # Endless ######################################### diff --git a/man/sd_journal_get_catalog.xml b/man/sd_journal_get_catalog.xml index 604deb4e8c..92ed0dea06 100644 --- a/man/sd_journal_get_catalog.xml +++ b/man/sd_journal_get_catalog.xml @@ -114,7 +114,7 @@ <para>Function <function>sd_journal_get_catalog()</function> is thread-agnostic and only a single thread may operate on a given <structname>sd_journal</structname> object. Function - <function>sd_journal_get_catalog_for_message_id() is thread-safe.</function></para> + <function>sd_journal_get_catalog_for_message_id()</function> is thread-safe.</para> <para>The <function>sd_journal_get_catalog()</function> and <function>sd_journal_get_catalog_for_message_id()</function> diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml index fb64cd6d8e..8c4988abe7 100644 --- a/man/systemd.exec.xml +++ b/man/systemd.exec.xml @@ -352,7 +352,7 @@ assignments have no effect. Variable expansion is not performed inside the strings, however, specifier expansion is possible. The $ character has no special meaning. If you need - to assign a value containing spaces to a variable, use double + to assign a value containing spaces or the equals sign to a variable, use double quotes (") for the assignment.</para> <para>Example: diff --git a/man/systemd.network.xml b/man/systemd.network.xml index 61bed263e5..971dee338f 100644 --- a/man/systemd.network.xml +++ b/man/systemd.network.xml @@ -1257,7 +1257,18 @@ <para>Sets the "cost" of sending packets of this interface. Each port in a bridge may have a different speed and the cost is used to decide which link to use. Faster interfaces - should have lower costs.</para> + should have lower costs. It is an interger value between 1 and + 65535.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><varname>Priority=</varname></term> + <listitem> + <para>Sets the "priority" of sending packets on this interface. + Each port in a bridge may have a different priority which is used + to decide which link to use. Lower value means higher priority. + It is an interger value between 0 to 63. Networkd does not set any + default, meaning the kernel default value of 32 is used.</para> </listitem> </varlistentry> </variablelist> diff --git a/po/pt_BR.po b/po/pt_BR.po index 2a11371f97..a087a4786b 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -1,23 +1,22 @@ # Brazilian Portuguese translation for systemd. -# Copyright (C) 2015 systemd's COPYRIGHT HOLDER +# Copyright (C) 2017 systemd's COPYRIGHT HOLDER # This file is distributed under the same license as the systemd package. -# Rafael Ferreira <rafael.f.f1@gmail.com>, 2014. # Enrico Nicoletto <liverig@gmail.com>, 2014. -# +# Rafael Fontenelle <rafaelff@gnome.org>, 2015, 2017. msgid "" msgstr "" "Project-Id-Version: systemd master\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-11-22 16:37+0100\n" -"PO-Revision-Date: 2015-01-10 12:23-0300\n" -"Last-Translator: Rafael Ferreira <rafael.f.f1@gmail.com>\n" +"Report-Msgid-Bugs-To: https://github.com/systemd/systemd/issues\n" +"POT-Creation-Date: 2016-11-17 03:29+0000\n" +"PO-Revision-Date: 2017-04-03 14:25-0200\n" +"Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n" "Language-Team: Brazilian Portuguese <gnome-pt_br-list@gnome.org>\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 1.7.1\n" +"X-Generator: Virtaal 1.0.0-beta1\n" #: ../src/core/org.freedesktop.systemd1.policy.in.in.h:1 msgid "Send passphrase back to system" @@ -31,15 +30,14 @@ msgstr "" "sistema." #: ../src/core/org.freedesktop.systemd1.policy.in.in.h:3 -#, fuzzy msgid "Manage system services or other units" -msgstr "Gerenciar unidades e serviços do sistema" +msgstr "Gerenciar serviços do sistema e outras unidades" #: ../src/core/org.freedesktop.systemd1.policy.in.in.h:4 -#, fuzzy msgid "Authentication is required to manage system services or other units." msgstr "" -"É necessária autenticação para gerenciar unidades e serviços do sistema." +"É necessária autenticação para gerenciar serviços do sistema ou outras " +"unidades." #: ../src/core/org.freedesktop.systemd1.policy.in.in.h:5 msgid "Manage system service or unit files" @@ -52,18 +50,18 @@ msgstr "" "sistema." #: ../src/core/org.freedesktop.systemd1.policy.in.in.h:7 -#, fuzzy msgid "Set or unset system and service manager environment variables" -msgstr "Acesso privilegiado ao gerenciador de serviço e de sistema" +msgstr "" +"Definir ou retirar definição de variáveis de ambiente de gerenciador de " +"serviço e sistema" #: ../src/core/org.freedesktop.systemd1.policy.in.in.h:8 -#, fuzzy msgid "" "Authentication is required to set or unset system and service manager " "environment variables." msgstr "" -"É necessária autenticação para gerenciar arquivos \"unit\" e \"service\" do " -"sistema." +"É necessária autenticação para definir ou retirar definição de variáveis de " +"ambiente de gerenciador de serviço e sistema." #: ../src/core/org.freedesktop.systemd1.policy.in.in.h:9 msgid "Reload the systemd state" @@ -103,30 +101,27 @@ msgstr "É necessária autenticação para definir informações de máquina loc #: ../src/import/org.freedesktop.import1.policy.in.h:1 msgid "Import a VM or container image" -msgstr "" +msgstr "Importar uma VM ou imagem contêiner" #: ../src/import/org.freedesktop.import1.policy.in.h:2 -#, fuzzy msgid "Authentication is required to import a VM or container image" -msgstr "É necessária autenticação para se conectar a um contêiner local." +msgstr "É necessária autenticação para importar uma VM ou imagem contêiner" #: ../src/import/org.freedesktop.import1.policy.in.h:3 msgid "Export a VM or container image" -msgstr "" +msgstr "Exportar uma VM ou imagem contêiner" #: ../src/import/org.freedesktop.import1.policy.in.h:4 -#, fuzzy msgid "Authentication is required to export a VM or container image" -msgstr "É necessária autenticação para se conectar a um contêiner local." +msgstr "É necessária autenticação para exportar uma VM ou imagem contêiner" #: ../src/import/org.freedesktop.import1.policy.in.h:5 msgid "Download a VM or container image" -msgstr "" +msgstr "Baixar uma VM ou imagem contêiner" #: ../src/import/org.freedesktop.import1.policy.in.h:6 -#, fuzzy msgid "Authentication is required to download a VM or container image" -msgstr "É necessária autenticação para se conectar a um contêiner local." +msgstr "É necessária autenticação para baixar uma VM ou imagem contêiner" #: ../src/locale/org.freedesktop.locale1.policy.in.h:1 msgid "Set system locale" @@ -254,48 +249,61 @@ msgstr "" "sistema sobre o interruptor da tela." #: ../src/login/org.freedesktop.login1.policy.in.h:19 +#| msgid "Allow non-logged-in users to run programs" +msgid "Allow non-logged-in user to run programs" +msgstr "" +"Permitir que programas sejam executados por usuário que não possui sessão" + +#: ../src/login/org.freedesktop.login1.policy.in.h:20 +#| msgid "Authentication is required to run programs as a non-logged-in user." +msgid "Explicit request is required to run programs as a non-logged-in user." +msgstr "" +"É necessária requisição explícita para executar programas como usuário sem " +"sessão aberta." + +#: ../src/login/org.freedesktop.login1.policy.in.h:21 msgid "Allow non-logged-in users to run programs" msgstr "" "Permitir que programas sejam executados por usuários que não possuem sessão" -#: ../src/login/org.freedesktop.login1.policy.in.h:20 +#: ../src/login/org.freedesktop.login1.policy.in.h:22 msgid "Authentication is required to run programs as a non-logged-in user." msgstr "" "É necessária autenticação para executar programas como usuário sem sessão " "aberta." -#: ../src/login/org.freedesktop.login1.policy.in.h:21 +#: ../src/login/org.freedesktop.login1.policy.in.h:23 msgid "Allow attaching devices to seats" msgstr "Permitir conectar dispositivos em estações" -#: ../src/login/org.freedesktop.login1.policy.in.h:22 +#: ../src/login/org.freedesktop.login1.policy.in.h:24 msgid "Authentication is required for attaching a device to a seat." msgstr "É necessária autenticação para conectar um dispositivo em uma estação." -#: ../src/login/org.freedesktop.login1.policy.in.h:23 +#: ../src/login/org.freedesktop.login1.policy.in.h:25 msgid "Flush device to seat attachments" msgstr "Liberar dispositivo para conexões da estação" -#: ../src/login/org.freedesktop.login1.policy.in.h:24 +#: ../src/login/org.freedesktop.login1.policy.in.h:26 msgid "" "Authentication is required for resetting how devices are attached to seats." msgstr "" "É necessária autenticação para redefinir a quantidade de dispositivos " "conectados na estação." -#: ../src/login/org.freedesktop.login1.policy.in.h:25 +#: ../src/login/org.freedesktop.login1.policy.in.h:27 msgid "Power off the system" msgstr "Desligar o sistema" -#: ../src/login/org.freedesktop.login1.policy.in.h:26 +#: ../src/login/org.freedesktop.login1.policy.in.h:28 msgid "Authentication is required for powering off the system." msgstr "É necessária autenticação para desligar o sistema." -#: ../src/login/org.freedesktop.login1.policy.in.h:27 +#: ../src/login/org.freedesktop.login1.policy.in.h:29 msgid "Power off the system while other users are logged in" msgstr "Desligar o sistema enquanto outros usuários estão conectados" -#: ../src/login/org.freedesktop.login1.policy.in.h:28 +#: ../src/login/org.freedesktop.login1.policy.in.h:30 msgid "" "Authentication is required for powering off the system while other users are " "logged in." @@ -303,11 +311,11 @@ msgstr "" "É necessária autenticação para desligar o sistema enquanto outros usuários " "estão conectados." -#: ../src/login/org.freedesktop.login1.policy.in.h:29 +#: ../src/login/org.freedesktop.login1.policy.in.h:31 msgid "Power off the system while an application asked to inhibit it" msgstr "Desligar o sistema enquanto um aplicativo solicitou inibição" -#: ../src/login/org.freedesktop.login1.policy.in.h:30 +#: ../src/login/org.freedesktop.login1.policy.in.h:32 msgid "" "Authentication is required for powering off the system while an application " "asked to inhibit it." @@ -315,19 +323,19 @@ msgstr "" "É necessária autenticação para desligar o sistema enquanto um aplicativo " "solicitou inibição." -#: ../src/login/org.freedesktop.login1.policy.in.h:31 +#: ../src/login/org.freedesktop.login1.policy.in.h:33 msgid "Reboot the system" msgstr "Reiniciar o sistema" -#: ../src/login/org.freedesktop.login1.policy.in.h:32 +#: ../src/login/org.freedesktop.login1.policy.in.h:34 msgid "Authentication is required for rebooting the system." msgstr "É necessária autenticação para reiniciar o sistema." -#: ../src/login/org.freedesktop.login1.policy.in.h:33 +#: ../src/login/org.freedesktop.login1.policy.in.h:35 msgid "Reboot the system while other users are logged in" msgstr "Reiniciar o sistema enquanto outros usuários estiverem conectados" -#: ../src/login/org.freedesktop.login1.policy.in.h:34 +#: ../src/login/org.freedesktop.login1.policy.in.h:36 msgid "" "Authentication is required for rebooting the system while other users are " "logged in." @@ -335,11 +343,11 @@ msgstr "" "É necessária autenticação para reiniciar o sistema enquanto outros usuários " "estiverem conectados." -#: ../src/login/org.freedesktop.login1.policy.in.h:35 +#: ../src/login/org.freedesktop.login1.policy.in.h:37 msgid "Reboot the system while an application asked to inhibit it" msgstr "Reiniciar o sistema enquanto um aplicativo solicitou inibição" -#: ../src/login/org.freedesktop.login1.policy.in.h:36 +#: ../src/login/org.freedesktop.login1.policy.in.h:38 msgid "" "Authentication is required for rebooting the system while an application " "asked to inhibit it." @@ -347,19 +355,19 @@ msgstr "" "É necessária autenticação para reiniciar o sistema enquanto um aplicativo " "solicitou inibição." -#: ../src/login/org.freedesktop.login1.policy.in.h:37 +#: ../src/login/org.freedesktop.login1.policy.in.h:39 msgid "Suspend the system" msgstr "Suspender o sistema" -#: ../src/login/org.freedesktop.login1.policy.in.h:38 +#: ../src/login/org.freedesktop.login1.policy.in.h:40 msgid "Authentication is required for suspending the system." msgstr "É necessária autenticação para suspender o sistema." -#: ../src/login/org.freedesktop.login1.policy.in.h:39 +#: ../src/login/org.freedesktop.login1.policy.in.h:41 msgid "Suspend the system while other users are logged in" msgstr "Suspender o sistema enquanto outros usuários estiverem conectados" -#: ../src/login/org.freedesktop.login1.policy.in.h:40 +#: ../src/login/org.freedesktop.login1.policy.in.h:42 msgid "" "Authentication is required for suspending the system while other users are " "logged in." @@ -367,11 +375,11 @@ msgstr "" "É necessária autenticação para suspender o sistema enquanto outros usuários " "estiverem conectados." -#: ../src/login/org.freedesktop.login1.policy.in.h:41 +#: ../src/login/org.freedesktop.login1.policy.in.h:43 msgid "Suspend the system while an application asked to inhibit it" msgstr "Suspender o sistema enquanto um aplicativo solicitou inibição" -#: ../src/login/org.freedesktop.login1.policy.in.h:42 +#: ../src/login/org.freedesktop.login1.policy.in.h:44 msgid "" "Authentication is required for suspending the system while an application " "asked to inhibit it." @@ -379,19 +387,19 @@ msgstr "" "É necessária autenticação para suspender o sistema enquanto um aplicativo " "solicitou inibição." -#: ../src/login/org.freedesktop.login1.policy.in.h:43 +#: ../src/login/org.freedesktop.login1.policy.in.h:45 msgid "Hibernate the system" msgstr "Hibernar o sistema" -#: ../src/login/org.freedesktop.login1.policy.in.h:44 +#: ../src/login/org.freedesktop.login1.policy.in.h:46 msgid "Authentication is required for hibernating the system." msgstr "É necessária autenticação para hibernar o sistema." -#: ../src/login/org.freedesktop.login1.policy.in.h:45 +#: ../src/login/org.freedesktop.login1.policy.in.h:47 msgid "Hibernate the system while other users are logged in" msgstr "Hibernar o sistema enquanto outros usuários estiverem conectados" -#: ../src/login/org.freedesktop.login1.policy.in.h:46 +#: ../src/login/org.freedesktop.login1.policy.in.h:48 msgid "" "Authentication is required for hibernating the system while other users are " "logged in." @@ -399,11 +407,11 @@ msgstr "" "É necessária autenticação para hibernar o sistema enquanto outros usuários " "estiverem conectados." -#: ../src/login/org.freedesktop.login1.policy.in.h:47 +#: ../src/login/org.freedesktop.login1.policy.in.h:49 msgid "Hibernate the system while an application asked to inhibit it" msgstr "Hibernar o sistema enquanto um aplicativo solicitou inibição" -#: ../src/login/org.freedesktop.login1.policy.in.h:48 +#: ../src/login/org.freedesktop.login1.policy.in.h:50 msgid "" "Authentication is required for hibernating the system while an application " "asked to inhibit it." @@ -411,123 +419,121 @@ msgstr "" "É necessária autenticação para hibernar o sistema enquanto um aplicativo " "solicitou inibição." -#: ../src/login/org.freedesktop.login1.policy.in.h:49 +#: ../src/login/org.freedesktop.login1.policy.in.h:51 msgid "Manage active sessions, users and seats" -msgstr "" +msgstr "Gerenciar estações, usuários e sessões ativas" -#: ../src/login/org.freedesktop.login1.policy.in.h:50 -#, fuzzy +#: ../src/login/org.freedesktop.login1.policy.in.h:52 msgid "" "Authentication is required for managing active sessions, users and seats." -msgstr "É necessária autenticação para conectar um dispositivo em uma estação." +msgstr "" +"É necessária autenticação para gerenciar estações, usuários e sessões ativas." -#: ../src/login/org.freedesktop.login1.policy.in.h:51 +#: ../src/login/org.freedesktop.login1.policy.in.h:53 msgid "Lock or unlock active sessions" -msgstr "" +msgstr "Travar ou destravar sessões ativas" -#: ../src/login/org.freedesktop.login1.policy.in.h:52 -#, fuzzy +#: ../src/login/org.freedesktop.login1.policy.in.h:54 msgid "Authentication is required to lock or unlock active sessions." -msgstr "É necessária autenticação para se conectar a um contêiner local." +msgstr "É necessária autenticação para travar ou destravar sessões ativas." -#: ../src/login/org.freedesktop.login1.policy.in.h:53 +#: ../src/login/org.freedesktop.login1.policy.in.h:55 msgid "Allow indication to the firmware to boot to setup interface" msgstr "" +"Permitir indicação para o firmware inicializar para a interface de " +"configuração" -#: ../src/login/org.freedesktop.login1.policy.in.h:54 -#, fuzzy +#: ../src/login/org.freedesktop.login1.policy.in.h:56 msgid "" "Authentication is required to indicate to the firmware to boot to setup " "interface." -msgstr "É necessária autenticação para definir nome de máquina local." +msgstr "" +"É necessária autenticação para indicar para o firmware inicializar para a " +"interface de configuração." -#: ../src/login/org.freedesktop.login1.policy.in.h:55 +#: ../src/login/org.freedesktop.login1.policy.in.h:57 msgid "Set a wall message" -msgstr "" +msgstr "Definir uma mensagem de parede" -#: ../src/login/org.freedesktop.login1.policy.in.h:56 -#, fuzzy +#: ../src/login/org.freedesktop.login1.policy.in.h:58 msgid "Authentication is required to set a wall message" -msgstr "É necessária autenticação para definir nome de máquina local." +msgstr "É necessária autenticação para definir uma mensagem de parede" #: ../src/machine/org.freedesktop.machine1.policy.in.h:1 msgid "Log into a local container" msgstr "Conectar a um contêiner local" #: ../src/machine/org.freedesktop.machine1.policy.in.h:2 -#, fuzzy msgid "Authentication is required to log into a local container." msgstr "É necessária autenticação para se conectar a um contêiner local." #: ../src/machine/org.freedesktop.machine1.policy.in.h:3 -#, fuzzy msgid "Log into the local host" -msgstr "Conectar a um contêiner local" +msgstr "Conectar a uma máquina local" #: ../src/machine/org.freedesktop.machine1.policy.in.h:4 -#, fuzzy msgid "Authentication is required to log into the local host." -msgstr "É necessária autenticação para se conectar a um contêiner local." +msgstr "É necessária autenticação para se conectar a uma máquina local." #: ../src/machine/org.freedesktop.machine1.policy.in.h:5 -#, fuzzy msgid "Acquire a shell in a local container" -msgstr "Conectar a um contêiner local" +msgstr "Adquirir uma shell em um contêiner local" #: ../src/machine/org.freedesktop.machine1.policy.in.h:6 -#, fuzzy msgid "Authentication is required to acquire a shell in a local container." -msgstr "É necessária autenticação para se conectar a um contêiner local." +msgstr "" +"É necessária autenticação para adquirir uma shell em um contêiner local." #: ../src/machine/org.freedesktop.machine1.policy.in.h:7 msgid "Acquire a shell on the local host" -msgstr "" +msgstr "Adquirir uma shell na máquina local" #: ../src/machine/org.freedesktop.machine1.policy.in.h:8 -#, fuzzy msgid "Authentication is required to acquire a shell on the local host." -msgstr "É necessária autenticação para definir nome de máquina local." +msgstr "" +"É necessária autenticação para adquirir uma shell em uma máquina local." #: ../src/machine/org.freedesktop.machine1.policy.in.h:9 -#, fuzzy msgid "Acquire a pseudo TTY in a local container" -msgstr "Conectar a um contêiner local" +msgstr "Adquirir um pseudo TTY em um contêiner local" #: ../src/machine/org.freedesktop.machine1.policy.in.h:10 -#, fuzzy msgid "" "Authentication is required to acquire a pseudo TTY in a local container." -msgstr "É necessária autenticação para se conectar a um contêiner local." +msgstr "" +"É necessária autenticação para adquirir um pseudo TTY em um contêiner local." #: ../src/machine/org.freedesktop.machine1.policy.in.h:11 msgid "Acquire a pseudo TTY on the local host" -msgstr "" +msgstr "Adquiri um pseudo TTY na máquina local" #: ../src/machine/org.freedesktop.machine1.policy.in.h:12 -#, fuzzy msgid "Authentication is required to acquire a pseudo TTY on the local host." -msgstr "É necessária autenticação para definir nome de máquina local." +msgstr "" +"É necessária autenticação para adquirir um pseudo TTY em um máquina local." #: ../src/machine/org.freedesktop.machine1.policy.in.h:13 msgid "Manage local virtual machines and containers" -msgstr "" +msgstr "Gerenciar máquinas virtuais locais e contêineres" #: ../src/machine/org.freedesktop.machine1.policy.in.h:14 -#, fuzzy msgid "" "Authentication is required to manage local virtual machines and containers." -msgstr "É necessária autenticação para definir informações de máquina local." +msgstr "" +"É necessária autenticação para gerenciar máquinas virtuais locais e " +"contêineres." #: ../src/machine/org.freedesktop.machine1.policy.in.h:15 msgid "Manage local virtual machine and container images" -msgstr "" +msgstr "Gerenciar máquinas virtuais locais e imagens contêineres" #: ../src/machine/org.freedesktop.machine1.policy.in.h:16 -#, fuzzy msgid "" "Authentication is required to manage local virtual machine and container " "images." -msgstr "É necessária autenticação para definir informações de máquina local." +msgstr "" +"É necessária autenticação para gerenciar máquinas virtuais locais e imagens " +"contêineres." #: ../src/timedate/org.freedesktop.timedate1.policy.in.h:1 msgid "Set system time" @@ -569,37 +575,31 @@ msgstr "" "É necessária autenticação para controlar se deve ser habilitada, ou não, a " "sincronização de horário através de rede." -#: ../src/core/dbus-unit.c:428 -#, fuzzy +#: ../src/core/dbus-unit.c:457 msgid "Authentication is required to start '$(unit)'." -msgstr "É necessária autenticação para definir o horário do sistema." +msgstr "É necessária autenticação para iniciar '$(unit)'." -#: ../src/core/dbus-unit.c:429 -#, fuzzy +#: ../src/core/dbus-unit.c:458 msgid "Authentication is required to stop '$(unit)'." -msgstr "É necessária autenticação para definir o horário do sistema." +msgstr "É necessária autenticação para parar '$(unit)'." -#: ../src/core/dbus-unit.c:430 -#, fuzzy +#: ../src/core/dbus-unit.c:459 msgid "Authentication is required to reload '$(unit)'." -msgstr "É necessária autenticação para recarregar o estado do sistema." +msgstr "É necessária autenticação para recarregar '$(unit)'." -#: ../src/core/dbus-unit.c:431 ../src/core/dbus-unit.c:432 -#, fuzzy +#: ../src/core/dbus-unit.c:460 ../src/core/dbus-unit.c:461 msgid "Authentication is required to restart '$(unit)'." -msgstr "É necessária autenticação para definir o horário do sistema." +msgstr "É necessária autenticação para reiniciar '$(unit)'." -#: ../src/core/dbus-unit.c:535 -#, fuzzy +#: ../src/core/dbus-unit.c:568 msgid "Authentication is required to kill '$(unit)'." -msgstr "É necessária autenticação para se conectar a um contêiner local." +msgstr "É necessária autenticação para matar '$(unit)'." -#: ../src/core/dbus-unit.c:565 -#, fuzzy +#: ../src/core/dbus-unit.c:599 msgid "Authentication is required to reset the \"failed\" state of '$(unit)'." -msgstr "É necessária autenticação para definir nome de máquina local." +msgstr "" +"É necessária autenticação para reiniciar o estado \"failed\" de '$(unit)'." -#: ../src/core/dbus-unit.c:597 -#, fuzzy +#: ../src/core/dbus-unit.c:632 msgid "Authentication is required to set properties on '$(unit)'." -msgstr "É necessária autenticação para definir o horário do sistema." +msgstr "É necessária autenticação para definir propriedades em '$(unit)'." diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index ac0470b20d..1eb2ca0ccf 100644 --- a/src/analyze/analyze.c +++ b/src/analyze/analyze.c @@ -627,7 +627,7 @@ static int analyze_plot(sd_bus *bus) { "<!-- that render these files properly but much slower are ImageMagick, -->\n" "<!-- gimp, inkscape, etc. To display the files on your system, just -->\n" "<!-- point your browser to this file. -->\n\n" - "<!-- This plot was generated by systemd-analyze version %-16.16s -->\n\n", VERSION); + "<!-- This plot was generated by systemd-analyze version %-16.16s -->\n\n", PACKAGE_VERSION); /* style sheet */ svg("<defs>\n <style type=\"text/css\">\n <![CDATA[\n" diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index 681e783f2e..f5b39342b7 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -29,7 +29,7 @@ #endif /* magic string to find in the binary image */ -static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-boot " VERSION " ####"; +static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-boot " PACKAGE_VERSION " ####"; static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE; @@ -363,7 +363,7 @@ static VOID print_status(Config *config, CHAR16 *loaded_image_path) { uefi_call_wrapper(ST->ConOut->SetAttribute, 2, ST->ConOut, EFI_LIGHTGRAY|EFI_BACKGROUND_BLACK); uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); - Print(L"systemd-boot version: " VERSION "\n"); + Print(L"systemd-boot version: " PACKAGE_VERSION "\n"); Print(L"architecture: " EFI_MACHINE_TYPE_NAME "\n"); Print(L"loaded image: %s\n", loaded_image_path); Print(L"UEFI specification: %d.%02d\n", ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0xffff); @@ -781,7 +781,7 @@ static BOOLEAN menu_run(Config *config, ConfigEntry **chosen_entry, CHAR16 *load break; case KEYPRESS(0, 0, 'v'): - status = PoolPrint(L"systemd-boot " VERSION " (" EFI_MACHINE_TYPE_NAME "), UEFI Specification %d.%02d, Vendor %s %d.%02d", + status = PoolPrint(L"systemd-boot " PACKAGE_VERSION " (" EFI_MACHINE_TYPE_NAME "), UEFI Specification %d.%02d, Vendor %s %d.%02d", ST->Hdr.Revision >> 16, ST->Hdr.Revision & 0xffff, ST->FirmwareVendor, ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff); break; @@ -1718,7 +1718,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *sys_table) { InitializeLib(image, sys_table); init_usec = time_usec(); efivar_set_time_usec(L"LoaderTimeInitUSec", init_usec); - efivar_set(L"LoaderInfo", L"systemd-boot " VERSION, FALSE); + efivar_set(L"LoaderInfo", L"systemd-boot " PACKAGE_VERSION, FALSE); s = PoolPrint(L"%s %d.%02d", ST->FirmwareVendor, ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff); efivar_set(L"LoaderFirmwareInfo", s, FALSE); FreePool(s); diff --git a/src/boot/efi/stub.c b/src/boot/efi/stub.c index b7d5d3cdae..98730a5d3d 100644 --- a/src/boot/efi/stub.c +++ b/src/boot/efi/stub.c @@ -23,7 +23,7 @@ #include "measure.h" /* magic string to find in the binary image */ -static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-stub " VERSION " ####"; +static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-stub " PACKAGE_VERSION " ####"; static const EFI_GUID global_guid = EFI_GLOBAL_VARIABLE; diff --git a/src/libsystemd/sd-bus/busctl-introspect.c b/src/busctl/busctl-introspect.c index a05794941f..a05794941f 100644 --- a/src/libsystemd/sd-bus/busctl-introspect.c +++ b/src/busctl/busctl-introspect.c diff --git a/src/libsystemd/sd-bus/busctl-introspect.h b/src/busctl/busctl-introspect.h index d922e352db..d922e352db 100644 --- a/src/libsystemd/sd-bus/busctl-introspect.h +++ b/src/busctl/busctl-introspect.h diff --git a/src/libsystemd/sd-bus/busctl.c b/src/busctl/busctl.c index 9dd3828364..9dd3828364 100644 --- a/src/libsystemd/sd-bus/busctl.c +++ b/src/busctl/busctl.c diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index 7df4cab3f6..0454a28e12 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -710,7 +710,7 @@ static int property_get_bind_paths( c->bind_mounts[i].source, c->bind_mounts[i].destination, c->bind_mounts[i].ignore_enoent, - c->bind_mounts[i].recursive ? MS_REC : 0); + c->bind_mounts[i].recursive ? (uint64_t) MS_REC : (uint64_t) 0); if (r < 0) return r; } diff --git a/src/core/dbus.c b/src/core/dbus.c index 065f2d81d6..cfc045d282 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -753,13 +753,13 @@ int manager_sync_bus_names(Manager *m, sd_bus *bus) { /* If it is, determine its current owner */ r = sd_bus_get_name_creds(bus, name, SD_BUS_CREDS_UNIQUE_NAME, &creds); if (r < 0) { - log_error_errno(r, "Failed to get bus name owner %s: %m", name); + log_full_errno(r == -ENXIO ? LOG_DEBUG : LOG_ERR, r, "Failed to get bus name owner %s: %m", name); continue; } r = sd_bus_creds_get_unique_name(creds, &unique); if (r < 0) { - log_error_errno(r, "Failed to get unique name for %s: %m", name); + log_full_errno(r == -ENXIO ? LOG_DEBUG : LOG_ERR, r, "Failed to get unique name for %s: %m", name); continue; } diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c index a23b614791..a9539c812a 100644 --- a/src/hwdb/hwdb.c +++ b/src/hwdb/hwdb.c @@ -390,7 +390,7 @@ static int trie_store(struct trie *trie, const char *filename) { int64_t size; struct trie_header_f h = { .signature = HWDB_SIG, - .tool_version = htole64(atoi(VERSION)), + .tool_version = htole64(atoi(PACKAGE_VERSION)), .header_size = htole64(sizeof(struct trie_header_f)), .node_size = htole64(sizeof(struct trie_node_f)), .child_entry_size = htole64(sizeof(struct trie_child_entry_f)), diff --git a/src/libudev/libudev.pc.in b/src/libudev/libudev.pc.in index 770c92209e..1becae45fd 100644 --- a/src/libudev/libudev.pc.in +++ b/src/libudev/libudev.pc.in @@ -12,6 +12,6 @@ includedir=@includedir@ Name: libudev Description: Library to access udev device information -Version: @VERSION@ +Version: @PACKAGE_VERSION@ Libs: -L${libdir} -ludev Cflags: -I${includedir} diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c index 5ca42b1ca2..1e6f383738 100644 --- a/src/login/logind-inhibit.c +++ b/src/login/logind-inhibit.c @@ -347,7 +347,7 @@ InhibitWhat manager_inhibit_what(Manager *m, InhibitMode mm) { assert(m); HASHMAP_FOREACH(i, m->inhibitors, j) - if (i->mode == mm) + if (i->mode == mm && i->started) what |= i->what; return what; @@ -388,6 +388,9 @@ bool manager_is_inhibited( assert(w > 0 && w < _INHIBIT_WHAT_MAX); HASHMAP_FOREACH(i, m->inhibitors, j) { + if (!i->started) + continue; + if (!(i->what & w)) continue; diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 0c1229336b..1797f144b6 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -1325,6 +1325,11 @@ static int link_set_bridge(Link *link) { if (r < 0) return log_link_error_errno(link, r, "Could not append IFLA_BRPORT_COST attribute: %m"); } + if (link->network->priority != LINK_BRIDGE_PORT_PRIORITY_INVALID) { + r = sd_netlink_message_append_u16(req, IFLA_BRPORT_PRIORITY, link->network->priority); + if (r < 0) + return log_link_error_errno(link, r, "Could not append IFLA_BRPORT_PRIORITY attribute: %m"); + } r = sd_netlink_message_close_container(req); if (r < 0) diff --git a/src/network/networkd-link.h b/src/network/networkd-link.h index e6190fbe57..010b38248a 100644 --- a/src/network/networkd-link.h +++ b/src/network/networkd-link.h @@ -33,6 +33,8 @@ #include "list.h" #include "set.h" +#define LINK_BRIDGE_PORT_PRIORITY_INVALID 128 + typedef enum LinkState { LINK_STATE_PENDING, LINK_STATE_ENSLAVING, diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf index 68052ba544..9658978651 100644 --- a/src/network/networkd-network-gperf.gperf +++ b/src/network/networkd-network-gperf.gperf @@ -119,12 +119,13 @@ DHCPServer.EmitTimezone, config_parse_bool, DHCPServer.Timezone, config_parse_timezone, 0, offsetof(Network, dhcp_server_timezone) DHCPServer.PoolOffset, config_parse_uint32, 0, offsetof(Network, dhcp_server_pool_offset) DHCPServer.PoolSize, config_parse_uint32, 0, offsetof(Network, dhcp_server_pool_size) -Bridge.Cost, config_parse_unsigned, 0, offsetof(Network, cost) +Bridge.Cost, config_parse_uint32, 0, offsetof(Network, cost) Bridge.UseBPDU, config_parse_bool, 0, offsetof(Network, use_bpdu) Bridge.HairPin, config_parse_bool, 0, offsetof(Network, hairpin) Bridge.FastLeave, config_parse_bool, 0, offsetof(Network, fast_leave) Bridge.AllowPortToBeRoot, config_parse_bool, 0, offsetof(Network, allow_port_to_be_root) Bridge.UnicastFlood, config_parse_bool, 0, offsetof(Network, unicast_flood) +Bridge.Priority, config_parse_uint16, 0, offsetof(Network, priority) BridgeFDB.MACAddress, config_parse_fdb_hwaddr, 0, 0 BridgeFDB.VLANId, config_parse_fdb_vlan_id, 0, 0 BridgeVLAN.PVID, config_parse_brvlan_pvid, 0, 0 diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index fac42d8478..dd29b4ca48 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -165,6 +165,7 @@ static int network_load_one(Manager *manager, const char *filename) { network->use_bpdu = true; network->allow_port_to_be_root = true; network->unicast_flood = true; + network->priority = LINK_BRIDGE_PORT_PRIORITY_INVALID; network->lldp_mode = LLDP_MODE_ROUTERS_ONLY; diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h index 4ce066a764..d6f418d521 100644 --- a/src/network/networkd-network.h +++ b/src/network/networkd-network.h @@ -163,7 +163,8 @@ struct Network { bool fast_leave; bool allow_port_to_be_root; bool unicast_flood; - unsigned cost; + uint32_t cost; + uint16_t priority; bool use_br_vlan; uint16_t pvid; diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 1c9d21566f..36c94ac71b 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -42,8 +42,8 @@ #include "udev-util.h" #include "xattr-util.h" -static int probe_filesystem(const char *node, char **ret_fstype) { #ifdef HAVE_BLKID +static int probe_filesystem(const char *node, char **ret_fstype) { _cleanup_blkid_free_probe_ blkid_probe b = NULL; const char *fstype; int r; @@ -80,10 +80,8 @@ static int probe_filesystem(const char *node, char **ret_fstype) { not_found: *ret_fstype = NULL; return 0; -#else - return -EOPNOTSUPP; -#endif } +#endif int dissect_image(int fd, const void *root_hash, size_t root_hash_size, DissectImageFlags flags, DissectedImage **ret) { diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index cb9ca9ae1e..64945121f7 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -3191,8 +3191,8 @@ static int start_unit(int argc, char *argv[], void *userdata) { return r; } +#ifdef ENABLE_LOGIND static int logind_set_wall_message(void) { -#ifdef HAVE_LOGIND _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; sd_bus *bus; _cleanup_free_ char *m = NULL; @@ -3220,15 +3220,14 @@ static int logind_set_wall_message(void) { if (r < 0) return log_warning_errno(r, "Failed to set wall message, ignoring: %s", bus_error_message(&error, r)); - -#endif return 0; } +#endif /* Ask systemd-logind, which might grant access to unprivileged users * through PolicyKit */ static int logind_reboot(enum action a) { -#ifdef HAVE_LOGIND +#ifdef ENABLE_LOGIND _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; const char *method, *description; sd_bus *bus; @@ -3291,7 +3290,7 @@ static int logind_reboot(enum action a) { } static int logind_check_inhibitors(enum action a) { -#ifdef HAVE_LOGIND +#ifdef ENABLE_LOGIND _cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL; _cleanup_strv_free_ char **sessions = NULL; const char *what, *who, *why, *mode; @@ -3410,7 +3409,7 @@ static int logind_check_inhibitors(enum action a) { } static int logind_prepare_firmware_setup(void) { -#ifdef HAVE_LOGIND +#ifdef ENABLE_LOGIND _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; sd_bus *bus; int r; @@ -8281,7 +8280,7 @@ static int halt_now(enum action a) { static int logind_schedule_shutdown(void) { -#ifdef HAVE_LOGIND +#ifdef ENABLE_LOGIND _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; char date[FORMAT_TIMESTAMP_MAX]; const char *action; @@ -8409,7 +8408,7 @@ static int runlevel_main(void) { } static int logind_cancel_shutdown(void) { -#ifdef HAVE_LOGIND +#ifdef ENABLE_LOGIND _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; sd_bus *bus; int r; diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c index e28de9b37b..0f71c18b65 100644 --- a/src/test/test-libudev.c +++ b/src/test/test-libudev.c @@ -392,7 +392,7 @@ int main(int argc, char *argv[]) { return EXIT_SUCCESS; case 'V': - printf("%s\n", VERSION); + printf("%s\n", PACKAGE_VERSION); return EXIT_SUCCESS; case 'm': diff --git a/src/test/test-udev.c b/src/test/test-udev.c index e965b4494a..c84bd8991e 100644 --- a/src/test/test-udev.c +++ b/src/test/test-udev.c @@ -88,7 +88,7 @@ int main(int argc, char *argv[]) { if (udev == NULL) return EXIT_FAILURE; - log_debug("version %s", VERSION); + log_debug("version %s", PACKAGE_VERSION); mac_selinux_init(); action = argv[1]; diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 7326597b8c..ed6a9adaa6 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -973,7 +973,7 @@ static int path_set_attribute(Item *item, const char *path) { r = chattr_fd(fd, f, item->attribute_mask); if (r < 0) - log_full_errno(r == -ENOTTY ? LOG_DEBUG : LOG_WARNING, + log_full_errno(r == -ENOTTY || r == -EOPNOTSUPP ? LOG_DEBUG : LOG_WARNING, r, "Cannot set file attribute for '%s', value=0x%08x, mask=0x%08x: %m", path, item->attribute_value, item->attribute_mask); diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c index 4655691642..eba382a82d 100644 --- a/src/udev/scsi_id/scsi_id.c +++ b/src/udev/scsi_id/scsi_id.c @@ -391,7 +391,7 @@ static int set_options(struct udev *udev, break; case 'V': - printf("%s\n", VERSION); + printf("%s\n", PACKAGE_VERSION); exit(0); case 'x': diff --git a/src/udev/udev-builtin-input_id.c b/src/udev/udev-builtin-input_id.c index 51f364bf94..4303b2593d 100644 --- a/src/udev/udev-builtin-input_id.c +++ b/src/udev/udev-builtin-input_id.c @@ -44,6 +44,27 @@ #define LONG(x) ((x)/BITS_PER_LONG) #define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1) +/* available as of kernel 3.11 */ +#ifndef BTN_DPAD_UP +#define BTN_DPAD_UP 0x220 +#endif /* BTN_DPAD_UP */ + +/* available as of kernel 3.13 */ +#ifndef KEY_ALS_TOGGLE +#define KEY_ALS_TOGGLE 0x230 +#endif /* KEY_ALS_TOGGLE */ + +struct range { + unsigned start; + unsigned end; +}; + +/* key code ranges above BTN_MISC (start is inclusive, stop is exclusive)*/ +static const struct range high_key_blocks[] = { + { KEY_OK, BTN_DPAD_UP }, + { KEY_ALS_TOGGLE, BTN_TRIGGER_HAPPY } +}; + static inline int abs_size_mm(const struct input_absinfo *absinfo) { /* Resolution is defined to be in units/mm for ABS_X/Y */ return (absinfo->maximum - absinfo->minimum) / absinfo->resolution; @@ -260,13 +281,16 @@ static bool test_key(struct udev_device *dev, found |= bitmask_key[i]; log_debug("test_key: checking bit block %lu for any keys; found=%i", (unsigned long)i*BITS_PER_LONG, found > 0); } - /* If there are no keys in the lower block, check the higher block */ + /* If there are no keys in the lower block, check the higher blocks */ if (!found) { - for (i = KEY_OK; i < BTN_TRIGGER_HAPPY; ++i) { - if (test_bit(i, bitmask_key)) { - log_debug("test_key: Found key %x in high block", i); - found = 1; - break; + unsigned block; + for (block = 0; block < (sizeof(high_key_blocks) / sizeof(struct range)); ++block) { + for (i = high_key_blocks[block].start; i < high_key_blocks[block].end; ++i) { + if (test_bit(i, bitmask_key)) { + log_debug("test_key: Found key %x in high block", i); + found = 1; + break; + } } } } diff --git a/src/udev/udev-builtin-keyboard.c b/src/udev/udev-builtin-keyboard.c index 09024116f2..07a2f94197 100644 --- a/src/udev/udev-builtin-keyboard.c +++ b/src/udev/udev-builtin-keyboard.c @@ -29,7 +29,7 @@ #include "string-util.h" #include "udev.h" -static const struct key *keyboard_lookup_key(const char *str, GPERF_LEN_TYPE len); +static const struct key_name *keyboard_lookup_key(const char *str, GPERF_LEN_TYPE len); #include "keyboard-keys-from-name.h" static int install_force_release(struct udev_device *dev, const unsigned *release, unsigned release_count) { @@ -76,7 +76,7 @@ static void map_keycode(int fd, const char *devnode, int scancode, const char *k unsigned key; } map; char *endptr; - const struct key *k; + const struct key_name *k; unsigned keycode_num; /* translate identifier to key code */ diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c index dbefbbe175..92e4f8d9c0 100644 --- a/src/udev/udev-ctrl.c +++ b/src/udev/udev-ctrl.c @@ -239,7 +239,7 @@ static int ctrl_send(struct udev_ctrl *uctrl, enum udev_ctrl_msg_type type, int int err = 0; memzero(&ctrl_msg_wire, sizeof(struct udev_ctrl_msg_wire)); - strcpy(ctrl_msg_wire.version, "udev-" VERSION); + strcpy(ctrl_msg_wire.version, "udev-" PACKAGE_VERSION); ctrl_msg_wire.magic = UDEV_CTRL_MAGIC; ctrl_msg_wire.type = type; diff --git a/src/udev/udev.pc.in b/src/udev/udev.pc.in index a0c2e82d47..e384a6f7c9 100644 --- a/src/udev/udev.pc.in +++ b/src/udev/udev.pc.in @@ -1,5 +1,5 @@ Name: udev Description: udev -Version: @VERSION@ +Version: @PACKAGE_VERSION@ udevdir=@udevlibexecdir@ diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index 70a5fa4d7a..69b0b9025c 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -352,7 +352,7 @@ static int trie_store(struct trie *trie, const char *filename) { int64_t size; struct trie_header_f h = { .signature = HWDB_SIG, - .tool_version = htole64(atoi(VERSION)), + .tool_version = htole64(atoi(PACKAGE_VERSION)), .header_size = htole64(sizeof(struct trie_header_f)), .node_size = htole64(sizeof(struct trie_node_f)), .child_entry_size = htole64(sizeof(struct trie_child_entry_f)), diff --git a/src/udev/udevadm-info.c b/src/udev/udevadm-info.c index 90cdfa16c7..16b2aab0a1 100644 --- a/src/udev/udevadm-info.c +++ b/src/udev/udevadm-info.c @@ -376,7 +376,7 @@ static int uinfo(struct udev *udev, int argc, char *argv[]) { export_prefix = optarg; break; case 'V': - printf("%s\n", VERSION); + printf("%s\n", PACKAGE_VERSION); return 0; case 'h': help(); diff --git a/src/udev/udevadm-test.c b/src/udev/udevadm-test.c index 07b667f131..e8ffe2f309 100644 --- a/src/udev/udevadm-test.c +++ b/src/udev/udevadm-test.c @@ -59,7 +59,7 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) { {} }; - log_debug("version %s", VERSION); + log_debug("version %s", PACKAGE_VERSION); while ((c = getopt_long(argc, argv, "a:N:h", options, NULL)) >= 0) switch (c) { diff --git a/src/udev/udevadm.c b/src/udev/udevadm.c index a6a873e5de..492b2f4c25 100644 --- a/src/udev/udevadm.c +++ b/src/udev/udevadm.c @@ -25,7 +25,7 @@ #include "udev.h" static int adm_version(struct udev *udev, int argc, char *argv[]) { - printf("%s\n", VERSION); + printf("%s\n", PACKAGE_VERSION); return 0; } diff --git a/src/udev/udevd.c b/src/udev/udevd.c index ce2ff89b85..56b8c1ec55 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1492,7 +1492,7 @@ static int parse_argv(int argc, char *argv[]) { help(); return 0; case 'V': - printf("%s\n", VERSION); + printf("%s\n", PACKAGE_VERSION); return 0; case '?': return -EINVAL; @@ -1740,7 +1740,7 @@ int main(int argc, char *argv[]) { if (arg_daemonize) { pid_t pid; - log_info("starting version " VERSION); + log_info("starting version " PACKAGE_VERSION); /* connect /dev/null to stdin, stdout, stderr */ if (log_get_max_level() < LOG_DEBUG) { diff --git a/test/TEST-12-ISSUE-3171/test.sh b/test/TEST-12-ISSUE-3171/test.sh index e20f470143..c252bdfbad 100755 --- a/test/TEST-12-ISSUE-3171/test.sh +++ b/test/TEST-12-ISSUE-3171/test.sh @@ -67,23 +67,23 @@ EOL systemctl start test.socket systemctl is-active test.socket [[ "$(stat --format='%G' /run/test.socket)" == adm ]] -echo A | nc -U /run/test.socket +echo A | nc -w1 -U /run/test.socket mv $U ${U}.disabled systemctl daemon-reload systemctl is-active test.socket [[ "$(stat --format='%G' /run/test.socket)" == adm ]] -echo B | nc -U /run/test.socket && exit 1 +echo B | nc -w1 -U /run/test.socket && exit 1 mv ${U}.disabled $U systemctl daemon-reload systemctl is-active test.socket -echo C | nc -U /run/test.socket && exit 1 +echo C | nc -w1 -U /run/test.socket && exit 1 [[ "$(stat --format='%G' /run/test.socket)" == adm ]] systemctl restart test.socket systemctl is-active test.socket -echo D | nc -U /run/test.socket +echo D | nc -w1 -U /run/test.socket [[ "$(stat --format='%G' /run/test.socket)" == adm ]] diff --git a/test/networkd-test.py b/test/networkd-test.py index e0dddeb053..eee8b65ec0 100755 --- a/test/networkd-test.py +++ b/test/networkd-test.py @@ -96,10 +96,20 @@ class NetworkdTestingUtilities: dropin_path = os.path.join(dropin_dir, "%s.conf" % dropin_name) os.makedirs(dropin_dir, exist_ok=True) + self.addCleanup(os.rmdir, dropin_dir) with open(dropin_path, 'w') as dropin: dropin.write(contents) self.addCleanup(os.remove, dropin_path) + def read_attr(self, link, attribute): + """Read a link attributed from the sysfs.""" + # Note we we don't want to check if interface `link' is managed, we + # want to evaluate link variable and pass the value of the link to + # assert_link_states e.g. eth0=managed. + self.assert_link_states(**{link:'managed'}) + with open(os.path.join('/sys/class/net', link, attribute)) as f: + return f.readline().strip() + def assert_link_states(self, **kwargs): """Match networkctl link states to the given ones. @@ -140,6 +150,74 @@ class NetworkdTestingUtilities: self.fail("Missing links in status output: %s" % interfaces) +class BridgeTest(NetworkdTestingUtilities, unittest.TestCase): + """Provide common methods for testing networkd against servers.""" + + def setUp(self): + self.write_network('port1.netdev', '''\ +[NetDev] +Name=port1 +Kind=dummy +MACAddress=12:34:56:78:9a:bc''') + self.write_network('port2.netdev', '''\ +[NetDev] +Name=port2 +Kind=dummy +MACAddress=12:34:56:78:9a:bd''') + self.write_network('mybridge.netdev', '''\ +[NetDev] +Name=mybridge +Kind=bridge''') + self.write_network('port1.network', '''\ +[Match] +Name=port1 +[Network] +Bridge=mybridge''') + self.write_network('port2.network', '''\ +[Match] +Name=port2 +[Network] +Bridge=mybridge''') + self.write_network('mybridge.network', '''\ +[Match] +Name=mybridge +[Network] +DNS=192.168.250.1 +Address=192.168.250.33/24 +Gateway=192.168.250.1''') + subprocess.check_call(['systemctl', 'start', 'systemd-networkd']) + + def tearDown(self): + subprocess.check_call(['systemctl', 'stop', 'systemd-networkd']) + subprocess.check_call(['ip', 'link', 'del', 'mybridge']) + subprocess.check_call(['ip', 'link', 'del', 'port1']) + subprocess.check_call(['ip', 'link', 'del', 'port2']) + + def test_bridge_init(self): + self.assert_link_states( + port1='managed', + port2='managed', + mybridge='managed') + + def test_bridge_port_priority(self): + self.assertEqual(self.read_attr('port1', 'brport/priority'), '32') + self.write_network_dropin('port1.network', 'priority', '''\ +[Bridge] +Priority=28 +''') + subprocess.check_call(['systemctl', 'restart', 'systemd-networkd']) + self.assertEqual(self.read_attr('port1', 'brport/priority'), '28') + + def test_bridge_port_priority_set_zero(self): + """It should be possible to set the bridge port priority to 0""" + self.assertEqual(self.read_attr('port2', 'brport/priority'), '32') + self.write_network_dropin('port2.network', 'priority', '''\ +[Bridge] +Priority=0 +''') + subprocess.check_call(['systemctl', 'restart', 'systemd-networkd']) + self.assertEqual(self.read_attr('port2', 'brport/priority'), '0') + class ClientTestBase(NetworkdTestingUtilities): """Provide common methods for testing networkd against servers.""" |