RPM Community Forums

Mailing List Message of <popt-devel>

Long-standing bug in popt with respect to /.popt

From: Peter Backes <rtc@helen.PLASMA.Xg8.DE>
Date: Sat 10 Jun 2017 - 22:26:06 CEST
Message-ID: <20170610202606.GA2968@helen.PLASMA.Xg8.DE>
Hello,

popt ignores /.popt if /etc/popt.d is empty.

See https://bugzilla.redhat.com/show_bug.cgi?id=1051685 (you can find a 
patch there).

Oddly enough, the current CVS version reads /.popt, but only 
because it has another bug which causes it to ignore /etc/popt.d 
completely. Here is a patch for that bug:

Index: poptconfig.c
===================================================================
RCS file: /v/rpm/cvs/popt/poptconfig.c,v
retrieving revision 1.67
diff -u -r1.67 poptconfig.c
--- poptconfig.c	27 Jun 2016 03:00:40 -0000	1.67
+++ poptconfig.c	10 Jun 2017 20:16:30 -0000
@@ -509,11 +509,11 @@
 #if defined(HAVE_GLOB_H)
     {
     struct stat sb;
-    if (!stat("SYSCONFDIR/popt.d", &sb) && S_ISDIR(sb.st_mode)) {
+    if (!stat(SYSCONFDIR "/popt.d", &sb) && S_ISDIR(sb.st_mode)) {
 	const char ** av = NULL;
 	int ac = 0;
 
-	if ((rc = poptGlob(con, "SYSCONFDIR/popt.d/*", &ac, &av)) == 0) {
+	if ((rc = poptGlob(con, SYSCONFDIR "/popt.d/*", &ac, &av)) == 0) {
 	    int i;
 	    for (i = 0; rc == 0 && i < ac; i++) {
 		const char * fn = av[i];

When will a new version of popt be released? The most recent version, 
1.16, is now over seven years old! The current CVS version seems to be 
under active development. Please put out a new version of popt.

Best wishes
Peter
-- 
Peter Backes, rtc@helen.PLASMA.Xg8.DE
Received on Sat Jun 10 23:45:01 2017
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.