From patchwork Sat Apr 17 03:45:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Weiman X-Patchwork-Id: 1904 Return-Path: Delivered-To: patchwork@archlinux.org Received: from mail.archlinux.org [95.216.189.61] by patchwork.archlinux.org with IMAP (fetchmail-6.4.18) for (single-drop); Sat, 17 Apr 2021 03:45:58 +0000 (UTC) Received: from mail.archlinux.org by mail.archlinux.org with LMTP id OPCnJfVZemBzEgQAK+/4rw (envelope-from ) for ; Sat, 17 Apr 2021 03:45:57 +0000 Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id BDEFF502E0A; Sat, 17 Apr 2021 03:45:56 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 704E02C600; Sat, 17 Apr 2021 03:45:56 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id E4F122C5FE for ; Sat, 17 Apr 2021 03:45:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on luna.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001,RCVD_IN_MSPIKE_WL=0.001, T_DMARC_TESTS_FAIL=0.01 autolearn=failed autolearn_force=no version=3.4.5 X-Spam-BL-Results: [127.0.9.2] [127.0.0.19] Received: from mail.archlinux.org (mail.archlinux.org [95.216.189.61]) by luna.archlinux.org (Postfix) with ESMTPS for ; Sat, 17 Apr 2021 03:45:51 +0000 (UTC) Received: from mail.markzz.net (duna.markzz.net [209.50.56.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id F2034502E03 for ; Sat, 17 Apr 2021 03:45:50 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2601:410:81:a4a0:3489:7d93:11:f11e]) by mail.markzz.net (Postfix) with ESMTPSA id 7B10C4109ABD for ; Fri, 16 Apr 2021 23:45:46 -0400 (EDT) From: Mark Weiman To: pacman-dev@archlinux.org Date: Fri, 16 Apr 2021 23:45:20 -0400 Message-Id: <20210417034524.204755-2-mark.weiman@markzz.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210417034524.204755-1-mark.weiman@markzz.com> References: <20210416194209.191245-1-mark.weiman@markzz.com> <20210417034524.204755-1-mark.weiman@markzz.com> MIME-Version: 1.0 Subject: [pacman-dev] [PATCH 1/5] Fix check for FSSTATSTYPE X-BeenThere: pacman-dev@lists.archlinux.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion list for pacman development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Discussion list for pacman development Errors-To: pacman-dev-bounces@lists.archlinux.org Sender: "pacman-dev" Authentication-Results: mail.archlinux.org; dkim=none; dmarc=none; spf=pass (mail.archlinux.org: domain of pacman-dev-bounces@lists.archlinux.org designates 5.9.250.164 as permitted sender) smtp.mailfrom=pacman-dev-bounces@lists.archlinux.org X-Rspamd-Queue-Id: BDEFF502E0A X-Spamd-Result: default: False [4.49 / 15.00]; HAS_REPLYTO(0.00)[pacman-dev@lists.archlinux.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM(0.00)[0.893]; R_MISSING_CHARSET(2.50)[]; R_SPF_ALLOW(-0.20)[+ip4:5.9.250.164]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; GREYLIST(0.00)[pass,body]; MID_CONTAINS_FROM(1.00)[]; MAILLIST(-0.20)[mailman]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[markzz.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:5.9.0.0/16, country:DE]; FROM_NEQ_ENVFROM(0.00)[mark.weiman@markzz.com,pacman-dev-bounces@lists.archlinux.org]; FORGED_SENDER_MAILLIST(0.00)[] X-Rspamd-Server: mail.archlinux.org On FreeBSD, both `struct statvfs` and `struct statfs` satisfy the conditions where the `f_flag` and `f_flags` fields are present in both respectively. This patch accomplishes a couple of things: 1. Adds a check for `f_mntonname` in both structs and makes a decision to choose statfs if the field is not present in statvfs, but is in statfs. 2. Corrects a small error where the values of those checks are just checked for their presence and not whether its true or false. Signed-off-by: Mark Weiman --- meson.build | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 579ff2ed..483c4fbd 100644 --- a/meson.build +++ b/meson.build @@ -154,6 +154,9 @@ foreach member : [ ['struct statvfs', 'f_flag', '''#include '''], ['struct statfs', 'f_flags', '''#include #include '''], + ['struct statvfs', 'f_mntonname', '''#include '''], + ['struct statfs', 'f_mntonname', '''#include + #include '''], ] have = cc.has_member(member[0], member[1], prefix : member[2]) conf.set('HAVE_' + '_'.join([member[0], member[1]]).underscorify().to_upper(), have) @@ -174,9 +177,13 @@ foreach type : [ endif endforeach -if conf.has('HAVE_STRUCT_STATVFS_F_FLAG') +if conf.get('HAVE_STRUCT_STATVFS_F_FLAG', false) conf.set('FSSTATSTYPE', 'struct statvfs') -elif conf.has('HAVE_STRUCT_STATFS_F_FLAGS') +elif conf.get('HAVE_STRUCT_STATFS_F_FLAGS', false) + conf.set('FSSTATSTYPE', 'struct statfs') +endif + +if not conf.get('HAVE_STRUCT_STATVFS_F_MNTONNAME', false) and conf.get('HAVE_STRUCT_STATFS_F_MNTONNAME', false) conf.set('FSSTATSTYPE', 'struct statfs') endif From patchwork Sat Apr 17 03:45:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Weiman X-Patchwork-Id: 1905 Return-Path: Delivered-To: patchwork@archlinux.org Received: from mail.archlinux.org [95.216.189.61] by patchwork.archlinux.org with IMAP (fetchmail-6.4.18) for (single-drop); Sat, 17 Apr 2021 03:46:00 +0000 (UTC) Received: from mail.archlinux.org by mail.archlinux.org with LMTP id iFQDFvhZemDJEgQAK+/4rw (envelope-from ) for ; Sat, 17 Apr 2021 03:46:00 +0000 Received: from luna.archlinux.org (luna.archlinux.org [IPv6:2a01:4f8:160:3033::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id B9D6D502E15; Sat, 17 Apr 2021 03:45:59 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 9C82A2C701; Sat, 17 Apr 2021 03:45:56 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id ECFDE2C600 for ; Sat, 17 Apr 2021 03:45:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on luna.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001,RCVD_IN_MSPIKE_WL=0.001, T_DMARC_TESTS_FAIL=0.01 autolearn=failed autolearn_force=no version=3.4.5 X-Spam-BL-Results: [127.0.9.2] [127.0.0.19] Received: from mail.archlinux.org (mail.archlinux.org [95.216.189.61]) by luna.archlinux.org (Postfix) with ESMTPS for ; Sat, 17 Apr 2021 03:45:51 +0000 (UTC) Received: from mail.markzz.net (duna.markzz.net [IPv6:2605:7380:1000:1310:44e9:52ff:feb9:18c4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id 7DEA9502E05 for ; Sat, 17 Apr 2021 03:45:51 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2601:410:81:a4a0:3489:7d93:11:f11e]) by mail.markzz.net (Postfix) with ESMTPSA id 3F0844109ABE for ; Fri, 16 Apr 2021 23:45:47 -0400 (EDT) From: Mark Weiman To: pacman-dev@archlinux.org Date: Fri, 16 Apr 2021 23:45:21 -0400 Message-Id: <20210417034524.204755-3-mark.weiman@markzz.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210417034524.204755-1-mark.weiman@markzz.com> References: <20210416194209.191245-1-mark.weiman@markzz.com> <20210417034524.204755-1-mark.weiman@markzz.com> MIME-Version: 1.0 Subject: [pacman-dev] [PATCH 2/5] meson.build: Fix detection of symbols X-BeenThere: pacman-dev@lists.archlinux.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion list for pacman development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Discussion list for pacman development Errors-To: pacman-dev-bounces@lists.archlinux.org Sender: "pacman-dev" Authentication-Results: mail.archlinux.org; dkim=none; dmarc=none; spf=pass (mail.archlinux.org: domain of pacman-dev-bounces@lists.archlinux.org designates 2a01:4f8:160:3033::2 as permitted sender) smtp.mailfrom=pacman-dev-bounces@lists.archlinux.org X-Rspamd-Queue-Id: B9D6D502E15 X-Spamd-Result: default: False [4.49 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[pacman-dev@lists.archlinux.org]; RCVD_COUNT_FIVE(0.00)[6]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM(0.00)[0.889]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:160:3033::2:c]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; GREYLIST(0.00)[pass,meta]; MID_CONTAINS_FROM(1.00)[]; MAILLIST(-0.20)[mailman]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[markzz.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; FROM_NEQ_ENVFROM(0.00)[mark.weiman@markzz.com,pacman-dev-bounces@lists.archlinux.org]; FORGED_SENDER_MAILLIST(0.00)[] X-Rspamd-Server: mail.archlinux.org This patch changes the behavior of meson to define configuration options *only* when the symbol checked is present. Currently, it defines all of them in config.h whether the symbol exists or not and the code that looks for it doesn't check the macro's value, but whether it's defined. Signed-off-by: Mark Weiman --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 483c4fbd..14b3381a 100644 --- a/meson.build +++ b/meson.build @@ -146,7 +146,9 @@ foreach sym : [ 'tcflush', ] have = cc.has_function(sym, args : '-D_GNU_SOURCE') - conf.set10('HAVE_' + sym.to_upper(), have) + if have + conf.set10('HAVE_' + sym.to_upper(), have) + endif endforeach foreach member : [ From patchwork Sat Apr 17 03:45:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Weiman X-Patchwork-Id: 1906 Return-Path: Delivered-To: patchwork@archlinux.org Received: from mail.archlinux.org [95.216.189.61] by patchwork.archlinux.org with IMAP (fetchmail-6.4.18) for (single-drop); Sat, 17 Apr 2021 03:46:10 +0000 (UTC) Received: from mail.archlinux.org by mail.archlinux.org with LMTP id EBFnJwFaemDHEgQAK+/4rw (envelope-from ) for ; Sat, 17 Apr 2021 03:46:09 +0000 Received: from luna.archlinux.org (luna.archlinux.org [IPv6:2a01:4f8:160:3033::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id 443F6502E2F; Sat, 17 Apr 2021 03:46:09 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 27D3A2C6FD; Sat, 17 Apr 2021 03:46:00 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id BB7E32C6FB for ; Sat, 17 Apr 2021 03:45:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on luna.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001,RCVD_IN_MSPIKE_WL=0.001, T_DMARC_TESTS_FAIL=0.01 autolearn=failed autolearn_force=no version=3.4.5 X-Spam-BL-Results: [127.0.0.19] [127.0.9.2] Received: from mail.archlinux.org (mail.archlinux.org [95.216.189.61]) by luna.archlinux.org (Postfix) with ESMTPS for ; Sat, 17 Apr 2021 03:45:52 +0000 (UTC) Received: from mail.markzz.net (duna.markzz.net [IPv6:2605:7380:1000:1310:44e9:52ff:feb9:18c4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id 43F4D502E06 for ; Sat, 17 Apr 2021 03:45:52 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2601:410:81:a4a0:3489:7d93:11:f11e]) by mail.markzz.net (Postfix) with ESMTPSA id E8CB84109ABF for ; Fri, 16 Apr 2021 23:45:47 -0400 (EDT) From: Mark Weiman To: pacman-dev@archlinux.org Date: Fri, 16 Apr 2021 23:45:22 -0400 Message-Id: <20210417034524.204755-4-mark.weiman@markzz.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210417034524.204755-1-mark.weiman@markzz.com> References: <20210416194209.191245-1-mark.weiman@markzz.com> <20210417034524.204755-1-mark.weiman@markzz.com> MIME-Version: 1.0 Subject: [pacman-dev] [PATCH 3/5] Add an include for signal.h when needed X-BeenThere: pacman-dev@lists.archlinux.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion list for pacman development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Discussion list for pacman development Errors-To: pacman-dev-bounces@lists.archlinux.org Sender: "pacman-dev" Authentication-Results: mail.archlinux.org; dkim=none; dmarc=none; spf=pass (mail.archlinux.org: domain of pacman-dev-bounces@lists.archlinux.org designates 2a01:4f8:160:3033::2 as permitted sender) smtp.mailfrom=pacman-dev-bounces@lists.archlinux.org X-Rspamd-Queue-Id: 443F6502E2F X-Spamd-Result: default: False [4.49 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[pacman-dev@lists.archlinux.org]; RCVD_COUNT_FIVE(0.00)[6]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM(0.00)[0.889]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:160:3033::2:c]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; GREYLIST(0.00)[pass,meta]; MID_CONTAINS_FROM(1.00)[]; MAILLIST(-0.20)[mailman]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[markzz.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; FROM_NEQ_ENVFROM(0.00)[mark.weiman@markzz.com,pacman-dev-bounces@lists.archlinux.org]; FORGED_SENDER_MAILLIST(0.00)[] X-Rspamd-Server: mail.archlinux.org On Linux, signal.h is not required to have access to the signal constants. On FreeBSD, this is not the case and requires signal.h to be explicitly included. This patch adds an include for signal.h in any source file that uses it. Signed-off-by: Mark Weiman --- This is a modified patch that just adds signal.h to required files instead of adding a check within meson. lib/libalpm/util.c | 1 + src/pacman/conf.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index b386fde6..46c1d0a1 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -33,6 +33,7 @@ #include #include #include +#include /* libarchive */ #include diff --git a/src/pacman/conf.c b/src/pacman/conf.c index a4f2ba35..cde96716 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -31,6 +31,7 @@ #include /* uname */ #include #include +#include /* pacman */ #include "conf.h" From patchwork Sat Apr 17 03:45:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Weiman X-Patchwork-Id: 1907 Return-Path: Delivered-To: patchwork@archlinux.org Received: from mail.archlinux.org [95.216.189.61] by patchwork.archlinux.org with IMAP (fetchmail-6.4.18) for (single-drop); Sat, 17 Apr 2021 03:46:14 +0000 (UTC) Received: from mail.archlinux.org by mail.archlinux.org with LMTP id CBeOJQVaemDJEgQAK+/4rw (envelope-from ) for ; Sat, 17 Apr 2021 03:46:13 +0000 Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id 3B13E502E3A; Sat, 17 Apr 2021 03:46:13 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 54D342C70D; Sat, 17 Apr 2021 03:46:00 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 68EE62C6FD for ; Sat, 17 Apr 2021 03:45:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on luna.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED=-2.3, T_DMARC_TESTS_FAIL=0.01 autolearn=failed autolearn_force=no version=3.4.5 X-Spam-BL-Results: [127.0.9.2] Received: from mail.archlinux.org (mail.archlinux.org [IPv6:2a01:4f9:c010:3052::1]) by luna.archlinux.org (Postfix) with ESMTPS for ; Sat, 17 Apr 2021 03:45:53 +0000 (UTC) Received: from mail.markzz.net (duna.markzz.net [IPv6:2605:7380:1000:1310:44e9:52ff:feb9:18c4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id E1919502E07 for ; Sat, 17 Apr 2021 03:45:52 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2601:410:81:a4a0:3489:7d93:11:f11e]) by mail.markzz.net (Postfix) with ESMTPSA id 9AA6E4109AC0 for ; Fri, 16 Apr 2021 23:45:48 -0400 (EDT) From: Mark Weiman To: pacman-dev@archlinux.org Date: Fri, 16 Apr 2021 23:45:23 -0400 Message-Id: <20210417034524.204755-5-mark.weiman@markzz.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210417034524.204755-1-mark.weiman@markzz.com> References: <20210416194209.191245-1-mark.weiman@markzz.com> <20210417034524.204755-1-mark.weiman@markzz.com> MIME-Version: 1.0 Subject: [pacman-dev] [PATCH 4/5] Fix build error when SIGPOLL is not available X-BeenThere: pacman-dev@lists.archlinux.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion list for pacman development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Discussion list for pacman development Errors-To: pacman-dev-bounces@lists.archlinux.org Sender: "pacman-dev" Authentication-Results: mail.archlinux.org; dkim=none; dmarc=none; spf=pass (mail.archlinux.org: domain of pacman-dev-bounces@lists.archlinux.org designates 5.9.250.164 as permitted sender) smtp.mailfrom=pacman-dev-bounces@lists.archlinux.org X-Rspamd-Queue-Id: 3B13E502E3A X-Spamd-Result: default: False [4.49 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[pacman-dev@lists.archlinux.org]; RCVD_COUNT_FIVE(0.00)[6]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM(0.00)[0.863]; R_SPF_ALLOW(-0.20)[+ip4:5.9.250.164:c]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; GREYLIST(0.00)[pass,meta]; MID_CONTAINS_FROM(1.00)[]; MAILLIST(-0.20)[mailman]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[markzz.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:5.9.0.0/16, country:DE]; FROM_NEQ_ENVFROM(0.00)[mark.weiman@markzz.com,pacman-dev-bounces@lists.archlinux.org]; FORGED_SENDER_MAILLIST(0.00)[] X-Rspamd-Server: mail.archlinux.org On Linux, SIGPOLL is a valid signal, but on systems like FreeBSD, it is not. This patch does a preprocessor check to see if SIGPOLL is available or not. Signed-off-by: Mark Weiman --- This is a modified patch where formatting is addressed and the check for SIGPOLL is done as a preprocessor macro rather than in meson. lib/libalpm/util.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index 46c1d0a1..1d9d85dd 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -558,8 +558,12 @@ static void _alpm_reset_signals(void) int *i, signals[] = { SIGABRT, SIGALRM, SIGBUS, SIGCHLD, SIGCONT, SIGFPE, SIGHUP, SIGILL, SIGINT, SIGKILL, SIGPIPE, SIGQUIT, SIGSEGV, SIGSTOP, SIGTERM, SIGTSTP, - SIGTTIN, SIGTTOU, SIGUSR1, SIGUSR2, SIGPOLL, SIGPROF, SIGSYS, SIGTRAP, - SIGURG, SIGVTALRM, SIGXCPU, SIGXFSZ, + SIGTTIN, SIGTTOU, SIGUSR1, SIGUSR2, SIGPROF, SIGSYS, SIGTRAP, SIGURG, + SIGVTALRM, SIGXCPU, SIGXFSZ, +#if defined(SIGPOLL) + /* this is needed for FreeBSD et al. */ + SIGPOLL, +#endif 0 }; struct sigaction def; From patchwork Sat Apr 17 03:45:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Weiman X-Patchwork-Id: 1908 Return-Path: Delivered-To: patchwork@archlinux.org Received: from mail.archlinux.org [95.216.189.61] by patchwork.archlinux.org with IMAP (fetchmail-6.4.18) for (single-drop); Sat, 17 Apr 2021 03:46:18 +0000 (UTC) Received: from mail.archlinux.org by mail.archlinux.org with LMTP id QK4BKQlaemDdEgQAK+/4rw (envelope-from ) for ; Sat, 17 Apr 2021 03:46:17 +0000 Received: from luna.archlinux.org (luna.archlinux.org [5.9.250.164]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits)) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id 443F5502E43; Sat, 17 Apr 2021 03:46:17 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id 7E47A2C711; Sat, 17 Apr 2021 03:46:01 +0000 (UTC) Received: from luna.archlinux.org (luna.archlinux.org [127.0.0.1]) by luna.archlinux.org (Postfix) with ESMTP id E6E242C5FE for ; Sat, 17 Apr 2021 03:45:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.5 (2021-03-20) on luna.archlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001,RCVD_IN_MSPIKE_WL=0.001, T_DMARC_TESTS_FAIL=0.01 autolearn=failed autolearn_force=no version=3.4.5 X-Spam-BL-Results: [127.0.9.2] [127.0.0.19] Received: from mail.archlinux.org (mail.archlinux.org [95.216.189.61]) by luna.archlinux.org (Postfix) with ESMTPS for ; Sat, 17 Apr 2021 03:45:55 +0000 (UTC) Received: from mail.markzz.net (duna.markzz.net [209.50.56.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.archlinux.org (Postfix) with ESMTPS id 9FB3E502E09 for ; Sat, 17 Apr 2021 03:45:53 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2601:410:81:a4a0:3489:7d93:11:f11e]) by mail.markzz.net (Postfix) with ESMTPSA id 64A8E4109AC1 for ; Fri, 16 Apr 2021 23:45:49 -0400 (EDT) From: Mark Weiman To: pacman-dev@archlinux.org Date: Fri, 16 Apr 2021 23:45:24 -0400 Message-Id: <20210417034524.204755-6-mark.weiman@markzz.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210417034524.204755-1-mark.weiman@markzz.com> References: <20210416194209.191245-1-mark.weiman@markzz.com> <20210417034524.204755-1-mark.weiman@markzz.com> MIME-Version: 1.0 Subject: [pacman-dev] [PATCH 5/5] meson-make-symlink.sh: Make compatible with non-GNU ln X-BeenThere: pacman-dev@lists.archlinux.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussion list for pacman development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Discussion list for pacman development Errors-To: pacman-dev-bounces@lists.archlinux.org Sender: "pacman-dev" Authentication-Results: mail.archlinux.org; dkim=none; dmarc=none; spf=pass (mail.archlinux.org: domain of pacman-dev-bounces@lists.archlinux.org designates 5.9.250.164 as permitted sender) smtp.mailfrom=pacman-dev-bounces@lists.archlinux.org X-Rspamd-Queue-Id: 443F5502E43 X-Spamd-Result: default: False [4.49 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[pacman-dev@lists.archlinux.org]; RCVD_COUNT_FIVE(0.00)[6]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM(0.00)[0.874]; R_SPF_ALLOW(-0.20)[+ip4:5.9.250.164:c]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; GREYLIST(0.00)[pass,meta]; MID_CONTAINS_FROM(1.00)[]; MAILLIST(-0.20)[mailman]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[markzz.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:5.9.0.0/16, country:DE]; FROM_NEQ_ENVFROM(0.00)[mark.weiman@markzz.com,pacman-dev-bounces@lists.archlinux.org]; FORGED_SENDER_MAILLIST(0.00)[] X-Rspamd-Server: mail.archlinux.org The "-T" flag is something available with GNU ln, but on other implementations of ln, "-T" is not an option. So, to make this script more portable, a strings check of ln for "GNU coreutils" is done to determine if "-T" should be used. Signed-off-by: Mark Weiman --- build-aux/meson-make-symlink.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build-aux/meson-make-symlink.sh b/build-aux/meson-make-symlink.sh index 501cd43d..24a0dd2c 100644 --- a/build-aux/meson-make-symlink.sh +++ b/build-aux/meson-make-symlink.sh @@ -4,9 +4,13 @@ set -eu # this is needed mostly because $DESTDIR is provided as a variable, # and we need to create the target directory... +# test if ln is GNU or not +LN_FLAG="-T" +strings /bin/ln | grep -q 'GNU coreutils' || LN_FLAG="" + mkdir -vp "$(dirname "${DESTDIR:-}$2")" if [ "$(dirname $1)" = . ]; then - ln -vfs -T "$1" "${DESTDIR:-}$2" + ln -vfs ${LN_FLAG} "$1" "${DESTDIR:-}$2" else - ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2" + ln -vfs ${LN_FLAG} --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2" fi