pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/pkg_install/files



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Fri Dec 11 10:06:53 UTC 2020

Modified Files:
        pkgsrc/pkgtools/pkg_install/files/add: perform.c
        pkgsrc/pkgtools/pkg_install/files/lib: lib.h parse-config.c
            pkg_install.conf.5.in pkg_install.conf.cat.in version.h

Log Message:
pkg_install: Introduce support for CHECK_OS_VERSION.

When set to "no", pkg_add will not issue a warning if the host OS version does
not exactly match the OS version the package was built on.  This can be useful
on many OS where the kernel release version has nothing to do with userland
compatibility, or where it may differ without being ABI incompatible.

Ultimately it would be ideal if the version checks were smart enough across all
our supported OS to not need this, but until then this is useful for users who
know what they're doing.

Bump version to 20201211.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 pkgsrc/pkgtools/pkg_install/files/add/perform.c
cvs rdiff -u -r1.71 -r1.72 pkgsrc/pkgtools/pkg_install/files/lib/lib.h
cvs rdiff -u -r1.16 -r1.17 \
    pkgsrc/pkgtools/pkg_install/files/lib/parse-config.c
cvs rdiff -u -r1.21 -r1.22 \
    pkgsrc/pkgtools/pkg_install/files/lib/pkg_install.conf.5.in
cvs rdiff -u -r1.6 -r1.7 \
    pkgsrc/pkgtools/pkg_install/files/lib/pkg_install.conf.cat.in
cvs rdiff -u -r1.182 -r1.183 pkgsrc/pkgtools/pkg_install/files/lib/version.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/pkg_install/files/add/perform.c
diff -u pkgsrc/pkgtools/pkg_install/files/add/perform.c:1.114 pkgsrc/pkgtools/pkg_install/files/add/perform.c:1.115
--- pkgsrc/pkgtools/pkg_install/files/add/perform.c:1.114       Sun Dec  6 17:23:09 2020
+++ pkgsrc/pkgtools/pkg_install/files/add/perform.c     Fri Dec 11 10:06:53 2020
@@ -1,4 +1,4 @@
-/*     $NetBSD: perform.c,v 1.114 2020/12/06 17:23:09 wiz Exp $        */
+/*     $NetBSD: perform.c,v 1.115 2020/12/11 10:06:53 jperkin Exp $    */
 #if HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -6,7 +6,7 @@
 #if HAVE_SYS_CDEFS_H
 #include <sys/cdefs.h>
 #endif
-__RCSID("$NetBSD: perform.c,v 1.114 2020/12/06 17:23:09 wiz Exp $");
+__RCSID("$NetBSD: perform.c,v 1.115 2020/12/11 10:06:53 jperkin Exp $");
 
 /*-
  * Copyright (c) 2003 Grant Beattie <grant%NetBSD.org@localhost>
@@ -151,6 +151,15 @@ compatible_platform(const char *opsys, c
 {
     int i = 0;
 
+    /*
+     * If the user has set the CHECK_OS_VERSION variable to "no" then skip any
+     * uname version checks and assume they know what they are doing.  This can
+     * be useful on OS where the kernel version is not a good indicator of
+     * userland compatibility, or differs but retains ABI compatibility.
+     */
+    if (strcasecmp(check_os_version, "no") == 0)
+       return 1;
+
     /* returns 1 if host and package operating system match */
     if (strcmp(host, package) == 0)
        return 1;

Index: pkgsrc/pkgtools/pkg_install/files/lib/lib.h
diff -u pkgsrc/pkgtools/pkg_install/files/lib/lib.h:1.71 pkgsrc/pkgtools/pkg_install/files/lib/lib.h:1.72
--- pkgsrc/pkgtools/pkg_install/files/lib/lib.h:1.71    Wed Dec  2 12:10:38 2020
+++ pkgsrc/pkgtools/pkg_install/files/lib/lib.h Fri Dec 11 10:06:53 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.h,v 1.71 2020/12/02 12:10:38 wiz Exp $ */
+/* $NetBSD: lib.h,v 1.72 2020/12/11 10:06:53 jperkin Exp $ */
 
 /* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
 
@@ -447,6 +447,7 @@ extern const char *cert_chain_file;
 extern const char *certs_packages;
 extern const char *certs_pkg_vulnerabilities;
 extern const char *check_eol;
+extern const char *check_os_version;
 extern const char *check_vulnerabilities;
 extern const char *config_file;
 extern const char *config_pkg_dbdir;

Index: pkgsrc/pkgtools/pkg_install/files/lib/parse-config.c
diff -u pkgsrc/pkgtools/pkg_install/files/lib/parse-config.c:1.16 pkgsrc/pkgtools/pkg_install/files/lib/parse-config.c:1.17
--- pkgsrc/pkgtools/pkg_install/files/lib/parse-config.c:1.16   Fri Apr  5 21:36:35 2019
+++ pkgsrc/pkgtools/pkg_install/files/lib/parse-config.c        Fri Dec 11 10:06:53 2020
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse-config.c,v 1.16 2019/04/05 21:36:35 sevan Exp $  */
+/*     $NetBSD: parse-config.c,v 1.17 2020/12/11 10:06:53 jperkin Exp $        */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -7,7 +7,7 @@
 #if HAVE_SYS_CDEFS_H
 #include <sys/cdefs.h>
 #endif
