Commit 2525db39 authored by aker@wsusoffline's avatar aker@wsusoffline
Browse files

Included complete rewrite of the Linux scripts version CE-2.7 (Special thanks to H. Buhrmester)

parent c0c8c4bd
......@@ -14,7 +14,7 @@
#pragma compile(ProductName, "WSUS Offline Update - Community Edition")
#pragma compile(ProductVersion, 12.7.0)
Dim Const $caption = "WSUS Offline Update - Community Edition - 12.7 (b6)"
Dim Const $caption = "WSUS Offline Update - Community Edition - 12.7 (b7)"
Dim Const $title = $caption & " - Generator"
Dim Const $downloadURL = "https://gitlab.com/wsusoffline/"
Dim Const $downloadLogFile = "download.log"
......
......@@ -15,7 +15,7 @@
#pragma compile(ProductName, "WSUS Offline Update - Community Edition")
#pragma compile(ProductVersion, 12.7.0)
Dim Const $caption = "WSUS Offline Update - Community Edition - 12.7 (b6) - Installer"
Dim Const $caption = "WSUS Offline Update - Community Edition - 12.7 (b7) - Installer"
; Registry constants
Dim Const $reg_key_wsh_hklm64 = "HKLM64\Software\Microsoft\Windows Script Host\Settings"
......
......@@ -31,7 +31,7 @@ if "%DIRCMD%" NEQ "" set DIRCMD=
cd /D "%~dp0"
set WSUSOFFLINE_VERSION=12.7 (b6)
set WSUSOFFLINE_VERSION=12.7 (b7)
title %~n0 %*
echo Starting WSUS Offline Update - Community Edition - v. %WSUSOFFLINE_VERSION% at %TIME%...
set UPDATE_LOGFILE=%SystemRoot%\wsusofflineupdate.log
......
......@@ -35,7 +35,7 @@ if "%DIRCMD%" NEQ "" set DIRCMD=
cd /D "%~dp0"
set WSUSOFFLINE_VERSION=12.7 (b6)
set WSUSOFFLINE_VERSION=12.7 (b7)
title %~n0 %1 %2 %3 %4 %5 %6 %7 %8 %9
echo Starting WSUS Offline Update - Community Edition - download v. %WSUSOFFLINE_VERSION% for %1 %2...
set DOWNLOAD_LOGFILE=..\log\download.log
......
......@@ -1860,5 +1860,6 @@ Community Edition 12.6.1 -- 24.12.2021
- Fix: DetermineSystemProperties.vbs might fail to detect Office installations, if only some components (e.g. Lync or Groove) are installed (Thanks to "jmcaree")
--------------------------------------------------------------------------------
Community Edition 12.7 -- ??.??.????
- Included complete rewrite of the Linux scripts version CE-2.7 (Special thanks to H. Buhrmester)
- [work in progress] Support added for Windows 11
- Fix: Download error in Linux scripts while parsing the certificate URLs (Thanks to "mani" and "hbuhrmester")
......@@ -2,7 +2,7 @@
#
# Filename: 71-make-snapshot.bash
#
# Copyright (C) 2016-2021 Hartmut Buhrmester
# Copyright (C) 2016-2022 Hartmut Buhrmester
# <wsusoffline-scripts-xxyh@hartmut-buhrmester.de>
#
# License
......
......@@ -2,7 +2,7 @@
#
# Filename: 10-remove-obsolete-scripts.bash
#
# Copyright (C) 2016-2021 Hartmut Buhrmester
# Copyright (C) 2016-2022 Hartmut Buhrmester
# <wsusoffline-scripts-xxyh@hartmut-buhrmester.de>
#
# License
......
......@@ -2,7 +2,7 @@
#
# Filename: 20-start-logging.bash
#
# Copyright (C) 2016-2021 Hartmut Buhrmester
# Copyright (C) 2016-2022 Hartmut Buhrmester
# <wsusoffline-scripts-xxyh@hartmut-buhrmester.de>
#
# License
......
......@@ -2,7 +2,7 @@
#
# Filename: 30-check-needed-applications.bash
#
# Copyright (C) 2016-2021 Hartmut Buhrmester
# Copyright (C) 2016-2022 Hartmut Buhrmester
# <wsusoffline-scripts-xxyh@hartmut-buhrmester.de>
#
# License
......
......@@ -2,7 +2,7 @@
#
# Filename: 40-configure-downloaders.bash
#
# Copyright (C) 2016-2021 Hartmut Buhrmester
# Copyright (C) 2016-2022 Hartmut Buhrmester
# <wsusoffline-scripts-xxyh@hartmut-buhrmester.de>
#
# License
......@@ -516,9 +516,9 @@ function download_single_file_optimized ()
;;
esac
if "${downloader}" "${all_options[@]}" \
"${logfile_prefix}${logfile}" \
"${download_dir_prefix}${download_dir}" \
if "${downloader}" "${all_options[@]}" \
"${logfile_prefix}${logfile}" \
"${download_dir_prefix}${download_dir}" \
"${download_link}"
then
log_debug_message "Download/validation of ${filename} succeeded"
......@@ -602,9 +602,9 @@ function download_single_file_failsafe ()
until (( result_code == 0 )) || (( try_count > max_tries ))
do
log_info_message "Downloading/validating ${filename}, try ${try_count} ..."
if "${downloader}" "${all_options[@]}" \
"${logfile_prefix}${logfile}" \
"${download_dir_prefix}${download_dir}" \
if "${downloader}" "${all_options[@]}" \
"${logfile_prefix}${logfile}" \
"${download_dir_prefix}${download_dir}" \
"${download_link}"
then
result_code="0"
......@@ -686,9 +686,9 @@ function download_multiple_files ()
log_info_message "Downloading/validating ${number_of_links} link(s) from input file ${input_file##*/} ..."
if "${downloader}" "${common_options[@]}" "${optimized_options[@]}" \
"${logfile_prefix}${logfile}" \
"${download_dir_prefix}${download_dir}" \
if "${downloader}" "${common_options[@]}" "${optimized_options[@]}" \
"${logfile_prefix}${logfile}" \
"${download_dir_prefix}${download_dir}" \
"${inputfile_prefix}${input_file}"
then
log_info_message "Downloaded/validated ${number_of_links} link(s)"
......@@ -912,8 +912,8 @@ function download_from_gitlab ()
#
# Since we already use the Etag for download, we can also use this
# unique identifier locally to track file changes.
if [[ -f "${pathname}" \
&& -n "${global_new_etag}" \
if [[ -f "${pathname}" \
&& -n "${global_new_etag}" \
&& "${global_new_etag}" != "${old_etag}" ]]
then
log_info_message "Saving new ETag to database..."
......@@ -1070,16 +1070,16 @@ function test_internet_connection ()
sleep 4
log_info_message "Testing the Internet connection..."
if "${downloader}" "${connection_test_a[@]}" \
"${logfile_prefix}${logfile}" \
if "${downloader}" "${connection_test_a[@]}" \
"${logfile_prefix}${logfile}" \
"${connection_test_urls[@]}"
then
log_info_message "Connection test succeeded"
else
log_info_message "Retrying with increased verbosity in 10 seconds..."
sleep 10
if "${downloader}" "${connection_test_b[@]}" \
"${logfile_prefix}${logfile}" \
if "${downloader}" "${connection_test_b[@]}" \
"${logfile_prefix}${logfile}" \
"${connection_test_urls[@]}"
then
log_info_message "Connection test succeeded"
......
......@@ -2,7 +2,7 @@
#
# Filename: 50-check-wsusoffline-version.bash
#
# Copyright (C) 2016-2021 Hartmut Buhrmester
# Copyright (C) 2016-2022 Hartmut Buhrmester
# <wsusoffline-scripts-xxyh@hartmut-buhrmester.de>
#
# License
......@@ -79,7 +79,7 @@ function get_installed_version ()
log_info_message "Searching for the installed version of WSUS Offline Update..."
if require_non_empty_file "../static/SelfUpdateVersion-this.txt"
then
IFS=$'\r\n,' read -r installed_version \
IFS=$',\r\n' read -r installed_version \
installed_type \
skip_rest \
< "../static/SelfUpdateVersion-this.txt"
......@@ -118,7 +118,7 @@ function get_available_version ()
then
if require_non_empty_file "../static/SelfUpdateVersion-recent.txt"
then
IFS=$'\r\n,' read -r available_version \
IFS=$',\r\n' read -r available_version \
available_type \
skip_rest \
< "../static/SelfUpdateVersion-recent.txt"
......
......@@ -2,7 +2,7 @@
#
# Filename: 70-update-configuration-files.bash
#
# Copyright (C) 2016-2021 Hartmut Buhrmester
# Copyright (C) 2016-2022 Hartmut Buhrmester
# <wsusoffline-scripts-xxyh@hartmut-buhrmester.de>
#
# License
......@@ -41,6 +41,9 @@ hidelist_seconly_url="https://gitlab.com/wsusoffline/wsusoffline-sdd/-/raw/maste
static_downloadfiles_modified_url="https://gitlab.com/wsusoffline/wsusoffline-sdd/-/raw/master/StaticDownloadFiles-modified.txt"
exclude_downloadfiles_modified_url="https://gitlab.com/wsusoffline/wsusoffline-sdd/-/raw/master/ExcludeDownloadFiles-modified.txt"
static_updatefiles_modified_url="https://gitlab.com/wsusoffline/wsusoffline-sdd/-/raw/master/StaticUpdateFiles-modified.txt"
# Introduced in Community Edition 12.6.1 (b8)
option_list_url="https://gitlab.com/wsusoffline/wsusoffline-sdd/-/raw/master/OptionList.txt"
option_list_wildcard_url="https://gitlab.com/wsusoffline/wsusoffline-sdd/-/raw/master/OptionList-wildcard.txt"
# ========== Functions ====================================================
......@@ -123,6 +126,9 @@ function remove_obsolete_files ()
{
local -a file_list=()
local current_file=""
local name=""
local arch=""
local type=""
log_info_message "Removing obsolete files from previous versions of WSUS Offline Update..."
# Only changes since WSUS Offline Update version 9.5.3 are considered.
......@@ -136,13 +142,24 @@ function remove_obsolete_files ()
then
log_warning_message "Keeping dummy.txt files in development version..."
else
find .. -type f -name dummy.txt -delete
file_list+=(
./exclude/local/dummy.txt
../log/dummy.txt
../iso/dummy.txt
../exclude/custom/dummy.txt
../static/custom/dummy.txt
../static/sdd/dummy.txt
../client/exclude/custom/dummy.txt
../client/static/custom/dummy.txt
../client/software/msi/dummy.txt
../client/UpdateTable/dummy.txt
)
fi
# *** Obsolete internal stuff ***
file_list+=(
../cmd/ExtractUniqueFromSorted.vbs
../cmd/CheckTRCerts.cmd
../client/static/StaticUpdateIds-BuildUpgrades.txt.bak
../client/static/StaticUpdateIds-w100-x86.txt
../client/static/StaticUpdateIds-w100-x64.txt
)
......@@ -156,6 +173,9 @@ function remove_obsolete_files ()
../client/opt/OptionList-Q.txt
)
# Removed in Community Edition 12.6.1 (b8)
file_list+=( ../client/opt/OptionList-qn.txt )
# Removed in the Community Editions 11.9.2-ESR and 12.1
#
# The index files *-modified.txt for the update of static download
......@@ -198,6 +218,12 @@ function remove_obsolete_files ()
rm -r ../opt
fi
# Removed in the Community Edition 12.7
file_list+=(
../static/StaticDownloadLinks-w100-19041-x64-glb.txt.bak
../static/StaticDownloadLinks-w100-19041-x86-glb.txt.bak
)
# *** Obsolete external stuff ***
file_list+=(
../static/StaticDownloadLinks-mkisofs.txt
......@@ -398,6 +424,22 @@ function remove_obsolete_files ()
)
shopt -u nullglob
# *** CPP restructuring stuff ***
#
# Removed in Community Edition 12.6.1 (b8)
for name in cpp2005 cpp2008 cpp2010 cpp2012 cpp2013 cpp2015
do
for arch in x64 x86
do
for type in documented new old
do
file_list+=(
"../client/static/StaticUpdateIds-${name}_${arch}_${type}.txt"
)
done
done
done
# *** .NET restructuring stuff ***
#
# Removed in Community Editions 11.9.8-ESR and 12.3. The XSLT files
......@@ -414,6 +456,23 @@ function remove_obsolete_files ()
)
shopt -u nullglob
# *** .NET 5 restructuring stuff ***
#
# Removed in Community Edition 12.6.1 (b8)
file_list+=( ../client/static/StaticUpdateIds-dotnet5_documented.txt )
for name in ASPNETRuntime DesktopRuntime Runtime
do
for arch in x64 x86
do
for type in new old
do
file_list+=(
"../client/static/StaticUpdateIds-dotnet5_${name}_${arch}_${type}.txt"
)
done
done
done
# *** Microsoft Security Essentials stuff ***
#
# The usage of the directories msse and wddefs was basically reversed
......@@ -493,7 +552,7 @@ function remove_obsolete_files ()
do
if [[ -f "${current_file}" ]]
then
log_debug_message "Deleting ${current_file}"
#log_debug_message "Deleting ${current_file}"
rm "${current_file}"
fi
done
......@@ -597,6 +656,14 @@ function update_configuration_files ()
log_info_message "Checking directory wsusoffline/client/static ..."
recursive_download "../client/static" "${static_updatefiles_modified_url}"
echo ""
# The files OptionList.txt and OptionList-wildcard.txt were introduced
# in Community Edition 12.6.1 (b8)
download_from_gitlab "../client/opt" "${option_list_url}"
echo ""
download_from_gitlab "../client/opt" "${option_list_wildcard_url}"
#echo ""
if same_error_count "${initial_errors}"
......
......@@ -2,7 +2,7 @@
#
# Filename: compare-integrity-database.bash
#
# Copyright (C) 2016-2021 Hartmut Buhrmester
# Copyright (C) 2016-2022 Hartmut Buhrmester
# <wsusoffline-scripts-xxyh@hartmut-buhrmester.de>
#
# License
......@@ -108,8 +108,12 @@ function create_diff_files ()
do
printf '%s\n' "Processing: ${filename}"
# Skip the first five lines with hashdeep comments
grep -v -e "^%%%% " -e "^## " "${filename}" \
| tr -d '\r' \
#
# This is different than the ESR version, because the file
# hashes-msedge.txt does not actually have all headers of a
# regular hashdeep file.
grep -v -e "^%%%% " -e "^## " "${filename}" \
| tr -d '\r' \
| sort > "${temp_directory}/${filename}"
# Remove empty files
if [[ ! -s "${temp_directory}/${filename}" ]]
......
......@@ -2,7 +2,7 @@
#
# Filename: compare-update-tables.bash
#
# Copyright (C) 2016-2021 Hartmut Buhrmester
# Copyright (C) 2016-2022 Hartmut Buhrmester
# <wsusoffline-scripts-xxyh@hartmut-buhrmester.de>
#
# License
......
......@@ -2,7 +2,7 @@
#
# Filename: copy-to-target.bash
#
# Copyright (C) 2018-2021 Hartmut Buhrmester
# Copyright (C) 2018-2022 Hartmut Buhrmester
# <wsusoffline-scripts-xxyh@hartmut-buhrmester.de>
#
# License
......
......@@ -2,7 +2,7 @@
# Filename: create-iso-image.bash
#
# Copyright (C) 2019-2021 Hartmut Buhrmester
# Copyright (C) 2019-2022 Hartmut Buhrmester
# <wsusoffline-scripts-xxyh@hartmut-buhrmester.de>
#
# License
......@@ -497,7 +497,7 @@ function create_filter_file ()
# Copy the selected file ExcludeListISO-*.txt
log_info_message "Copying ${selected_excludelist} ..."
# Remove empty lines and comments
#
# Carriage return must be removed first, because git may change all
......
NEWS for the Linux download scripts, version 2.7
Release date: 2022-01-13
Development branch: master
Supported version: WSUS Offline Update, Community Edition 12.6.1 hotfix1
Bug fixes
* Better handling of filenames with spaces, thanks to mani
The URLs in the file ../static/StaticDownloadLinks-win-glb.txt
used to be percent-encoded, e.g. spaces in the filename were
replaced with %20. This was changed in Community Edition 12.6.1,
and now spaces are used literally.
The necessary changes for the Linux scripts are already included
in Community Edition 12.6.1 hotfix1.
Internal Changes
* The files StaticUpdateIds-BuildUpgrades.txt and
StaticUpdateIds-BuildUpgradesForced.txt are used for the calculation
of superseded updates
* The files OptionList.txt and OptionList-wildcard.txt are updated
from GitLab
* Obsolete files from restructuring of C++ and .NET 5 updates
are removed
* Last traces of Silverlight are removed
* Cosmetics
---------------------------------------------------------------------------
NEWS for the Linux download scripts, version 2.6
Release date: 2021-10-18
......
Linux download scripts, version 2.7
Release date: 2022-01-13
Development branch: master
Supported version: WSUS Offline Update, Community Edition 12.6.1 hotfix1
Bug fixes
* Better handling of filenames with spaces, thanks to mani
Internal Changes
* The files StaticUpdateIds-BuildUpgrades.txt and
StaticUpdateIds-BuildUpgradesForced.txt are used for the calculation
of superseded updates
* The files OptionList.txt and OptionList-wildcard.txt are updated
from GitLab
* Obsolete files from restructuring of C++ and .NET 5 updates
are removed
* Last traces of Silverlight are removed
* Cosmetics
---------------------------------------------------------------------------
Linux download scripts, version 2.6
Release date: 2021-10-18
......
......@@ -2,7 +2,7 @@
#
# Filename: 10-parse-command-line.bash
#
# Copyright (C) 2016-2021 Hartmut Buhrmester
# Copyright (C) 2016-2022 Hartmut Buhrmester
# <wsusoffline-scripts-xxyh@hartmut-buhrmester.de>
#
# License
......
......@@ -2,7 +2,7 @@
#
# Filename: 20-get-sysinternals-helpers.bash
#
# Copyright (C) 2016-2021 Hartmut Buhrmester
# Copyright (C) 2016-2022 Hartmut Buhrmester
# <wsusoffline-scripts-xxyh@hartmut-buhrmester.de>
#
# License
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment