NEWS for Linux download scripts, Community Edition 2.3

NEWS for Linux download scripts, Community Edition 2.3

Postby hbuhrmester » 20.01.2021, 12:07

NEWS for the Linux download scripts, Community Edition 2.3

Release date: 2021-01-19
Development branch: master
Supported version: WSUS Offline Update, Community Edition 12.4

The Linux download scripts, version 2.3 try to keep up with WSUS Offline Update, Community Edition 12.4. These scripts are not compatible with the upcoming WSUS Offline Update, Community Edition 12.5, because of major changes in the calculation of dynamic updates.

Important: The option -includesp was added back. If this option is not used, then several large updates for Windows 8.1 / Server 2012 R2 may be omitted. The option -includesp is pre-selected in the script update-generator.bash. If you use the script download-updates.bash directly, e.g. in cron jobs, then you should add the option there.


New Features

Added support for Windows 10, version 20H2

All Windows 10 versions are enabled by default. They can be disabled with a series of version-specific exclude lists in the directory wsusoffline/exclude:

Code: Select all
ExcludeList-w100-1507.txt
ExcludeList-w100-1607.txt
ExcludeList-w100-1803.txt
ExcludeList-w100-1809.txt

ExcludeList-w100-1903.txt
ExcludeList-w100-1909.txt
ExcludeList-w100-1903_1909.txt

ExcludeList-w100-2004.txt
ExcludeList-w100-20H2.txt
ExcludeList-w100-2004_20H2.txt


Adding the support for version 20H2 means, that you can now disable this version.


Optional "fast mode" for the calculation of the integrity database

WSUS Offline Update uses three hash function to create the integrity database: MD5, SHA-1 and SHA-256. This always looked over-engineered, and it is unnecessarily slow on old machines. An optional "fast mode" was introduced, which only calculates the SHA-1 hash. This option can be enabled in the file preferences.bash.

The resulting hashdeep files will be compatible with previous versions of the Linux scripts and with the Windows scripts, because hashdeep recognizes the file format automatically. You don't need to delete any existing files in the directory ../client/md, because the hashdeep files will be deleted and recreated automatically on each download run.

