pkgsrc-Changes archive

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

CVS commit: pkgsrc/sysutils/sysupgrade



Module Name:    pkgsrc
Committed By:   nia
Date:           Fri Apr 15 08:07:25 UTC 2022

Modified Files:
        pkgsrc/sysutils/sysupgrade: Makefile distinfo
        pkgsrc/sysutils/sysupgrade/patches: patch-sysupgrade.sh

Log Message:
sysupgrade: protect against failures when /usr/sbin is not in PATH


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 pkgsrc/sysutils/sysupgrade/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/sysutils/sysupgrade/distinfo
cvs rdiff -u -r1.6 -r1.7 \
    pkgsrc/sysutils/sysupgrade/patches/patch-sysupgrade.sh

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

Modified files:

Index: pkgsrc/sysutils/sysupgrade/Makefile
diff -u pkgsrc/sysutils/sysupgrade/Makefile:1.18 pkgsrc/sysutils/sysupgrade/Makefile:1.19
--- pkgsrc/sysutils/sysupgrade/Makefile:1.18    Sun Mar 14 08:44:01 2021
+++ pkgsrc/sysutils/sysupgrade/Makefile Fri Apr 15 08:07:25 2022
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.18 2021/03/14 08:44:01 nia Exp $
+# $NetBSD: Makefile,v 1.19 2022/04/15 08:07:25 nia Exp $
 
 DISTNAME=      sysupgrade-1.5
-PKGREVISION=   8
+PKGREVISION=   9
 CATEGORIES=    sysutils
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=jmmv/}
 MAINTAINER=    jmmv%NetBSD.org@localhost

Index: pkgsrc/sysutils/sysupgrade/distinfo
diff -u pkgsrc/sysutils/sysupgrade/distinfo:1.11 pkgsrc/sysutils/sysupgrade/distinfo:1.12
--- pkgsrc/sysutils/sysupgrade/distinfo:1.11    Tue Oct 26 11:20:16 2021
+++ pkgsrc/sysutils/sysupgrade/distinfo Fri Apr 15 08:07:25 2022
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.11 2021/10/26 11:20:16 nia Exp $
+$NetBSD: distinfo,v 1.12 2022/04/15 08:07:25 nia Exp $
 
 BLAKE2s (sysupgrade-1.5.tar.gz) = 5fb73e83c7b9b1a891ce0cfb26422f07822061e2df42db6a4e3692468d028186
 SHA512 (sysupgrade-1.5.tar.gz) = 47f37ce6802b8ba74d6edd19a2c80d46394c992b58d3077e6d1316e4f5505afbe53a68d28b28779a10a78d7be05f2f5b9d2a55b5b2f845bcc59a78950a8306f8
 Size (sysupgrade-1.5.tar.gz) = 75833 bytes
 SHA1 (patch-default.conf) = 2457714998c86994192ef57c5dd22646f76828c4
 SHA1 (patch-sysupgrade.conf.5.in) = dfe5d90d0360212ea052f2e25a26820ad277480b
-SHA1 (patch-sysupgrade.sh) = d7a9371ead06d27e5dc00f9004994d3a91129875
+SHA1 (patch-sysupgrade.sh) = 47ec28af4527bb779f67ad92926be71c752ab091

Index: pkgsrc/sysutils/sysupgrade/patches/patch-sysupgrade.sh
diff -u pkgsrc/sysutils/sysupgrade/patches/patch-sysupgrade.sh:1.6 pkgsrc/sysutils/sysupgrade/patches/patch-sysupgrade.sh:1.7
--- pkgsrc/sysutils/sysupgrade/patches/patch-sysupgrade.sh:1.6  Wed Oct 21 21:34:21 2020
+++ pkgsrc/sysutils/sysupgrade/patches/patch-sysupgrade.sh      Fri Apr 15 08:07:25 2022
@@ -1,7 +1,9 @@
-$NetBSD: patch-sysupgrade.sh,v 1.6 2020/10/21 21:34:21 kamil Exp $
+$NetBSD: patch-sysupgrade.sh,v 1.7 2022/04/15 08:07:25 nia Exp $
 
 * Don't reject https in sysupgrade_fetch()
 * Add ARCHIVE_EXTENSION variable (Fix PR pkg/53697)
+* Use direct paths to etcupdate and postinstall
+  (protect against user misconfiguration).
 
 --- sysupgrade.sh.orig 2013-07-28 21:27:57.000000000 +0000
 +++ sysupgrade.sh
@@ -103,7 +105,7 @@ $NetBSD: patch-sysupgrade.sh,v 1.6 2020/
      [ ${#} -eq 0 ] || shtk_cli_usage_error "etcupdate does not take any" \
          "arguments"
  
-@@ -366,8 +382,8 @@ sysupgrade_etcupdate() {
+@@ -366,12 +382,12 @@ sysupgrade_etcupdate() {
  
      local sflags=
      for set_name in ${sets}; do
@@ -114,6 +116,11 @@ $NetBSD: patch-sysupgrade.sh,v 1.6 2020/
      done
  
      shtk_cli_info "Upgrading /etc interactively"
+-    etcupdate -a -l ${sflags}
++    /usr/sbin/etcupdate -a -l ${sflags}
+ }
+ 
+ 
 @@ -381,6 +397,7 @@ sysupgrade_etcupdate() {
  sysupgrade_postinstall() {
      local sets=
@@ -133,7 +140,15 @@ $NetBSD: patch-sysupgrade.sh,v 1.6 2020/
      done
  
      shtk_cli_info "Performing postinstall checks"
-@@ -409,10 +426,13 @@ sysupgrade_postinstall() {
+@@ -402,17 +419,20 @@ sysupgrade_postinstall() {
+         postinstall "-d${destdir}/" ${sflags} fix \
+             $(shtk_config_get POSTINSTALL_AUTOFIX)
+     fi
+-    postinstall "-d${destdir}/" ${sflags} "${@:-check}" \
++    /usr/sbin/postinstall "-d${destdir}/" ${sflags} "${@:-check}" \
+         || shtk_cli_error "Some postinstall(8) checks have failed"
+ }
+ 
  
  # Cleans up the cache directory.
  sysupgrade_clean() {



Home | Main Index | Thread Index | Old Index