pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc Add *RECOMMENDED variables as discussed on tech-pkg@ t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/80e5e0c698a7
branches:  trunk
changeset: 466256:80e5e0c698a7
user:      rh <rh%pkgsrc.org@localhost>
date:      Wed Jan 14 06:57:45 2004 +0000

description:
Add *RECOMMENDED variables as discussed on tech-pkg@ to allow for a more
fine-grained distinction between required versions of pre-requisites
(DEPENDS) and versions that are recommended for security or library ABI
consistency reasons (RECOMMENDED).

  The contents of ${RECOMMENDED} are added to DEPENDS unless
IGNORE_RECOMMENDED is set to YES, in which case a warning will be printed
and IGNORE_RECOMMENDED will be added to BUILD_DEFS.

  Add a corresponding BUILDLINK_RECOMMENDED.<pkg> variable for use with
buildlink2 and buildlink3.

diffstat:

 Packages.txt                    |  35 +++++++++++++++++++++++++++++++++--
 mk/bsd.pkg.defaults.mk          |  10 +++++++++-
 mk/bsd.pkg.mk                   |  15 ++++++++++++++-
 mk/buildlink2/bsd.buildlink2.mk |  12 +++++++++++-
 mk/buildlink3/bsd.buildlink3.mk |  12 +++++++++++-
 5 files changed, 78 insertions(+), 6 deletions(-)

diffs (196 lines):

diff -r 0919bc949dbc -r 80e5e0c698a7 Packages.txt
--- a/Packages.txt      Wed Jan 14 03:59:06 2004 +0000
+++ b/Packages.txt      Wed Jan 14 06:57:45 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Packages.txt,v 1.320 2003/12/14 21:47:32 kristerw Exp $
+# $NetBSD: Packages.txt,v 1.321 2004/01/14 06:57:45 rh Exp $
 ###########################################################################
 
                        ==========================
@@ -2053,6 +2053,34 @@
 The -[0-9]* should be used instead of -* to avoid potentially
 ambiguous matches such as tk-postgresql matching a tk-* DEPEND.
 
+Wildcards can also be used to specify that a package will only build against
+a certain minimum version of a pre-requisite:
+
+       DEPENDS+=       tiff>=3.5.4:../../graphics/tiff
+
+This means that the package will build against version 3.5.4 of the tiff library
+or newer.  Such a dependency may be warranted if, for example, the API of the
+library has changed with version 3.5.4 and a package would not compile against
+an earlier version of tiff.
+
+Please note that such dependencies should only be updated if a package requires
+a newer pre-requisite, but not to denote recommendations such as security
+updates or ABI changes that do not prevent a package from building correctly.
+Such recommendations can be expressed using RECOMENDED:
+
+       RECOMMENDED+=   tiff>=3.6.1:../../graphics/tiff
+
+In addition to the above DEPENDS line, this denotes that while a package will
+build against tiff>=3.5.4, at least version 3.6.1 is recommended.  RECOMMENDED
+entries will be turned into dependencies unless explicitly ignored (in which
+case a warning will be printed).  Packages that are built with recommendations
+ignored may not be uploaded to ftp.netbsd.org by developers and should not be
+used across different systems that may have different versions of binary
+packages installed.
+
+For security fixes, please update the package vulnerabilities file as well as
+setting RECOMMENDED (see section 10.21 for more information).
+
 (c) If your package needs some executable to be able to run correctly, this
 is specified using the DEPENDS definition. The pkgsrc/print/lyx package needs
 to be able to execute the latex binary from the teTeX package when it runs,
@@ -2286,7 +2314,10 @@
 noted in localsrc/security/advisories/pkg-vulnerabilities, and after the
 commit of that file, it should be copied to both
 /pub/NetBSD/packages/distfiles/pkg-vulnerabilities and vulnerabilities 
-on ftp.netbsd.org by localsrc/security/advisories/Makefile.
+on ftp.netbsd.org by localsrc/security/advisories/Makefile.  In addition, if
+a buildlink2.mk or buildlink3.mk file exists for an affected package, bumping
+PKGREVISION and creating a corresponding BUILDLINK_RECOMMENDED.<pkg> entry
+should be considered.
 
 
  10.22 What's the proper way to create an account from a package?
diff -r 0919bc949dbc -r 80e5e0c698a7 mk/bsd.pkg.defaults.mk
--- a/mk/bsd.pkg.defaults.mk    Wed Jan 14 03:59:06 2004 +0000
+++ b/mk/bsd.pkg.defaults.mk    Wed Jan 14 06:57:45 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.defaults.mk,v 1.203 2004/01/11 17:03:47 kim Exp $
+# $NetBSD: bsd.pkg.defaults.mk,v 1.204 2004/01/14 06:57:45 rh Exp $
 #
 
 # A file providing defaults for pkgsrc and the packages collection.
@@ -85,6 +85,14 @@
 # Possible: defined, not defined
 # Default: not defined
 
+IGNORE_RECOMMENDED?=   no
+# ignore package prerequisite recommendations.  If this is set to
+# "no", all entries in RECOMMENDED will be added to DEPENDS.
+# If set to "yes", a warning will be printed if recommendations
+# are possibly ignored.
+# Possible: yes, no
+# Default: no
+
 #PKG_REGISTER_SHELLS= YES
 # Automatically register shells in /etc/shells
 # Possible: YES, NO
diff -r 0919bc949dbc -r 80e5e0c698a7 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Wed Jan 14 03:59:06 2004 +0000
+++ b/mk/bsd.pkg.mk     Wed Jan 14 06:57:45 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1344 2004/01/13 00:40:25 jlam Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1345 2004/01/14 06:57:45 rh Exp $
 #
 # This file is in the public domain.
 #
