Bug 175812 - [patch] misc/findutils update to 4.5.11
Summary: [patch] misc/findutils update to 4.5.11
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ruslan Makhmatkhanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-04 04:50 UTC by Klaus Aehlig
Modified: 2013-02-17 05:40 UTC (History)
0 users

See Also:


Attachments
findutils.diff (7.07 KB, patch)
2013-02-04 04:50 UTC, Klaus Aehlig
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Aehlig 2013-02-04 04:50:00 UTC
	Update to Version 4.5.11 [1] plus fix for Bug #38239 [2]

        [1] http://lists.gnu.org/archive/html/bug-findutils/2013-02/msg00013.html
        [2] http://savannah.gnu.org/bugs/?38239

Fix: Apply the following patch. The file files/patch-locate__locate.c is
	newly added.
Comment 1 Klaus Aehlig 2013-02-04 05:01:35 UTC
The correct URL of the release announcement is

[1] http://lists.gnu.org/archive/html/bug-findutils/2013-02/msg00000.html

Sorry for the typo.
Comment 2 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2013-02-17 05:25:21 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rm

I will take it.
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-02-17 05:33:25 UTC
Author: rm
Date: Sun Feb 17 05:33:16 2013
New Revision: 312401
URL: http://svnweb.freebsd.org/changeset/ports/312401

Log:
  - update to 4.5.11, see changelog [1]
  - add upstream bug-fix that preventing some segfaults [2]
  
  while here:
  - trim Makefile header
  - remove indefinite article from COMMENT
  - convert to optionsng (NLS case)
  
  [1] http://lists.gnu.org/archive/html/bug-findutils/2013-02/msg00000.html
  [2] http://savannah.gnu.org/bugs/?38239
  
  PR:		175812
  Submitted by:	Klaus Aehlig <aehlig@linta.de> (maintainer)

Added:
  head/misc/findutils/files/patch-locate__locate.c   (contents, props changed)
Modified:
  head/misc/findutils/Makefile   (contents, props changed)
  head/misc/findutils/distinfo   (contents, props changed)
  head/misc/findutils/files/patch-gnulib-lib-fdopendir.c   (contents, props changed)

Modified: head/misc/findutils/Makefile
==============================================================================
--- head/misc/findutils/Makefile	Sun Feb 17 04:18:23 2013	(r312400)
+++ head/misc/findutils/Makefile	Sun Feb 17 05:33:16 2013	(r312401)
@@ -1,13 +1,8 @@
-# New ports collection makefile for:	findutils
-# Date created:				29 March 2000
-# Whom:					Robert Withrow <witr@rwwa.com>
-#
+# Created by: Robert Withrow <witr@rwwa.com>
 # $FreeBSD$
-#
 
 PORTNAME=	findutils
-PORTVERSION=	4.5.10
-PORTREVISION=	2
+PORTVERSION=	4.5.11
 CATEGORIES=	misc
 MASTER_SITES=	${MASTER_SITE_GNU_ALPHA}
 MASTER_SITE_SUBDIR=	findutils
@@ -15,7 +10,7 @@ DISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${
 EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
 
 MAINTAINER=	aehlig@linta.de
-COMMENT=	The GNU find utilities
+COMMENT=	GNU find utilities
 
 SIG_FILES=	${DISTNAME}${EXTRACT_SUFX}.sig
 GNU_CONFIGURE=	yes
@@ -24,7 +19,9 @@ LDFLAGS+=	-L${LOCALBASE}/lib
 
 USE_GMAKE=	yes
 
-.if !defined(WITHOUT_NLS)
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MNLS}
 USE_GETTEXT=	yes
 PLIST_SUB+=	NLS=""
 .else
@@ -37,7 +34,7 @@ MAKE_ARGS=	INSTALL_SCRIPT="${INSTALL_SCR
 MAKE_JOBS_SAFE=	yes
 
 INFO=		find find-maint
-MAN1=		gfind.1 gxargs.1 glocate.1 gupdatedb.1
+MAN1=		gfind.1 gxargs.1 glocate.1 gupdatedb.1 goldfind.1
 MAN5=		glocatedb.5
 
 LOCALSTATEDIR?=	/var/db

