pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files Misc man page fixes



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8dec484566d1
branches:  trunk
changeset: 531143:8dec484566d1
user:      adrianp <adrianp%pkgsrc.org@localhost>
date:      Sat Jul 21 10:21:04 2007 +0000

description:
Misc man page fixes
Update to autoconf 2.61
Add checks for AC_TYPE_UINT{8,16,32,64}_T
Add checks for stdint.h
Change how config file notification works
If no IGNORE_URLS directive is found then just say that
Check that pkg-vulnerabilities exists before we try any operations on it
Use st_ctime as opposed to st_ctimespec.tv_sec as the former is SUSv3
This update should fix PR #36655 and go part way to fixing PR #36662

Thanks to tnn@ and joerg@ for suggested fixes and Yakovetsky Vladimir and
 Stuart Shelton for testing and patches.

diffstat:

 pkgtools/pkg_install/files/audit-packages/audit-packages.c            |    36 +-
 pkgtools/pkg_install/files/audit-packages/audit-packages.conf.5.in    |    13 +-
 pkgtools/pkg_install/files/audit-packages/audit-packages.conf.cat5.in |    12 +-
 pkgtools/pkg_install/files/configure                                  |  6918 +++++----
 pkgtools/pkg_install/files/configure.ac                               |     6 +
 5 files changed, 3884 insertions(+), 3101 deletions(-)

diffs (truncated from 9893 to 300 lines):

diff -r 87d45a38bf46 -r 8dec484566d1 pkgtools/pkg_install/files/audit-packages/audit-packages.c
--- a/pkgtools/pkg_install/files/audit-packages/audit-packages.c        Fri Jul 20 23:08:14 2007 +0000
+++ b/pkgtools/pkg_install/files/audit-packages/audit-packages.c        Sat Jul 21 10:21:04 2007 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audit-packages.c,v 1.2 2007/07/20 22:22:52 joerg Exp $ */
+/* $NetBSD: audit-packages.c,v 1.3 2007/07/21 10:21:04 adrianp Exp $ */
 
 /*
  * Copyright (c) 2007 Adrian Portelli <adrianp%NetBSD.org@localhost>.
@@ -41,6 +41,9 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#ifdef HAVE_INTTYPES_H
+#include <stdint.h>
+#endif
 #include <err.h>
 #include <string.h>
 #include <sys/types.h>
@@ -293,10 +296,6 @@
                }
        }
 
-       /* tell the user where we are reading the config file from */
-       if (verbose >= 1)
-               fprintf(stderr, "Reading settings from: %s\n", conf_file);
-
        /* get the config file values */
        retval = get_confvalues();
 
@@ -308,7 +307,12 @@
                fprintf(stderr, "debug2: Using PKGDB_DIR: %s\n", _pkgdb_getPKGDB_DIR());
                fprintf(stderr, "debug2: Using pkg-vulnerabilities file: %s\n", pvfile);
                fprintf(stderr, "debug2: Using verify tool: %s\n", verify_bin);
-               fprintf(stderr, "debug2: Using ignore directives: %s\n", ignore);
+
+               if (ignore != NULL) {
+                       fprintf(stderr, "debug2: Using ignore directives: %s\n", ignore);
+               } else {
+                       fprintf(stderr, "debug2: No ignore directives found.\n");
+               }
        }
 
        /* now that we have read in the config file we can show the info */
@@ -325,15 +329,15 @@
                        exit(EXIT_FAILURE);
        }
 
-       /* check for an old vulnerabilities file if we're being verbose */
-       if ((verbose >= 1) && (download == FALSE))
-               old_pvfile();
-
        /* open pvfile */
        if ((pv = fopen(pvfile, "r")) == NULL) {
                errx(EXIT_FAILURE, "Unable to open: %s", pvfile);
        }
 
+       /* check for an old vulnerabilities file if we're being verbose */
+       if ((verbose >= 1) && (download == FALSE))
+               old_pvfile();
+
        /* check the #FORMAT from the pkg-vulnerabilities file */
        pv_format(pv);
 
@@ -600,9 +604,12 @@
        char *retval = NULL;
 
        if ((conf = fopen(conf_file, "r")) == NULL) {
+               if (verbose >= 2)
+                       fprintf(stderr, "debug2: No configuration file found.\n");
+               return 0;
+       } else {
                if (verbose >= 1)
-                       fprintf(stderr, "Unable to open specified configuration file: %s\n", conf_file);
-               return 0;
+                       fprintf(stderr, "Using configuration file: %s\n", conf_file);
        }
 
        line = safe_calloc(MAXLINELEN, sizeof(char));