-__RCSID("$NetBSD: parse-config.c,v 1.16 2019/04/05 21:36:35 sevan Exp $");
+__RCSID("$NetBSD: parse-config.c,v 1.17 2020/12/11 10:06:53 jperkin Exp $");
 
 /*-
  * Copyright (c) 2008, 2009 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -66,6 +66,7 @@ const char *cert_chain_file;
 const char *certs_packages;
 const char *certs_pkg_vulnerabilities;
 const char *check_eol = "yes";
+const char *check_os_version = "yes";
 const char *check_vulnerabilities;
 static const char *config_cache_connections;
 static const char *config_cache_connections_host;
@@ -100,6 +101,7 @@ static struct config_variable {
        { "CERTIFICATE_CHAIN", &cert_chain_file },
        { "CHECK_LICENSE", &do_license_check },
        { "CHECK_END_OF_LIFE", &check_eol },
+       { "CHECK_OS_VERSION", &check_os_version },
        { "CHECK_VULNERABILITIES", &check_vulnerabilities },
        { "DEFAULT_ACCEPTABLE_LICENSES", &default_acceptable_licenses },
        { "GPG", &gpg_cmd },

Index: pkgsrc/pkgtools/pkg_install/files/lib/pkg_install.conf.5.in
diff -u pkgsrc/pkgtools/pkg_install/files/lib/pkg_install.conf.5.in:1.21 pkgsrc/pkgtools/pkg_install/files/lib/pkg_install.conf.5.in:1.22
--- pkgsrc/pkgtools/pkg_install/files/lib/pkg_install.conf.5.in:1.21    Wed Nov  5 14:40:01 2014
+++ pkgsrc/pkgtools/pkg_install/files/lib/pkg_install.conf.5.in Fri Dec 11 10:06:53 2020
@@ -1,4 +1,4 @@
-.\"    $NetBSD: pkg_install.conf.5.in,v 1.21 2014/11/05 14:40:01 prlw1 Exp $
+.\"    $NetBSD: pkg_install.conf.5.in,v 1.22 2020/12/11 10:06:53 jperkin Exp $
 .\"
 .\" Copyright (c) 2008, 2009, 2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -93,6 +93,10 @@ Missing license conditions are considere
 During vulnerability checks, consider packages that have reached end-of-life
 as vulnerable.
 This option is enabled by default.
+.It Dv CHECK_OS_VERSION
+If "no", pkg_add will not warn if the host OS version does not exactly match
+the OS version the package was built on.
+The default is "yes".
 .It Dv CHECK_OSABI
 If "no", osabi package does not check OS version.
 The default is "yes".

Index: pkgsrc/pkgtools/pkg_install/files/lib/pkg_install.conf.cat.in
diff -u pkgsrc/pkgtools/pkg_install/files/lib/pkg_install.conf.cat.in:1.6 pkgsrc/pkgtools/pkg_install/files/lib/pkg_install.conf.cat.in:1.7
--- pkgsrc/pkgtools/pkg_install/files/lib/pkg_install.conf.cat.in:1.6   Tue Mar 27 22:38:05 2018
+++ pkgsrc/pkgtools/pkg_install/files/lib/pkg_install.conf.cat.in       Fri Dec 11 10:06:53 2020
@@ -60,6 +60,11 @@ DDEESSCCRRIIPPTTIIOONN
              During vulnerability checks, consider packages that have reached
              end-of-life as vulnerable.  This option is enabled by default.
 
+     CHECK_OS_VERSION
+             If "no", pkg_add will not warn if the host OS version does not
+             exactly match the OS version the package was built on.  The
+             default is "yes".
+
      CHECK_OSABI
              If "no", osabi package does not check OS version.  The default is
              "yes".

Index: pkgsrc/pkgtools/pkg_install/files/lib/version.h
diff -u pkgsrc/pkgtools/pkg_install/files/lib/version.h:1.182 pkgsrc/pkgtools/pkg_install/files/lib/version.h:1.183
--- pkgsrc/pkgtools/pkg_install/files/lib/version.h:1.182       Sun Dec  6 17:23:09 2020
+++ pkgsrc/pkgtools/pkg_install/files/lib/version.h     Fri Dec 11 10:06:53 2020
@@ -1,4 +1,4 @@
-/*     $NetBSD: version.h,v 1.182 2020/12/06 17:23:09 wiz Exp $        */
+/*     $NetBSD: version.h,v 1.183 2020/12/11 10:06:53 jperkin Exp $    */
 
 /*
  * Copyright (c) 2001 Thomas Klausner.  All rights reserved.
@@ -27,6 +27,6 @@
 #ifndef _INST_LIB_VERSION_H_
 #define _INST_LIB_VERSION_H_
 
-#define PKGTOOLS_VERSION 20201206
+#define PKGTOOLS_VERSION 20201211
 
 #endif /* _INST_LIB_VERSION_H_ */



Home | Main Index | Thread Index | Old Index