Note: The Windows script DownloadUpdates.cmd can use the same fast mode with a small patch. This is only needed, if you like to compare the results on Windows and Linux with the script compare-integrity-database.bash:

  1. Change the hashdeep option "-c md5,sha1,sha256" to "-c sha1" everywhere.

  2. Find the line:

    Code: Select all
    for /F "usebackq tokens=3,5 delims=," %%i in ("%TEMP%\sha1-%1-%2.txt") do (


    and change it to:

    Code: Select all
    for /F "usebackq tokens=2,3 delims=," %%i in ("%TEMP%\sha1-%1-%2.txt") do (


    The hashdeep files are used for a quick integrity check: The expected SHA-1 hash is embedded into the filename of most security updates. It is compared to the calculated SHA-1 hash in the hashdeep file. If they don't match, then the downloaded file will be deleted.

    For this comparison, the script extracts fields 3 and 5 of the comma-separated hashdeep files in its default mode. It extracts fields 2 and 3 in the fast mode.

    Default field order of the hashdeep files:

    Code: Select all
    Field 1 = File size
    Field 2 = MD5 hash
    Field 3 = SHA-1 hash as calculated by hashdeep
    Field 4 = SHA-256 hash
    Field 5 = Relative pathname with embedded SHA-1 hash


    Field order in the fast mode:

    Code: Select all
    Field 1 = File size
    Field 2 = SHA-1 hash as calculated by hashdeep
    Field 3 = Relative pathname with embedded SHA-1 hash


    Warning: The patch for the Windows script DownloadUpdates.cmd was tested and should work so far, but if you mess this up, all existing downloads will be deleted due to "mismatching SHA-1 hashes".


The option -includesp was added back

The option -includesp was added back to the master development branch, with a limited scope: If this option is not used, then updates for Windows 8.1 / Server 2012 R2 from two files will be omitted:

Code: Select all
../client/static/StaticUpdateIds-w63-upd1.txt
../client/static/StaticUpdateIds-w63-upd2.txt


The option -includesp will be pre-selected in the Linux script update-generator.bash. You should add it manually, if you use the script download-updates.bash directly, e.g. in cron jobs.

Notes: The corresponding option in the Windows script DownloadUpdates.cmd is /excludesp, but it was translated to -includesp for consistency with the other optional downloads.

The Windows application UpdateGenerator.exe does not expose the option excludesp in its user interface. To use this option, you need to add it manually to the settings file UpdateGenerator.ini:

Code: Select all
[Options]
excludesp=Enabled



Changed Features

Default languages are removed on the fly

By default, WSUS Offline Update downloads updates for the languages English and German.

In the Windows version, the default languages can be removed with the scripts RemoveGermanLanguageSupport.cmd and RemoveEnglishLanguageSupport.cmd (the latter is only included in the ESR-version). More languages can be added with the script AddCustomLanguageSupport.cmd.

The new Linux download scripts always tried to do that in a more consistent way:

  • First, the default languages are removed from several global files in the directory wsusoffline/static.

  • All languages, which are selected on the command-line, are then added back from the localized files in the same directory.

In previous versions, the removal of default languages would modify the global input files on disk. Now the default languages are removed on the fly, without changing the input files at all.


hashdeep messages are duplicated with tee

The functions create_integrity_database and verify_integrity_database now use "tee" to duplicate messages from hashdeep and to write them to the logfile and the screen. This is possible, because the logfile is referenced with absolute paths since version 1.11 of the Linux download scripts.

Previously, a workaround was needed, because relative paths to the logfile would become invalid, if the working directory was changed with pushd/popd.


Sysinternals utilities are downloaded to the directory ../bin

The archives AutoLogon.zip, Sigcheck.zip and Streams.zip are downloaded to the directory ../bin, as in the Windows script DownloadUpdates.cmd.


Five more obsolete configuration files are removed

The following configuration files are no longer needed in the master version and will be removed:

Code: Select all
../static/StaticDownloadLink-mkisofs.txt
../static/StaticDownloadLinks-mkisofs.txt
../client/static/StaticUpdateIds-ie10-w61.txt
../client/static/StaticUpdateIds-ie11-w61.txt
../client/static/StaticUpdateIds-dotnet35.txt



Renamed the functions filter_cr and todos_line_endings

The functions filter_cr and todos_line_endings are both meant to change line endings from and to DOS. They are now named more appropriately:

Code: Select all
filter_cr           ->  dos_to_unix
todos_line_endings  ->  unix_to_dos



The download directories dotnet/x86-glb and dotnet/x64-glb are no longer used

The download directories ../client/dotnet/x86-glb and ../client/dotnet/x64-glb for dynamic .NET Framework updates are no longer used. Dynamic updates for .NET Frameworks are now downloaded to the respective Windows directories, e.g. ../client/w62-x64/glb.

The following files will be removed automatically:

Code: Select all
../xslt/ExtractDownloadLinks-dotnet-x86-glb.xsl
../xslt/ExtractDownloadLinks-dotnet-x64-glb.xsl
../client/md/hashes-dotnet-x86-glb.txt
../client/md/hashes-dotnet-x64-glb.txt


You may delete the following directories manually, but only in WSUS Offline Update 12.3 and higher (master development branch):

Code: Select all
../client/dotnet/x86-glb
../client/dotnet/x64-glb


Do not delete the parent directory ../client/dotnet, because it is still needed for the static .NET Framework installation files.

Reference:



Removed features

Removed support for Office 2010

This removes the following files:

Code: Select all
../static/StaticDownloadLinks-o2k10-*.txt
../client/static/StaticUpdateIds-o2k10.txt



Removed support for Windows 10 version 1709

The following files will be removed:

Code: Select all
../exclude/ExcludeList-w100-1709.txt
../client/static/StaticUpdateIds-w100-16299.txt
../client/static/StaticUpdateIds-w100-16299-x64.txt
../client/static/StaticUpdateIds-w100-16299-x86.txt
../client/static/StaticUpdateIds-wupre-w100-16299.txt
../client/static/StaticUpdateIds-servicing-w100-16299.txt
../client/static/StaticUpdateIds-w100-16299-dotnet.txt
../client/static/StaticUpdateIds-w100-16299-dotnet4-528049.txt




Downloads

The download links for this version are:


Link for the online check at VirusTotal. Note, that the URL includes the SHA-256 hash of the archive:


The hashes for the archive linux-scripts-2.3.tar.gz are:
Code: Select all
MD5      fb141a2efd0d4d0fb0513984927da0b9
SHA-1    88cfdd1c6a459101532380aae049b16b98a665db
SHA-256  2035d4cfa48abf4396cd6c19ec11f2b286f8575f2e612561ca04ab258447b410




Further Reading

The first three posts in the original topic A complete rewrite of the Linux scripts are still being updated, to point to the latest version:

hbuhrmester
 
Posts: 525
Joined: 11.10.2013, 20:59

Re: NEWS for Linux download scripts, Community Edition 2.3

Postby aker » 20.01.2021, 17:32

Wie sehen die Pläne mit Linux-Skripten für 12.5 bzw. 11.9.8 aus?
Ich würde die Versionen gerne mit aktuellen Linux-Skripten freigeben.

Großartige Änderungen sind nicht mehr geplant, lediglich möchte ich die doppelten Einträge in den Download-ExcludeLists für x64 und x86 zusammenführen; der Code dafür ist in der DownloadUpdates.cmd ja bereits enthalten (z.B. .\exclude\ExcludeList-w100-[x64/x86].txt -> .\exclude\ExcludList-w100.txt).

Im Hinblick auf den "fast-mode" würde ich in der DownloadUpdates.cmd und dem Installer am liebsten etwas implementieren, was anhand der Dateien den zu verwendenden Modus von alleine erkennt. Aktuell habe ich aber keine Zeit dafür; hast du da einen Vorschlag, den ich in den Windows-Code übernehmen kann?

Viele Grüße
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to keep or sell it.
aker

WSUS Offline Update „Community Edition“
https://gitlab.com/wsusoffline/wsusoffline/-/releases
aker
 
Posts: 3999
Joined: 02.03.2011, 15:32

Re: NEWS for Linux download scripts, Community Edition 2.3

Postby hbuhrmester » 20.01.2021, 21:52

aker wrote:Wie sehen die Pläne mit Linux-Skripten für 12.5 bzw. 11.9.8 aus?
Ich würde die Versionen gerne mit aktuellen Linux-Skripten freigeben.


Im Augenblick bin ich noch dabei, die Änderungen bis zur letzten Version 11.9.7 aufzuarbeiten. Das ist aber fast fertig.

Dann muss ich mal in Ruhe nachvollziehen, was es alles an Änderungen in den Versionen 12.5 und 11.9.8 gibt.

Im Hinblick auf den "fast-mode" würde ich in der DownloadUpdates.cmd und dem Installer am liebsten etwas implementieren, was anhand der Dateien den zu verwendenden Modus von alleine erkennt. Aktuell habe ich aber keine Zeit dafür; hast du da einen Vorschlag, den ich in den Windows-Code übernehmen kann?


hashdeep erkennt selber das verwendete Format. Für die Überprüfung muss man in den Linux- oder Windows-Skripten nichts weiter implementieren.

Zum Beispiel enthält das Skript client/cmd/InstallOSUpdate.cmd zurzeit Anweisungen wie:

Code: Select all
%HASHDEEP_PATH% -a -l -k "%TEMP%\hash-%%i-%%j.txt" %1
%HASHDEEP_PATH% -a -l -k "%TEMP%\hash-%%i.txt" %1


Daran ändert sich ja nichts, weil man das Format, das heißt die verwendeten Hashfunktionen, bei der Überprüfung nicht angeben muss.

Ich habe gestern noch einen Nachmittag damit zugebracht, zwischen beiden Formaten hin- und herzuwechseln, und die Überprüfung hat problemlos funktioniert. Das Format muss nur beim Erstellen der Hashdeep-Dateien angegeben werden.


Sinnvoll wäre es aber, die hashdeep-Option -b für "bare mode" einzuführen, anstelle der Option -l für den relativen Pfadmodus:

Code: Select all
-b     Enables bare mode. Strips any leading directory information from
       displayed  filenames.   This flag may not be used in conjunction
       with the -l flag.

-l     Enables relative file paths. Instead of  printing  the  absolute
       path for each file, displays the relative file path as indicated
       on the command line. This flag may not be  used  in  conjunction
       with the -b flag.


Damit werden einfach alle Pfadinfomationen entfernt und nur noch der Dateiname verwendet. Für die Downloadskripte entfallen damit die vielen Verzeichniswechsel mit pushd/popd. Für flache Hierarchien ist das eigentlich optimal.

Für die Verzeichnisse wddefs und msse kann man sich überlegen, ob man zwei getrennte hashdeep-Dateien für die Unterverzeichnisse braucht, weil die Dateinamen doppelt auftreten können. Wahrscheinlich ist aber auch das kein Problem, weil hashdeep Dateien zuerst anhand der Hashe identifiziert, nicht einfach an den Dateinamen oder dem Pfad. Nur so kann hashdeep umbenannte oder verschobene Dateien identifizieren.

Viele Grüße
hbuhrmester
 
Posts: 525
Joined: 11.10.2013, 20:59

Re: NEWS for Linux download scripts, Community Edition 2.3

Postby aker » 21.01.2021, 06:02

Den „bare mode“ sehe ich mir zum Wochenende einmal an.

Mein aktuelles übergeordnetes Ziel ist es, den Wartungsaufwand (in Form von statischen Definitionen) so weit zu reduzieren, wie nur möglich. Das schaffe ich nur ohne Änderungen an den Algorithmen nicht...
Mit Office scheint das ja sogar ganz gut geklappt zu haben; bis auf die „proof“-Updates (und das SP1 für o2k13) ist nichts mehr statisch definiert.

Viele Grüße
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to keep or sell it.
aker

WSUS Offline Update „Community Edition“
https://gitlab.com/wsusoffline/wsusoffline/-/releases
aker
 
Posts: 3999
Joined: 02.03.2011, 15:32

Re: NEWS for Linux download scripts, Community Edition 2.3

Postby aker » 31.01.2021, 18:50

Ist jetzt mal als Test implementiert.
:arrow: https://gitlab.com/wsusoffline/wsusoffline/-/tree/testing

Es fehlt jedoch noch eine Bereinigung der alten Hash-Dateien.

Viele Grüße
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to keep or sell it.
aker

WSUS Offline Update „Community Edition“
https://gitlab.com/wsusoffline/wsusoffline/-/releases
aker
 
Posts: 3999
Joined: 02.03.2011, 15:32

Re: NEWS for Linux download scripts, Community Edition 2.3

Postby hbuhrmester » 01.02.2021, 09:59

Ich habe mittlerweile die größten Änderungen übersetzt, und es funktioniert soweit auch. Ein paar Anmerkungen:

Die Unterteilung von Office-Updates in globale und lokalisierte Dateien kann weiter vereinfacht werden: Alle globalen Office-Updates, die aus der Datei wsusscn2.cab extrahiert werden, haben ein Pseudo-Locale "x-none" im Dateinamen. Das entspricht anscheinend dem "glb" in Windows-Updates. Dann könnte man globale Office-Updates auch mit "-x-none_" filtern. Globale Updates sind dann auch kein Sonderfall mehr, sondern man hat die Filter:

Code: Select all
deu -> de-de
enu -> en-us
glb -> x-none


Das hat bei mir problemlos geklappt.



So, wie die XSLT-Dateien funktionieren, haben die erzeugten Dateien manchmal leere Felder. Nach der Verknüpfung der Dateien mit join kann dies zu leeren Zeilen führen. Das stört meistens nicht, und bei der Verknüpfung mit anderen Dateien verschwinden die leeren Felder wieder. Aber wenn man eine Datei mit Leerzeilen als Filterdatei für grep verwendet, dann erzeugt grep nur eine leere Ausgabedatei. Das kann man verhindern, indem man join mit der Option -e "unavailable" aufruft. Wenn findstr.exe damit keine Probleme hat, ist es aber egal.

findstr.exe und grep sind allerdings nicht optimal, um große Dateien zu vergleichen, weil diese Tools dann jede Zeile der einen Datei mit jeder Zeile der anderen Datei vergleichen müssen. Bei ähnlichen Dateien mit denselben Daten ist join besser: Mit der Option -v1 macht join ein "left join" – gleiche Zeilen werden ausgeblendet, und es werden nur die nicht übereinstimmenden Zeilen aus der ersten Datei ausgegeben. Das ist praktisch die Differenz: Datei1 - Datei2 = Ergebnis



Die Code-Blöcke

Code: Select all
if not "%2"=="glb" (
  if exist ..\exclude\ExcludeList-%TMP_PLATFORM%-lng.txt (
    type ..\exclude\ExcludeList-%TMP_PLATFORM%-lng.txt >>"%TEMP%\ExcludeList-%1.txt"
    if exist ..\exclude\custom\ExcludeList-%TMP_PLATFORM%-lng.txt type ..\exclude\custom\ExcludeList-%TMP_PLATFORM%-lng.txt >>"%TEMP%\ExcludeList-%1.txt"
  )
  if exist ..\exclude\ExcludeList-%TMP_PLATFORM%-%3-lng.txt (
    type ..\exclude\ExcludeList-%TMP_PLATFORM%-%3-lng.txt >> "%TEMP%\ExcludeList-%1.txt"
    if exist ..\exclude\custom\ExcludeList-%TMP_PLATFORM%-%3-lng.txt type ..\exclude\custom\ExcludeList-%TMP_PLATFORM%-%3-lng.txt >>"%TEMP%\ExcludeList-%1.txt"
  )
)


Code: Select all
if not "%2"=="glb" (
  if exist ..\exclude\ExcludeList-ofc-lng.txt type ..\exclude\ExcludeList-ofc-lng.txt >>"%TEMP%\ExcludeList-%1.txt"
  if exist ..\exclude\custom\ExcludeList-ofc-lng.txt type ..\exclude\custom\ExcludeList-ofc-lng.txt >>"%TEMP%\ExcludeList-%1.txt"
)


könnten zusammengefasst werden, weil es anscheinend um die Dateien ExcludeList-o2k13-lng.txt und ExcludeList-ofc-lng.txt geht.



Die Dateien ExcludeList-dotnet-x86.txt und ExcludeList-dotnet-x64.txt werden beim Löschen doppelt aufgezählt, in den Zeilen 319-320 und 556-557.



Die Kodierung der Datei DownloadUpdates.cmd 12.5 (b26) wurde von "meld", einem grafischen Aufsatz für diff, nicht erkannt, weil es nicht wie erwartet UTF-8 war. Tatsächlich ist es ISO-8859-1 oder Windows CP-1252. Das liegt nur an einem Kommentar:

Code: Select all
rem andere Architekturen ausschließen


Viele Grüße
hbuhrmester
 
Posts: 525
Joined: 11.10.2013, 20:59

Re: NEWS for Linux download scripts, Community Edition 2.3

Postby aker » 01.02.2021, 23:45

Encodierung
Kurios; ich verwende hier Notepad++ und dort werden beide als "ANSI" erkannt...
Ich habe den Kommentar jetzt auf Englisch übersetzt, damit das "ß" weg ist.

ExcludeList-dotnet-x64/x86.txt
Danke; ist bereinigt.

Zusammenfassung von Blöcken
Die wollte ich nicht zusammenfassen, da der Block
Code: Select all
if not "%2"=="glb" (
  if exist ..\exclude\ExcludeList-%TMP_PLATFORM%-lng.txt (
    type ..\exclude\ExcludeList-%TMP_PLATFORM%-lng.txt >>"%TEMP%\ExcludeList-%1.txt"
    if exist ..\exclude\custom\ExcludeList-%TMP_PLATFORM%-lng.txt type ..\exclude\custom\ExcludeList-%TMP_PLATFORM%-lng.txt >>"%TEMP%\ExcludeList-%1.txt"
  )
  if exist ..\exclude\ExcludeList-%TMP_PLATFORM%-%3-lng.txt (
    type ..\exclude\ExcludeList-%TMP_PLATFORM%-%3-lng.txt >> "%TEMP%\ExcludeList-%1.txt"
    if exist ..\exclude\custom\ExcludeList-%TMP_PLATFORM%-%3-lng.txt type ..\exclude\custom\ExcludeList-%TMP_PLATFORM%-%3-lng.txt >>"%TEMP%\ExcludeList-%1.txt"
  )
)

für alle Platformen angewendet (Option eine "ExcludeList-w62/w63/w100-lng.txt" einzuführen, ohne den Code ändern zu müssen), der Block
Code: Select all
if not "%2"=="glb" (
  if exist ..\exclude\ExcludeList-ofc-lng.txt type ..\exclude\ExcludeList-ofc-lng.txt >>"%TEMP%\ExcludeList-%1.txt"
  if exist ..\exclude\custom\ExcludeList-ofc-lng.txt type ..\exclude\custom\ExcludeList-ofc-lng.txt >>"%TEMP%\ExcludeList-%1.txt"
)

aber nur auf Office (generelle Office-Ausschöüsse) angewendet werden soll.

x-none
Ist korrekt, soweit ich das überblicke. Gibt es spezifische Vorteile, nach "x-none" zu suchen, anstatt die Sprachen auszuschließen? Die aktuelle Implementierung hätte den Charme, dass ein (aus welchen Gründen auch immer) anders benanntes Update im Zweifel im "glb"-Ordner landet, ohne, dass ich am Code etwas tun müsste.

leere Felder in XSLT-Feldern
Eine Modifikation der XSL-Filter vergleichbar zu
Code: Select all
<?xml version="1.0"?>
<!-- Author: H. Buhrmester -->
<!-- Filename: extract-update-revision-and-file-ids.xsl -->
<!-- This file extracts the following fields: -->
<!-- Field 1: Bundle RevisionId -->
<!-- Field 2: Update RevisionId -->
<!-- Field 3: File Id of the PayloadFile -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:__="http://schemas.microsoft.com/msus/2004/02/OfflineSync" version="1.0">
  <xsl:output omit-xml-declaration="yes" indent="no" method="text" />
  <xsl:template match="/">
    <xsl:for-each select="__:OfflineSyncPackage/__:Updates/__:Update/__:BundledBy/__:Revision">
      <xsl:if test="@Id != '' and ../../@RevisionId != '' and ../../__:PayloadFiles/__:File/@Id != ''">
        <xsl:text>#</xsl:text>
        <xsl:value-of select="@Id" />
        <xsl:text>#,#</xsl:text>
        <xsl:value-of select="../../@RevisionId" />
        <xsl:text>#,</xsl:text>
        <xsl:value-of select="../../__:PayloadFiles/__:File/@Id" />
        <xsl:text>&#10;</xsl:text>
      </xsl:if>
    </xsl:for-each>
  </xsl:template>
</xsl:stylesheet>

würde diese Situation ebenfalls verhindern, wenn ich das richtig verstehe, korrekt?
[EDIT: in "b27" im master und esr implementiert; wird nicht nach "testing" portiert]

Viele Grüße
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to keep or sell it.
aker

WSUS Offline Update „Community Edition“
https://gitlab.com/wsusoffline/wsusoffline/-/releases
aker
 
Posts: 3999
Joined: 02.03.2011, 15:32

Re: NEWS for Linux download scripts, Community Edition 2.3

Postby hbuhrmester » 02.02.2021, 16:56

x-none
Ist korrekt, soweit ich das überblicke. Gibt es spezifische Vorteile, nach "x-none" zu suchen, anstatt die Sprachen auszuschließen? Die aktuelle Implementierung hätte den Charme, dass ein (aus welchen Gründen auch immer) anders benanntes Update im Zweifel im "glb"-Ordner landet, ohne, dass ich am Code etwas tun müsste.


Der Code ist kürzer, weil es nur noch einen allgemeinen Fall gibt, der auch x-none einschließt. Meine aktuelle Lösung wäre jetzt:

Code: Select all
case "${name}" in
    # Windows updates (PLATFORM_WINDOWS in DownloadUpdates.cmd)
    w62 | w63 | w100)
        # Simply rename the file, because ${lang} will always be
        # "glb" for Windows updates
        mv "${temp_dir}/update-ids-and-locations-${name}.txt" \
           "${temp_dir}/update-ids-and-locations-${name}-${lang}.txt"
    ;;
    # Office updates (PLATFORM_OFFICE in DownloadUpdates.cmd)
    o2k13 | o2k16)
        # To filter Office updates, language codes like enu, deu
        # and glb are translated to locales.
        #
        # All global Office updates, which are extracted from the
        # WSUS Offline scan file wsusscn2.cab, are identified with
        # a pseudo locale "x-none". Therefore, global updates don't
        # need to treated specially.
        #
        # Locales with language and territory code as used in the
        # Windows script DetermineSystemProperties.vbs
        #
        # For details see the configuration files in
        # /usr/share/i18n/locales (Debian 10 Buster)
        case "${lang}" in
            deu) locale="de-de";;
            enu) locale="en-us";;
            ara) locale="ar-sa";;
            chs) locale="zh-cn";;
            cht) locale="zh-tw";;
            csy) locale="cs-cz";;
            dan) locale="da-dk";;
            nld) locale="nl-nl";;
            fin) locale="fi-fi";;
            fra) locale="fr-fr";;
            ell) locale="el-gr";;
            heb) locale="he-il";;
            hun) locale="hu-hu";;
            ita) locale="it-it";;
            jpn) locale="ja-jp";;
            kor) locale="ko-kr";;
            nor) locale="nb-no";;
            plk) locale="pl-pl";;
            ptg) locale="pt-pt";;
            ptb) locale="pt-br";;
            rus) locale="ru-ru";;
            esn) locale="es-es";;
            sve) locale="sv-se";;
            trk) locale="tr-tr";;
            glb) locale="x-none";;
            *) fail "Unsupported or unknown language ${lang}";;
        esac

        # Extract localized and global files using search strings like
        # "-en-us_" or "-x-none_"
        grep -F -i -e "-${locale}_" \
            "${temp_dir}/update-ids-and-locations-${name}.txt" \
            > "${temp_dir}/update-ids-and-locations-${name}-${lang}.txt" || true
    ;;
