diff options
author | adrianp <adrianp@pkgsrc.org> | 2007-09-17 22:40:27 +0000 |
---|---|---|
committer | adrianp <adrianp@pkgsrc.org> | 2007-09-17 22:40:27 +0000 |
commit | f499fb2d261c065dceea668bae16a2e4875b79c7 (patch) | |
tree | 0858ebe3acc2fcad8c128194a72b2dfb3f4b676d /pkgtools/pkg_install | |
parent | a10eddeff2be91c165b194f0b3d8e501e9f69449 (diff) | |
download | pkgsrc-f499fb2d261c065dceea668bae16a2e4875b79c7.tar.gz |
Add and document FETCH_PRE_ARGS, idea from David Sainty in PR #23899.
This allows such settings as the following in audit-packages.conf:
FETCH_PRE_ARGS="env ftp_proxy://ftp.myproxy.com"
Which will be set before FETCH_CMD is run.
Diffstat (limited to 'pkgtools/pkg_install')
4 files changed, 24 insertions, 5 deletions
diff --git a/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.5.in b/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.5.in index d8ccc0e0481..6dae8043373 100644 --- a/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.5.in +++ b/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.5.in @@ -1,4 +1,4 @@ -.\" $NetBSD: audit-packages.conf.5.in,v 1.3 2007/07/21 10:21:04 adrianp Exp $ +.\" $NetBSD: audit-packages.conf.5.in,v 1.4 2007/09/17 22:40:27 adrianp Exp $ .\" .\" Copyright (c) 2007 Adrian Portelli. All rights reserved. .\" @@ -82,6 +82,10 @@ Specifies the client used to download the file. Currently known tools include curl, ftp, wget and fetch. .Pp The default is @ftp@. +.It Ev FETCH_PRE_ARGS +Specifies optional arguments for the +.Pa download-vulnerability-list +client. These options appear before FETCH_CMD. .It Ev FETCH_ARGS Specifies optional arguments for the client used to download the .Pa pkg-vulnerabilities diff --git a/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.cat5.in b/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.cat5.in index 10b4b7d07b4..f1de23a7a70 100644 --- a/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.cat5.in +++ b/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.cat5.in @@ -39,6 +39,11 @@ DDEESSCCRRIIPPTTIIOONN The default is @ftp@. + FETCH_PRE_ARGS + Specifies optional arguments for the + _d_o_w_n_l_o_a_d_-_v_u_l_n_e_r_a_b_i_l_i_t_y_-_l_i_s_t client. These options appear + before FETCH_CMD. + FETCH_ARGS Specifies optional arguments for the client used to down- load the _p_k_g_-_v_u_l_n_e_r_a_b_i_l_i_t_i_e_s file. diff --git a/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.in b/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.in index 8eb4a159b40..599ca85e5f2 100644 --- a/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.in +++ b/pkgtools/pkg_install/files/audit-packages/audit-packages.conf.in @@ -1,4 +1,4 @@ -# $NetBSD: audit-packages.conf.in,v 1.1 2007/07/14 20:17:09 adrianp Exp $ +# $NetBSD: audit-packages.conf.in,v 1.2 2007/09/17 22:40:27 adrianp Exp $ # # sample configuration file for audit-packages(8) and @@ -53,6 +53,15 @@ # Supported: /path/to/curl /path/to/ftp /path/to/wget /path/to/fetch # Default: FETCH_CMD=@ftp@ +# FETCH_PRE_ARGS +# +# Specifies optional arguments for the download-vulnerability-list client. +# These options appear before ${FETCH_CMD}. +# +# Used by: download-vulnerability-list +# Supported: Any valid arguments for FETCH_CMD +# Default: FETCH_PRE_ARGS= + # FETCH_ARGS # # Specifies optional arguments for the download-vulnerability-list client. diff --git a/pkgtools/pkg_install/files/audit-packages/download-vulnerability-list.sh.in b/pkgtools/pkg_install/files/audit-packages/download-vulnerability-list.sh.in index 763b7fd84fe..3795ef48ad4 100644 --- a/pkgtools/pkg_install/files/audit-packages/download-vulnerability-list.sh.in +++ b/pkgtools/pkg_install/files/audit-packages/download-vulnerability-list.sh.in @@ -1,6 +1,6 @@ #!/bin/sh -# $NetBSD: download-vulnerability-list.sh.in,v 1.3 2007/07/24 18:57:02 adrianp Exp $ +# $NetBSD: download-vulnerability-list.sh.in,v 1.4 2007/09/17 22:40:28 adrianp Exp $ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -33,6 +33,7 @@ : ${PKGVULNDIR="@pkgdbdir@"} : ${COMPRESS_TYPE="gzip"} +: ${FETCH_PRE_ARGS=""} : ${FETCH_CMD=@ftp@} : ${FETCH_ARGS=""} : ${FETCH_PROTO=ftp} @@ -155,9 +156,9 @@ fi cd ${PKGVULNDIR} utility=`basename "${FETCH_CMD}"` case "${utility}" in -curl|fetch|ftp) ${FETCH_CMD} ${FETCH_ARGS} \ +curl|fetch|ftp) ${FETCH_PRE_ARGS} ${FETCH_CMD} ${FETCH_ARGS} \ -o ${NEW_VUL_LIST}${COMPRESS_EXTN} ${VUL_SOURCE} ;; -wget) ${FETCH_CMD} ${FETCH_ARGS} \ +wget) ${FETCH_PRE_ARGS} ${FETCH_CMD} ${FETCH_ARGS} \ -O ${NEW_VUL_LIST}${COMPRESS_EXTN} ${VUL_SOURCE} ;; *) echo "Unknown fetch command - please use send-pr to send in support for your fetch command" 1>&2 exit 1 |