From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 23BAF139694 for ; Sun, 2 Jul 2017 16:11:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9D4582340B7; Sun, 2 Jul 2017 16:11:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6B6892340B7 for ; Sun, 2 Jul 2017 16:11:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 181BB3416B8 for ; Sun, 2 Jul 2017 16:11:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 82063747D for ; Sun, 2 Jul 2017 16:11:04 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1499011861.247ffd39f221d14cf084a5119a5675b626837c1b.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/udev/, sys-fs/udev/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-fs/udev/files/233-format-warnings.patch sys-fs/udev/udev-233.ebuild X-VCS-Directories: sys-fs/udev/files/ sys-fs/udev/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 247ffd39f221d14cf084a5119a5675b626837c1b X-VCS-Branch: master Date: Sun, 2 Jul 2017 16:11:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6233cf3b-7c0a-41a6-9472-011d316ffaf4 X-Archives-Hash: a151d799469069d2c32a8c8ea0adb588 commit: 247ffd39f221d14cf084a5119a5675b626837c1b Author: Mike Gilbert gentoo org> AuthorDate: Sun Jul 2 16:10:50 2017 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Sun Jul 2 16:11:01 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=247ffd39 sys-fs/udev: fix build failure on alpha/ia64 Bug: https://bugs.gentoo.org/612102 Package-Manager: Portage-2.3.6_p9, Repoman-2.3.2_p77 sys-fs/udev/files/233-format-warnings.patch | 84 +++++++++++++++++++++++++++++ sys-fs/udev/udev-233.ebuild | 18 ++----- 2 files changed, 89 insertions(+), 13 deletions(-) diff --git a/sys-fs/udev/files/233-format-warnings.patch b/sys-fs/udev/files/233-format-warnings.patch new file mode 100644 index 00000000000..7bb08f0a320 --- /dev/null +++ b/sys-fs/udev/files/233-format-warnings.patch @@ -0,0 +1,84 @@ +From 3e7d14d78c4d15ec7789299216cbf5c58e61547b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sat, 3 Jun 2017 05:41:17 -0400 +Subject: [PATCH] sd-bus: silence format warnings in kdbus code (#6072) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The code is mostly correct, but gcc is trying to outsmart us, and emits a +warning for a "llu vs lu" mismatch, even though they are the same size (on alpha): + +src/libsystemd/sd-bus/bus-control.c: In function ‘kernel_get_list’: +src/libsystemd/sd-bus/bus-control.c:267:42: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__u64 {aka long unsigned int}’ [-Werror=format=] + if (asprintf(&n, ":1.%llu", name->id) < 0) { + ^ +src/libsystemd/sd-bus/bus-control.c: In function ‘bus_get_name_creds_kdbus’: +src/libsystemd/sd-bus/bus-control.c:714:47: error: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘__u64 {aka long unsigned int}’ [-Werror=format=] + if (asprintf(&c->unique_name, ":1.%llu", conn_info->id) < 0) { + ^ +This is hard to work around properly, because kdbus.h uses __u64 which is +defined-differently-despite-being-the-same-size then uint64_t. Thus the simple +solution of using %PRIu64 fails on amd64: + +src/libsystemd/sd-bus/bus-control.c:714:47: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘__u64 {aka long long unsigned int}’ [-Werror=format=] + if (asprintf(&c->unique_name, ":1.%"PRIu64, conn_info->id) < 0) { + ^~~~~~ + +Let's just avoid the whole issue for now by silencing the warning. +After the next release, we should just get rid of the kdbus code. + +Fixes #5561. +--- + src/libsystemd/sd-bus/bus-control.c | 6 ++++++ + src/libsystemd/sd-bus/bus-kernel.c | 2 ++ + 2 files changed, 8 insertions(+) + +diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c +index 9e58ffbd8..303ae0f23 100644 +--- a/src/libsystemd/sd-bus/bus-control.c ++++ b/src/libsystemd/sd-bus/bus-control.c +@@ -264,10 +264,13 @@ static int kernel_get_list(sd_bus *bus, uint64_t flags, char ***x) { + if ((flags & KDBUS_LIST_UNIQUE) && name->id != previous_id && !(name->flags & KDBUS_HELLO_ACTIVATOR)) { + char *n; + ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wformat" + if (asprintf(&n, ":1.%llu", name->id) < 0) { + r = -ENOMEM; + goto fail; + } ++#pragma GCC diagnostic pop + + r = strv_consume(x, n); + if (r < 0) +@@ -711,10 +714,13 @@ int bus_get_name_creds_kdbus( + } + + if (mask & SD_BUS_CREDS_UNIQUE_NAME) { ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wformat" + if (asprintf(&c->unique_name, ":1.%llu", conn_info->id) < 0) { + r = -ENOMEM; + goto fail; + } ++#pragma GCC diagnostic pop + + c->mask |= SD_BUS_CREDS_UNIQUE_NAME; + } +diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c +index c82caeb3f..ca6aee7c0 100644 +--- a/src/libsystemd/sd-bus/bus-kernel.c ++++ b/src/libsystemd/sd-bus/bus-kernel.c +@@ -51,6 +51,8 @@ + #include "user-util.h" + #include "util.h" + ++#pragma GCC diagnostic ignored "-Wformat" ++ + #define UNIQUE_NAME_MAX (3+DECIMAL_STR_MAX(uint64_t)) + + int bus_kernel_parse_unique_name(const char *s, uint64_t *id) { +-- +2.13.2 + diff --git a/sys-fs/udev/udev-233.ebuild b/sys-fs/udev/udev-233.ebuild index 8662d86b43c..7cdbc7e3da1 100644 --- a/sys-fs/udev/udev-233.ebuild +++ b/sys-fs/udev/udev-233.ebuild @@ -9,13 +9,7 @@ if [[ ${PV} = 9999* ]]; then EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd" inherit git-r3 else - patchset= SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz" - if [[ -n "${patchset}" ]]; then - SRC_URI+=" - https://dev.gentoo.org/~williamh/dist/${P}-patches-${patchset}.tar.xz - https://dev.gentoo.org/~ssuominen/${P}-patches-${patchset}.tar.xz" - fi KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" fi @@ -61,6 +55,10 @@ PDEPEND=">=sys-apps/hwids-20140304[udev] S=${WORKDIR}/systemd-${PV} +PATCHES=( + "${FILESDIR}"/233-format-warnings.patch +) + check_default_rules() { # Make sure there are no sudden changes to upstream rules file # (more for my own needs than anything else ...) @@ -104,11 +102,6 @@ src_prepare() { fi fi - # backport some patches - if [[ -n "${patchset}" ]]; then - eapply "${WORKDIR}"/patch - fi - cat <<-EOF > "${T}"/40-gentoo.rules # Gentoo specific floppy and usb groups ACTION=="add", SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy" @@ -121,8 +114,7 @@ src_prepare() { # stub out the am_path_libcrypt function echo 'AC_DEFUN([AM_PATH_LIBGCRYPT],[:])' > m4/gcrypt.m4 - # apply user patches - eapply_user + default eautoreconf