esac


Die Liste mit den Locales ist halt auch nicht immer vollständig. Mit meiner ursprünglichen Liste hatte ich 10-20 zusätzliche Downloads. Mit der Liste wsusoffline/opt/locales.txt gab es aber keine zusätzlichen Downloads mehr.


Der Name "LOCALE_LONG" ist eigentlich auch etwas sperrig. Ich hatte das in meinem Office-Patch zur Unterscheidung eingeführt, weil "LANG_SHORT" früher nur den Sprachcode enthielt. Die Region wurde nur angefügt, wenn die Sprache alleine mehrdeutig wäre. In WSUS Offline Update 11.8.3 sah das noch so aus:

Code: Select all
for %%i in (o2k10 o2k13) do (
  if /i "%1"=="%%i" (
    for %%j in (enu fra esn jpn kor rus ptg ptb deu nld ita chs cht plk hun csy sve trk ell ara heb dan nor fin) do (if /i "%2"=="%%j" goto Lang_%%j)
  )
)
goto InvalidParams

:Lang_enu
set LANG_SHORT=en
goto EvalParams

:Lang_fra
set LANG_SHORT=fr
goto EvalParams

:Lang_esn
set LANG_SHORT=es
goto EvalParams

:Lang_jpn
set LANG_SHORT=ja
goto EvalParams