Modified: head/misc/findutils/distinfo
==============================================================================
--- head/misc/findutils/distinfo	Sun Feb 17 04:18:23 2013	(r312400)
+++ head/misc/findutils/distinfo	Sun Feb 17 05:33:16 2013	(r312401)
@@ -1,4 +1,4 @@
-SHA256 (findutils-4.5.10.tar.gz) = fe24bbce55ac8f136080e01c03e7ae8b5ab395550625c25860efcbbe0641af76
-SIZE (findutils-4.5.10.tar.gz) = 2745375
-SHA256 (findutils-4.5.10.tar.gz.sig) = 072d3b0dee701cddba58088fc271c09d964410054562d666440f187bef47be8b
-SIZE (findutils-4.5.10.tar.gz.sig) = 152
+SHA256 (findutils-4.5.11.tar.gz) = 75e823592d917f1ac853a35cf46d6deeeb3b984240331ad1723f60da1a725d22
+SIZE (findutils-4.5.11.tar.gz) = 3116431
+SHA256 (findutils-4.5.11.tar.gz.sig) = 4fd79ba6ab6acd7e340ad8878ae82112a503ef1f708fd5ba02cb94fe4a66d27f
+SIZE (findutils-4.5.11.tar.gz.sig) = 152

Modified: head/misc/findutils/files/patch-gnulib-lib-fdopendir.c
==============================================================================
--- head/misc/findutils/files/patch-gnulib-lib-fdopendir.c	Sun Feb 17 04:18:23 2013	(r312400)
+++ head/misc/findutils/files/patch-gnulib-lib-fdopendir.c	Sun Feb 17 05:33:16 2013	(r312401)
@@ -1,5 +1,5 @@
---- gnulib/lib/fdopendir.c.orig	2011-04-02 15:37:38.000000000 +0000
-+++ gnulib/lib/fdopendir.c	2011-05-30 21:05:02.000000000 +0000
+--- gl/lib/fdopendir.c.orig	2012-12-15 14:42:45.000000000 +0100
++++ gl/lib/fdopendir.c	2013-02-02 17:11:52.000000000 +0100
 @@ -182,9 +182,11 @@
  
  # include <errno.h>
@@ -12,4 +12,3 @@
  /* Like fdopendir, but work around GNU/Hurd bug by validating FD.  */
  
  DIR *
-

