From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aloka.lostca.se (aloka.lostca.se [178.63.46.202]) by sourceware.org (Postfix) with ESMTPS id 1C72F384B106 for ; Tue, 21 Jul 2020 11:15:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1C72F384B106 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lostca.se Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arjun.is@lostca.se Received: from aloka.lostca.se (aloka [127.0.0.1]) by aloka.lostca.se (Postfix) with ESMTP id 2035987D6; Tue, 21 Jul 2020 11:15:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=lostca.se; h=date:from:to :cc:subject:message-id:references:mime-version:content-type :in-reply-to; s=howrah; bh=syiH6Uvpssoz5osrkl6Sg0VoRzc=; b=3DKf7 RJAATMbBghvd3VFqLUXLu7/EL/exuHxu2pmtP0uDyAhL5ltNdDrXZ0e6+KhN0AFz vreD8OpaqnfvoXNgMrYAmYGtoIG36g973o/XYOt7N+ob4zqeVFPdBDNN/g5Ij2q7 NtCun1L6V+dZLB4PJte11RWlYl0fN0zYlMnqWk= Received: from localhost (unknown [IPv6:2a01:4f8:120:624c::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aloka.lostca.se (Postfix) with ESMTPSA id D8BCE87D5; Tue, 21 Jul 2020 11:15:17 +0000 (UTC) Date: Tue, 21 Jul 2020 11:15:17 +0000 From: Arjun Shankar To: Aurelien Jarno Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] makedb: fix build with libselinux >= 3.1 Message-ID: <20200721111517.GA43397@aloka.lostca.se> References: <20200721050115.204181-1-aurelien@aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200721050115.204181-1-aurelien@aurel32.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, SPF_HELO_NONE, SPF_PASS, 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 11:15:21 -0000 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). Cheers, Arjun