:Lang_kor
set LANG_SHORT=ko
goto EvalParams

:Lang_rus
set LANG_SHORT=ru
goto EvalParams

:Lang_ptg
set LANG_SHORT=pt
goto EvalParams

:Lang_ptb
set LANG_SHORT=pt-br
goto EvalParams

:Lang_deu
set LANG_SHORT=de
goto EvalParams

:Lang_nld
set LANG_SHORT=nl
goto EvalParams

:Lang_ita
set LANG_SHORT=it
goto EvalParams

:Lang_chs
set LANG_SHORT=zh-cn
goto EvalParams

:Lang_cht
set LANG_SHORT=zh-tw
goto EvalParams

:Lang_plk
set LANG_SHORT=pl
goto EvalParams

:Lang_hun
set LANG_SHORT=hu
goto EvalParams

:Lang_csy
set LANG_SHORT=cs
goto EvalParams

:Lang_sve
set LANG_SHORT=sv
goto EvalParams

:Lang_trk
set LANG_SHORT=tr
goto EvalParams

:Lang_ell
set LANG_SHORT=el
goto EvalParams

:Lang_ara
set LANG_SHORT=ar
goto EvalParams

:Lang_heb
set LANG_SHORT=he
goto EvalParams

:Lang_dan
set LANG_SHORT=da
goto EvalParams