@@ -756,7 +763,8 @@
 old_pvfile(void)
 {
        float t_diff;
-       int long t_current, t_pvfile;
+       int long t_current;
+       time_t t_pvfile;
        struct stat pvstat;
        struct timeval now_time = {0, 0};
 
@@ -768,7 +776,7 @@
        } else {
                /* difference between the file and now */
                t_current = now_time.tv_sec;
-               t_pvfile = pvstat.st_ctimespec.tv_sec;
+               t_pvfile = pvstat.st_ctime;
                t_diff = (((((float) t_current - (float) t_pvfile) / 60) / 60) / 24);
 
                if (t_diff >= 7)
diff -r 87d45a38bf46 -r 8dec484566d1 pkgtools/pkg_install/files/audit-packages/audit-packages.conf.5.in
--- a/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.5.in        Fri Jul 20 23:08:14 2007 +0000
+++ b/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.5.in        Sat Jul 21 10:21:04 2007 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: audit-packages.conf.5.in,v 1.2 2007/07/16 09:57:57 joerg Exp $
+.\" $NetBSD: audit-packages.conf.5.in,v 1.3 2007/07/21 10:21:04 adrianp Exp $
 .\"
 .\" Copyright (c) 2007 Adrian Portelli.  All rights reserved.
 .\"
@@ -108,7 +108,7 @@
 .%T "Documentation on the NetBSD Package System"
 .Sh HISTORY
 The
-.Nm
+.Nm audit-packages
 and
 .Nm download-vulnerability-list
 commands were originally implemented and added to
@@ -116,8 +116,7 @@
 pkgsrc by
 .An Alistair Crooks
 on September 19, 2000.  During April 2007 
-.Nm 
-was re-written by Adrian Portelli
-and support was added for compressed files and checking signatures on downloaded
-files.
-The original idea came from Roland Dowdeswell and Bill Sommerfeld.
+.Nm audit-packages 
+was re-written by Adrian Portelli and support was added for compressed 
+files and checking signatures on downloaded files.  The original idea 
+came from Roland Dowdeswell and Bill Sommerfeld.
diff -r 87d45a38bf46 -r 8dec484566d1 pkgtools/pkg_install/files/audit-packages/audit-packages.conf.cat5.in
--- a/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.cat5.in     Fri Jul 20 23:08:14 2007 +0000
+++ b/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.cat5.in     Sat Jul 21 10:21:04 2007 +0000
@@ -60,11 +60,11 @@
      _o_n _t_h_e _N_e_t_B_S_D _P_a_c_k_a_g_e _S_y_s_t_e_m
 
 HHIISSTTOORRYY
-     The aauuddiitt--ppaacckkaaggeess..ccoonnff and ddoowwnnllooaadd--vvuullnneerraabbiilliittyy--lliisstt commands were
-     originally implemented and added to NetBSD's pkgsrc by Alistair Crooks on
-     September 19, 2000.  During April 2007 aauuddiitt--ppaacckkaaggeess..ccoonnff was re-written
-     by Adrian Portelli and support was added for compressed files and check-
-     ing signatures on downloaded files.  The original idea came from Roland
+     The aauuddiitt--ppaacckkaaggeess and ddoowwnnllooaadd--vvuullnneerraabbiilliittyy--lliisstt commands were origi-
+     nally implemented and added to NetBSD's pkgsrc by Alistair Crooks on
+     September 19, 2000.  During April 2007 aauuddiitt--ppaacckkaaggeess was re-written by
+     Adrian Portelli and support was added for compressed files and checking
+     signatures on downloaded files.  The original idea came from Roland
      Dowdeswell and Bill Sommerfeld.
 
-NetBSD 4.0                       July 07, 2007                      NetBSD 4.0
+NetBSD 3.1                       July 07, 2007                      NetBSD 3.1
diff -r 87d45a38bf46 -r 8dec484566d1 pkgtools/pkg_install/files/configure
--- a/pkgtools/pkg_install/files/configure      Fri Jul 20 23:08:14 2007 +0000
+++ b/pkgtools/pkg_install/files/configure      Sat Jul 21 10:21:04 2007 +0000
@@ -1,83 +1,37 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for pkg_install 20070416.
+# Generated by GNU Autoconf 2.61 for pkg_install 20070416.
 #
 # Report bugs to <grant%NetBSD.org@localhost>.
 #
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 ## --------------------- ##
 ## M4sh Initialization.  ##
 ## --------------------- ##
 
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    $as_unset $as_var
-  fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-        X"$0" : 'X\(//\)$' \| \
-        X"$0" : 'X\(/\)$' \| \
-        .     : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-         /^X\/\(\/\/\)$/{ s//\1/; q; }
-         /^X\/\(\/\).*/{ s//\1/; q; }
-         s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
 # Avoid depending upon Character Ranges.
 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
@@ -98,124 +52,466 @@
   rm -f conf$$.sh
 fi
 
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" ""       $as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 done
-
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'



Home | Main Index | Thread Index | Old Index