Added: head/misc/findutils/files/patch-locate__locate.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/misc/findutils/files/patch-locate__locate.c	Sun Feb 17 05:33:16 2013	(r312401)
@@ -0,0 +1,154 @@
+diff locate/locate.c.orig locate/locate.c
+--- locate/locate.c.orig
++++ locate/locate.c
+@@ -1546,12 +1546,19 @@ opendb (const char *name)
+   return fd;
+ }
+ 
++static void
++cleanup_quote_opts (void)
++{
++  free (quote_opts);
++}
++
++
+ int
+ dolocate (int argc, char **argv, int secure_db_fd)
+ {
+-  char *path_element;
++  char *path_element = NULL;
+   size_t path_element_pos, path_element_len;
+-  const char *locate_path;
++  const char *user_selected_locate_path;
+   const char *db_name;
+   const char *path_separators = ":";
+   unsigned long int found = 0uL;
+@@ -1565,7 +1572,6 @@ dolocate (int argc, char **argv, int secure_db_fd)
+   int stats = 0;
+   int op_and = 0;
+   FILE *fp;
+-  int they_chose_db = 0;
+   bool did_stdin = false;       /* Set to prevent rereading stdin. */
+ 
+   if (argv[0])
+@@ -1580,19 +1586,19 @@ dolocate (int argc, char **argv, int secure_db_fd)
+   textdomain (PACKAGE);
+   atexit (close_stdout);
+ 
++  quote_opts = clone_quoting_options (NULL);
++  atexit (cleanup_quote_opts);
++
+   limits.limit = 0;
+   limits.items_accepted = 0;
+ 
+-  quote_opts = clone_quoting_options (NULL);
+   print_quoted_filename = true;
+ 
+   /* We cannot simultaneously trust $LOCATE_PATH and use the
+    * setuid-access-controlled database,, since that could cause a leak
+    * of private data.
+    */
+-  locate_path = getenv ("LOCATE_PATH");
+-  if (locate_path)
+-    they_chose_db = 1;
++  user_selected_locate_path = getenv ("LOCATE_PATH");
+ 
+   check_existence = ACCEPT_EITHER;
+ 
+@@ -1624,8 +1630,8 @@ dolocate (int argc, char **argv, int secure_db_fd)
+           break;
+ 
+         case 'd':
+-          locate_path = optarg;
+-          they_chose_db = 1;
++          user_selected_locate_path = optarg;
++	  assert (optarg != NULL);
+           break;
+ 
+         case 'e':
+@@ -1715,7 +1721,7 @@ dolocate (int argc, char **argv, int secure_db_fd)
+   /* If the user gave the -d option or set LOCATE_PATH,
+    * relinquish access to the secure database.
+    */
+-  if (they_chose_db)
++  if (user_selected_locate_path)
+     {
+       if (secure_db_fd >= 0)
+         {
+@@ -1741,15 +1747,16 @@ dolocate (int argc, char **argv, int secure_db_fd)
+         }
+     }
+ 
+-
+   if (1 == isatty (STDOUT_FILENO))
+     stdout_is_a_tty = true;
+   else
+     stdout_is_a_tty = false;
+ 
+-  if (they_chose_db)
+-    splitstring (locate_path, path_separators, true,
+-                 &path_element_pos, &path_element_len);
++  if (user_selected_locate_path)
++    {
++      splitstring (user_selected_locate_path, path_separators, true,
++		   &path_element_pos, &path_element_len);
++    }
+ 
+   /* Bail out early if limit already reached. */
+   while (!use_limit || limits.limit > limits.items_accepted)
+@@ -1765,10 +1772,11 @@ dolocate (int argc, char **argv, int secure_db_fd)
+       statistics.newline_count =
+       statistics.highbit_filename_count = 0u;
+ 
+-      if (they_chose_db)
++      if (user_selected_locate_path)
+         {
+           /* Take the next element from the list of databases */
+-          if (1 == path_element_len && '-' == locate_path[path_element_pos])
++          if (1 == path_element_len
++	      && '-' == user_selected_locate_path[path_element_pos])
+             {
+               if (did_stdin)
+                 {
+@@ -1787,13 +1795,13 @@ dolocate (int argc, char **argv, int secure_db_fd)
+             {
+               if (0 == path_element_len
+                   || (1 == path_element_len
+-                      && '.' == locate_path[path_element_pos]))
++                      && '.' == user_selected_locate_path[path_element_pos]))
+                 {
+                   db_name = LOCATE_DB;
+                 }
+               else
+                 {
+-                  path_element = strndup (&locate_path[path_element_pos],
++                  path_element = strndup (&user_selected_locate_path[path_element_pos],
+                                           path_element_len);
+                   db_name = path_element;
+                 }
+@@ -1889,11 +1897,20 @@ dolocate (int argc, char **argv, int secure_db_fd)
+           free (path_element);
+           path_element = NULL;
+         }
+-      if (!splitstring (locate_path, path_separators, false,
+-                        &path_element_pos, &path_element_len))
+-        {
+-          break;
+-        }
++
++       if (!user_selected_locate_path)
++	 {
++	   /* We're not actually iterating through the values in
++	      $LOCATE_PATH so we don't want to check for the next
++	      element in user_selected_locate_path (since we manually set db_name =
++	      LOCATE_DB without using user_selected_locate_path). */
++	   break;
++	 }
++       else if (!splitstring (user_selected_locate_path, path_separators, false,
++			      &path_element_pos, &path_element_len))
++	 {
++	   break;
++	 }
+     }
+ 
+   if (just_count)
\ No newline at end of file
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2013-02-17 05:33:55 UTC
State Changed
From-To: open->closed

Committed, thank you!