:Lang_nor
set LANG_SHORT=no
goto EvalParams

:Lang_fin
set LANG_SHORT=fi
goto EvalParams

:EvalParams


Aber eigentlich ist es einfach nur die "locale".


leere Felder in XSLT-Feldern
Eine Modifikation der XSL-Filter vergleichbar zu
...
würde diese Situation ebenfalls verhindern, wenn ich das richtig verstehe, korrekt?
[EDIT: in "b27" im master und esr implementiert; wird nicht nach "testing" portiert]


Das funktioniert gut. Wahrscheinlich hätte der Test auf die FileIds der PayloadFiles genügt, denn die scheinen in der Datei BundledUpdateRevisionAndFileIds.txt manchmal zu fehlen. Wahrscheinlich hat Microsoft die Dateien einfach gelöscht – dafür spricht, dass praktisch nur ältere Update-Records mit niedrigen RevisionsIds betroffen sind. Oder die Update-Records hängen noch einmal auf unbekannte Weise voneinander ab.

Viele Grüße
Last edited by hbuhrmester on 02.02.2021, 18:18, edited 1 time in total.
Reason: UpdateIds korrigiert zu FileIds
hbuhrmester
 
Posts: 525
Joined: 11.10.2013, 20:59

Re: NEWS for Linux download scripts, Community Edition 2.3

