pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/sysupgrade Add variable for archive file exte...
details: https://anonhg.NetBSD.org/pkgsrc/rev/341aaff12af9
branches: trunk
changeset: 334723:341aaff12af9
user: triaxx <triaxx%pkgsrc.org@localhost>
date: Mon Jun 03 20:35:55 2019 +0000
description:
Add variable for archive file extension
Fix PR pkg/53697
diffstat:
sysutils/sysupgrade/Makefile | 7 +-
sysutils/sysupgrade/distinfo | 6 +-
sysutils/sysupgrade/patches/patch-default.conf | 14 +
sysutils/sysupgrade/patches/patch-sysupgrade.conf.5.in | 21 ++
sysutils/sysupgrade/patches/patch-sysupgrade.sh | 123 ++++++++++++++++-
5 files changed, 163 insertions(+), 8 deletions(-)
diffs (214 lines):
diff -r c42b9712bc41 -r 341aaff12af9 sysutils/sysupgrade/Makefile
--- a/sysutils/sysupgrade/Makefile Mon Jun 03 15:22:51 2019 +0000
+++ b/sysutils/sysupgrade/Makefile Mon Jun 03 20:35:55 2019 +0000
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.13 2017/05/29 23:07:49 jlam Exp $
+# $NetBSD: Makefile,v 1.14 2019/06/03 20:35:55 triaxx Exp $
DISTNAME= sysupgrade-1.5
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= sysutils
-MASTER_SITES= https://github.com/jmmv/sysupgrade/releases/download/sysupgrade-1.5/
-
+MASTER_SITES= ${MASTER_SITE_GITHUB:=jmmv/}
MAINTAINER= jmmv%NetBSD.org@localhost
COMMENT= Automate upgrades of NetBSD
LICENSE= modified-bsd
diff -r c42b9712bc41 -r 341aaff12af9 sysutils/sysupgrade/distinfo
--- a/sysutils/sysupgrade/distinfo Mon Jun 03 15:22:51 2019 +0000
+++ b/sysutils/sysupgrade/distinfo Mon Jun 03 20:35:55 2019 +0000
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.3 2017/03/20 00:25:35 maya Exp $
+$NetBSD: distinfo,v 1.4 2019/06/03 20:35:55 triaxx Exp $
SHA1 (sysupgrade-1.5.tar.gz) = 3141ee4728d6d3b680ed04f552369031bb3b3b09
RMD160 (sysupgrade-1.5.tar.gz) = 5b1d7c6d45643f2f03bff1df16739a6751d0ceda
SHA512 (sysupgrade-1.5.tar.gz) = 47f37ce6802b8ba74d6edd19a2c80d46394c992b58d3077e6d1316e4f5505afbe53a68d28b28779a10a78d7be05f2f5b9d2a55b5b2f845bcc59a78950a8306f8
Size (sysupgrade-1.5.tar.gz) = 75833 bytes
-SHA1 (patch-sysupgrade.sh) = 394a586ebec84f71b5dd893f31d0b70e14090588
+SHA1 (patch-default.conf) = 9c5163b5342c7306973df5a61dd13622265f5142
+SHA1 (patch-sysupgrade.conf.5.in) = dfe5d90d0360212ea052f2e25a26820ad277480b
+SHA1 (patch-sysupgrade.sh) = 52a3cf92d7fa4d5ea795de8f74b44f8b86328c86
diff -r c42b9712bc41 -r 341aaff12af9 sysutils/sysupgrade/patches/patch-default.conf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/sysupgrade/patches/patch-default.conf Mon Jun 03 20:35:55 2019 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-default.conf,v 1.1 2019/06/03 20:35:55 triaxx Exp $
+
+* Add variable for archive file extension
+
+--- default.conf.orig 2013-07-28 21:04:02.000000000 +0000
++++ default.conf
+@@ -34,3 +34,7 @@ POSTINSTALL_AUTOFIX="obsolete"
+ # do "sysupgrade etcupdate" using the same etc.tgz file downloaded during
+ # the upgrade, you will need the same etc.tgz file to be present.
+ #AUTOCLEAN=no
++
++# Archive file extension of the sets. For now it can be either 'tgz' or
++# 'tar.xz'.
++#ARCHIVE=tar.xz
diff -r c42b9712bc41 -r 341aaff12af9 sysutils/sysupgrade/patches/patch-sysupgrade.conf.5.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/sysupgrade/patches/patch-sysupgrade.conf.5.in Mon Jun 03 20:35:55 2019 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-sysupgrade.conf.5.in,v 1.1 2019/06/03 20:35:55 triaxx Exp $
+
+* Add variable for archive file extension
+
+--- sysupgrade.conf.5.in.orig 2013-07-28 21:26:59.000000000 +0000
++++ sysupgrade.conf.5.in
+@@ -162,6 +162,14 @@ The presence of a modules set enables th
+ procedure.
+ .Pp
+ Default: AUTO.
++.It Va ARCHIVE_EXTENSION
++.Pp
++Archive file extension of the sets. Can be either
++.Sq tgz
++or
++.Sq tar.xz .
++.Pp
++Default: tgz.
+ .El
+ .Sh SEE ALSO
+ .Xr sysupgrade 8
diff -r c42b9712bc41 -r 341aaff12af9 sysutils/sysupgrade/patches/patch-sysupgrade.sh
--- a/sysutils/sysupgrade/patches/patch-sysupgrade.sh Mon Jun 03 15:22:51 2019 +0000
+++ b/sysutils/sysupgrade/patches/patch-sysupgrade.sh Mon Jun 03 20:35:55 2019 +0000
@@ -1,10 +1,74 @@
-$NetBSD: patch-sysupgrade.sh,v 1.1 2017/03/20 00:25:35 maya Exp $
+$NetBSD: patch-sysupgrade.sh,v 1.2 2019/06/03 20:35:55 triaxx Exp $
Don't reject https
--- sysupgrade.sh.orig 2013-07-28 21:27:57.000000000 +0000
+++ sysupgrade.sh
-@@ -199,7 +199,7 @@ sysupgrade_fetch() {
+@@ -39,7 +39,8 @@ shtk_import process
+ #
+ # Please remember to update sysbuild(1) if you change this list.
+ SYSUPGRADE_CONFIG_VARS="AUTOCLEAN CACHEDIR DESTDIR ETCUPDATE KERNEL
+- POSTINSTALL_AUTOFIX RELEASEDIR SETS"
++ POSTINSTALL_AUTOFIX RELEASEDIR SETS
++ ARCHIVE_EXTENSION"
+
+
+ # Directory in which to keep downloaded release files.
+@@ -66,6 +67,7 @@ sysupgrade_set_defaults() {
+ shtk_config_set ETCUPDATE "yes"
+ shtk_config_set KERNEL "AUTO"
+ shtk_config_set SETS "AUTO"
++ shtk_config_set ARCHIVE_EXTENSION "tgz"
+ }
+
+
+@@ -163,18 +165,29 @@ require_cached_file() {
+ # The set to be extracted must have been previously fetched into the cache
+ # directory by sysupgrade_fetch command.
+ #
+-# \param set_name Name of the set to extract, without the .tgz extension.
++# \param set_name Name of the set to extract, without the archive extension.
+ extract_set() {
+ local set_name="${1}"; shift
++ local arch_ext="$(shtk_config_get ARCHIVE_EXTENSION)"
+
+- require_cached_file "${set_name}.tgz"
++ require_cached_file "${set_name}.${arch_ext}"
+
+ local destdir="$(shtk_config_get_default DESTDIR "")"
+- local set_tgz="$(get_cached_file "${set_name}.tgz")"
++ local set_arch="$(get_cached_file "${set_name}.${arch_ext}")"
+
+ shtk_cli_info "Extracting ${set_name} into ${destdir}/"
+ [ -z "${destdir}" ] || shtk_process_run mkdir -p "${destdir}"
+- progress -zf "${set_tgz}" tar -xp -C "${destdir}/" -f -
++ case "${arch_ext}" in
++ tgz)
++ progress -zf "${set_arch}" tar -xp -C "${destdir}/" -f -
++ ;;
++ tar.xz)
++ progress -f "${set_arch}" tar -xJp -C "${destdir}/" -f -
++ ;;
++ *)
++ shtk_cli_error "Unsupported archive extension ${arch_ext}"
++ ;;
++ esac
+ }
+
+
+@@ -189,9 +202,10 @@ sysupgrade_fetch() {
+
+ local releasedir="$(shtk_config_get RELEASEDIR)"
+ local cachedir="$(shtk_config_get CACHEDIR)"
++ local arch_ext="$(shtk_config_get ARCHIVE_EXTENSION)"
+ local fetch_files=
+ for set_name in $(shtk_config_get SETS); do
+- fetch_files="${fetch_files} binary/sets/${set_name}.tgz"
++ fetch_files="${fetch_files} binary/sets/${set_name}.${arch_ext}"
+ done
+ if shtk_config_has KERNEL; then
+ local kernel_name="$(shtk_config_get KERNEL)"
+@@ -199,7 +213,7 @@ sysupgrade_fetch() {
fi
case "${releasedir}" in
@@ -13,3 +77,58 @@
mkdir -p "${cachedir}"
for relative_file in ${fetch_files}; do
+@@ -320,6 +334,7 @@ sysupgrade_modules() {
+ #
+ # \param ... Names of the sets to extract, to override SETS.
+ sysupgrade_sets() {
++ local arch_ext="$(shtk_config_get ARCHIVE_EXTENSION)"
+ local sets=
+ for set_name in "${@:-$(shtk_config_get SETS)}"; do
+ case "${set_name}" in
+@@ -334,7 +349,7 @@ sysupgrade_sets() {
+ done
+
+ for set_name in ${sets}; do
+- require_cached_file "${set_name}.tgz"
++ require_cached_file "${set_name}.${arch_ext}"
+ done
+
+ shtk_cli_info "Upgrading base system"
+@@ -346,6 +361,7 @@ sysupgrade_sets() {
+
+ # Runs etcupdate to install new configuration files.
+ sysupgrade_etcupdate() {
++ local arch_ext="$(shtk_config_get ARCHIVE_EXTENSION)"
+ [ ${#} -eq 0 ] || shtk_cli_usage_error "etcupdate does not take any" \
+ "arguments"
+
+@@ -366,8 +382,8 @@ sysupgrade_etcupdate() {
+
+ local sflags=
+ for set_name in ${sets}; do
+- require_cached_file "${set_name}.tgz"
+- sflags="${sflags} -s$(get_cached_file "${set_name}.tgz")"
++ require_cached_file "${set_name}.${arch_ext}"
++ sflags="${sflags} -s$(get_cached_file "${set_name}.${arch_ext}")"
+ done
+
+ shtk_cli_info "Upgrading /etc interactively"
+@@ -381,6 +397,7 @@ sysupgrade_etcupdate() {
+ sysupgrade_postinstall() {
+ local sets=
+ local sets="$(shtk_list_filter '*etc' $(shtk_config_get SETS))"
++ local arch_ext="$(shtk_config_get ARCHIVE_EXTENSION)"
+ if [ -z "${sets}" ]; then
+ shtk_cli_info "Skipping postinstall (no etc sets in SETS)"
+ return 0
+@@ -392,8 +409,8 @@ sysupgrade_postinstall() {
+
+ local sflags=
+ for set_name in ${sets}; do
+- require_cached_file "${set_name}.tgz"
+- sflags="${sflags} -s$(get_cached_file "${set_name}.tgz")"
++ require_cached_file "${set_name}.${arch_ext}"
++ sflags="${sflags} -s$(get_cached_file "${set_name}.${arch_ext}")"
+ done
+
+ shtk_cli_info "Performing postinstall checks"
Home |
Main Index |
Thread Index |
Old Index