@@ -406,6 +406,14 @@
 BUILD_DEPENDS+=                gettext>=0.10.35nb1:../../devel/gettext
 .endif
 
+.if defined(RECOMMENDED)
+.  if !empty(IGNORE_RECOMMENDED:M[nN][oO])
+DEPENDS+=              ${RECOMMENDED}
+.  else
+BUILD_DEFS+=           IGNORE_RECOMMENDED
+.  endif
+.endif
+
 EXTRACT_COOKIE=                ${WRKDIR}/.extract_done
 BUILDLINK_COOKIE=      ${WRKDIR}/.buildlink_done
 CONFIGURE_COOKIE=      ${WRKDIR}/.configure_done
@@ -2480,6 +2488,11 @@
        @${ECHO_MSG} "${_PKGSRC_IN}> Warning: ${PKGNAME} may not be made available through FTP:"
        @${ECHO_MSG} "${_PKGSRC_IN}>         " ${NO_BIN_ON_FTP:Q}
 .  endif
+.  if defined(RECOMMENDED) && !empty(IGNORE_RECOMMENDED:M[yY][eE][sS])
+       @${ECHO_MSG} "${_PKGSRC_IN}> Warning: dependency recommendations are being ignored!"
+       @${ECHO_MSG} "${_PKGSRC_IN}>          ${PKGNAME} should not be uploaded nor"
+       @${ECHO_MSG} "${_PKGSRC_IN}>          otherwise be used as a binary package!"
+.  endif
 .endif
 
 # Some support rules for real-su-package
diff -r 0919bc949dbc -r 80e5e0c698a7 mk/buildlink2/bsd.buildlink2.mk
--- a/mk/buildlink2/bsd.buildlink2.mk   Wed Jan 14 03:59:06 2004 +0000
+++ b/mk/buildlink2/bsd.buildlink2.mk   Wed Jan 14 06:57:45 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink2.mk,v 1.104 2003/12/19 19:22:28 veego Exp $
+# $NetBSD: bsd.buildlink2.mk,v 1.105 2004/01/14 06:57:45 rh Exp $
 #
 # An example package buildlink2.mk file:
 #
@@ -6,6 +6,7 @@
 # BUILDLINK_PACKAGES+=         foo
 # BUILDLINK_PKGBASE.foo=       foo-lib
 # BUILDLINK_DEPENDS.foo?=      foo-lib>=1.0
+# BUILDLINK_RECOMMENDED.foo?=  foo-lib>=1.0nb1
 # BUILDLINK_PKGSRCDIR.foo?=    ../../category/foo-lib
 #
 # EVAL_PREFIX+=                        BUILDLINK_PREFIX.foo=foo-lib
@@ -140,6 +141,7 @@
 .  endif
 .  if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
 _BUILDLINK_DEPMETHOD.${_pkg_}= DEPENDS
+_BUILDLINK_RECMETHOD.${_pkg_}= RECOMMENDED
 .  elif !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mbuild)
 _BUILDLINK_DEPMETHOD.${_pkg_}= BUILD_DEPENDS
 .  endif
@@ -150,6 +152,14 @@
        ${_depends_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
 .    endfor
 .  endif
+.  if defined(BUILDLINK_RECOMMENDED.${_pkg_}) && \
+      defined(_BUILDLINK_RECMETHOD.${_pkg_}) && \
+      defined(BUILDLINK_PKGSRCDIR.${_pkg_})
+.    for _rec_ in ${BUILDLINK_RECOMMENDED.${_pkg_}}
+${_BUILDLINK_RECMETHOD.${_pkg_}}+= \
+       ${_rec_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
+.    endfor
+.  endif
 #
 # BUILDLINK_PLIST_CMD.<pkg> is a sequence of shell commands that extracts
 # a list of all of the files installed by <pkg>.  This list is relative to
diff -r 0919bc949dbc -r 80e5e0c698a7 mk/buildlink3/bsd.buildlink3.mk
--- a/mk/buildlink3/bsd.buildlink3.mk   Wed Jan 14 03:59:06 2004 +0000
+++ b/mk/buildlink3/bsd.buildlink3.mk   Wed Jan 14 06:57:45 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.48 2004/01/13 07:52:37 jlam Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.49 2004/01/14 06:57:46 rh Exp $
 #
 # An example package buildlink3.mk file:
 #
@@ -12,6 +12,7 @@
 #
 # .if !empty(FOO_BUILDLINK3_MK:M+)
 # BUILDLINK_DEPENDS.foo?=      foo-lib>=1.0
+# BUILDLINK_RECOMMENDED.foo?=  foo-lib>=1.0nb1
 # BUILDLINK_PKGSRCDIR.foo?=    ../../category/foo-lib
 # BUILDLINK_PACKAGES+=         foo
 #
@@ -110,6 +111,7 @@
 .  endif
 .  if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
 _BLNK_DEPMETHOD.${_pkg_}=      DEPENDS
+_BLNK_RECMETHOD.${_pkg_}=      RECOMMENDED
 .  elif !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mbuild)
 _BLNK_DEPMETHOD.${_pkg_}=      BUILD_DEPENDS
 .  endif
@@ -120,6 +122,14 @@
        ${_depends_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
 .    endfor
 .  endif
+.  if defined(BUILDLINK_RECOMMENDED.${_pkg_}) && \
+      defined(_BLNK_RECMETHOD.${_pkg_}) && \
+      defined(BUILDLINK_PKGSRCDIR.${_pkg_})
+.    for _rec_ in ${BUILDLINK_RECOMMENDED.${_pkg_}}
+${_BLNK_RECMETHOD.${_pkg_}}+= \
+       ${_rec_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
+.    endfor
+.  endif
 .endfor
 
 # Generate default values for:



Home | Main Index | Thread Index | Old Index