From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hall.aurel32.net (hall.aurel32.net [IPv6:2001:bc8:30d7:100::1]) by sourceware.org (Postfix) with ESMTPS id 939E6388A834 for ; Tue, 21 Jul 2020 12:07:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 939E6388A834 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=aurel32.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=aurelien@aurel32.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Content-Transfer-Encoding:From:Reply-To: Subject:Content-ID:Content-Description:X-Debbugs-Cc; bh=C1MKeiR8F04/LILUvKdrgR42G9ZU4DAUgeM9CnXsq9Q=; b=Mwg7HL0VMNdFhC2pAIFql7L6h6 xmxVP7FxAF+kyY7XL3v2Y7276Ge9CkQyroPpj057PYLDhLeHBGAPNw5eT6XtTMTWrrIa89ARdhgZ5 zt759K6CkZOcPqwzA8My8W3AR5WopfTrgP8KKyDDwdTfg/Qr7w0ytZJseM1Ra/r/mhsFXowUWj3zb 1WNudSuR/jLy5kglfNRsAGybbWYXLgavL2eNsmkFz9RWMweTfIxCgLVVDCLq4xkA0a3THnRXGQtC6 GDIZJletMYiqvQuiEbazBoQRlW7VQ37HQ7NnmCS4PoA/YMnMtl9sB1H56t/Nk9XRZ3DrFCdzYA0y/ JfOJcjZQ==; Received: from [2a01:e35:2fdd:a4e1:fe91:fc89:bc43:b814] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jxr3c-00048i-NN; Tue, 21 Jul 2020 14:07:40 +0200 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.94) (envelope-from ) id 1jxr3c-000xOZ-4i; Tue, 21 Jul 2020 14:07:40 +0200 Date: Tue, 21 Jul 2020 14:07:40 +0200 From: Aurelien Jarno To: Arjun Shankar Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] makedb: fix build with libselinux >= 3.1 Message-ID: <20200721120740.GE8268@aurel32.net> Mail-Followup-To: Arjun Shankar , libc-alpha@sourceware.org References: <20200721050115.204181-1-aurelien@aurel32.net> <20200721111517.GA43397@aloka.lostca.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200721111517.GA43397@aloka.lostca.se> User-Agent: Mutt/1.14.0 (2020-05-02) X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2020 12:07:43 -0000 On 2020-07-21 11:15, Arjun Shankar wrote: > On Tue, Jul 21, 2020 at 07:01:16AM +0200, Aurelien Jarno wrote: > > glibc doesn't build with libselinux 3.1 that has been released recently > > due to new deprecations introduced in that version and the fact that > > glibc is built with -Werror by default: > > > > | makedb.c: In function ???set_file_creation_context???: > > | makedb.c:849:3: error: ???security_context_t??? is deprecated [-Werror=deprecated-declarations] > > | 849 | security_context_t ctx; > > | | ^~~~~~~~~~~~~~~~~~ > > | makedb.c:863:3: error: ???matchpathcon??? is deprecated: Use selabel_lookup instead [-Werror=deprecated-declarations] > > | 863 | if (matchpathcon (outname, S_IFREG | mode, &ctx) == 0 && ctx != NULL) > > | | ^~ > > | In file included from makedb.c:50: > > | /usr/include/selinux/selinux.h:500:12: note: declared here > > | 500 | extern int matchpathcon(const char *path, > > | | ^~~~~~~~~~~~ > > | cc1: all warnings being treated as errors > > I ran into this a few days ago trying to build master for Fedora rawhide: > > I filed this bug, and have a patch that started off quite similarly to > the one you posted. Here's the bug: > > https://sourceware.org/bugzilla/show_bug.cgi?id=26233 > > > This patch is an attempt to fix that. It has only built tested, as I do > > not have a system nor the knowledge to test that. I have checked that > > the functions used as replacement are available since at least selinux > > 2.0.96, released more than 10 years ago, so we probably do not need any > > version check in the configure script. > > Unfortunately, it seems like there is more. nscd build also fails because, > e.g., avc_init was deprecated and needs to be replaced with calls to > avc_open and selinux_set_callback. I'm working on that at the moment. > > Have you been building with --disable-build-nscd? That does cause build to > succeed with the patch I have so far (very similar to yours because I've > not fixed nscd/selinux.c yet). No, I have found the same issue with nscd/selinux.c, that's just because I wanted to decide on a strategy before continuing. We need an additional string in case of SELinux context error, which from what I understand is forbidden at this stage of the release. Therefore we might have to use #pragma instead to ignore the warning for the 2.32 release. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net