From patchwork Thu Aug 10 12:30:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 22060 Received: (qmail 85849 invoked by alias); 10 Aug 2017 12:31:04 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 62886 invoked by uid 89); 10 Aug 2017 12:30:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 90FFDC0079B1 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer@redhat.com Date: Thu, 10 Aug 2017 14:30:22 +0200 To: libc-alpha@sourceware.org Subject: [PATCH] scripts/test-installation.pl: Handle NSS crypto libraries [BZ #21940] User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20170810123022.6DB7B439942E1@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) The warning looked like this: Use of uninitialized value in string ne at …/scripts/test-installation.pl line 184, line 24. It is triggered by this line of ldd output: libfreebl3.so => /lib64/libfreebl3.so (0x00007f055003c000) The other lines have a version in the soname: libanl.so.1 => /lib64/libanl.so.1 (0x00007f055023f000) 2017-08-10 Florian Weimer [BZ #21940] * scripts/test-installation.pl: Handle NSS crypto libaries in ldd output. diff --git a/scripts/test-installation.pl b/scripts/test-installation.pl index 4b0e9f3c4a..466c526cc9 100755 --- a/scripts/test-installation.pl +++ b/scripts/test-installation.pl @@ -177,10 +177,15 @@ open LDD, "ldd /tmp/test-prg$$ |" or die ("Couldn't execute ldd"); while () { if (/^\s*lib/) { + # When libcrypt is linked against NSS, some of the referenced + # libraries do not have a trailing version in their soname. ($name, $version1, $version2) = - /^\s*lib(\w*)\.so\.([0-9\.]*)\s*=>.*\.so\.([0-9\.]*)/; + /^\s*lib(\w*)\.so(?:\.([0-9\.]*))?\s*=>.*\.so(?:\.([0-9\.]*))?/; $found{$name} = 1; - if ($versions{$name} ne $version1 || $version1 ne $version2) { + if (defined($version1) != defined($version2) + || defined($version1) != defined($versions{$name}) + || (defined($versions{$name}) + && ($versions{$name} ne $version1 || $version1 ne $version2))) { print "Library lib$name is not correctly installed.\n"; print "Please check your installation!\n"; print "Offending line of ldd output: $_\n";