Postby hbuhrmester » 03.02.2021, 08:18

Noch eine Idee: Wenn die Datei locales.txt beibehalten werden soll, dann könnte man sie in den Ordner exclude verschieben. Von der Funktion her ist es ja eine ExcludeList-*, also vielleicht ExcludeList-locales.txt oder einfach als Anhang zur bereits bestehenden ExcludeList-ofc-glb.txt.

Dann könnte man sie über das SDD aktualisieren, und User könnte neue Locales in einer custom-Datei mit demselben Namen ergänzen.

Viele Grüße
hbuhrmester
 
Posts: 525
Joined: 11.10.2013, 20:59

Re: NEWS for Linux download scripts, Community Edition 2.3

Postby aker » 03.02.2021, 23:59

hbuhrmester wrote:Noch eine Idee: Wenn die Datei locales.txt beibehalten werden soll, dann könnte man sie in den Ordner exclude verschieben. Von der Funktion her ist es ja eine ExcludeList-*, also vielleicht ExcludeList-locales.txt oder einfach als Anhang zur bereits bestehenden ExcludeList-ofc-glb.txt.

Dann könnte man sie über das SDD aktualisieren, und User könnte neue Locales in einer custom-Datei mit demselben Namen ergänzen.

Viele Grüße

So habe ich das jetzt in die b28 übernommen; custom-Code folgt noch.

Entspricht der "bare mode"-Code im testing-Branch ungefähr dem, was weiter oben im Thema bereits vorgeschlagen wurde?
Dann würde ich noch Bereinigungscode für die existierenden Hash-Dateien einbauen und das Ergebnis in den master/esr übernehmen.

Viele Grüße
Wer Rechtschreibfehler findet, darf sie behalten oder an den Meistbietenden versteigern. / Everybody finding a misspelling is allowed to keep or sell it.
aker

WSUS Offline Update „Community Edition“
https://gitlab.com/wsusoffline/wsusoffline/-/releases
aker
 
Posts: 3999
Joined: 02.03.2011, 15:32

Next

Return to Linux

Who is online

Users browsing this forum: No registered users and 38 guests