Page 2 of 3

Re: ofc wird mit hunderten Updates zugemüllt

PostPosted: 12.12.2019, 15:14
by aker
boco wrote:Immer, wenn man denkt, daß MS nicht noch mehr Mist bauen kann...

;)

Re: ofc wird mit hunderten Updates zugemüllt

PostPosted: 12.12.2019, 16:48
by luminus
This issue also affects wsusoffline 9.2.6. When you just select Office 2007 English, wsusoffline downloads at least 10 GB of unrelated files into \client\ofc\glb and \client\ofc\enu. So I thought about adding windows into ExcludeList-ofc.txt, which kind of worked (although not for the right reasons) because it deleted all those 10GB, leaving just the static files.

Re: ofc wird mit hunderten Updates zugemüllt

PostPosted: 12.12.2019, 21:48
by aker
It currently affects all versions of wsusou using the current catalog (released 2019-12-10).

Re: ofc wird mit hunderten Updates zugemüllt

PostPosted: 14.12.2019, 17:51
by hbuhrmester
Die beiden Skripte aus dem letzten Post waren zunächst eine Art Proof of Concept, um zu sehen, welche URLs man bekommt, wenn man von der ProductFamily-Id für Office-Updates ausgeht.

Diese Skripte werden hier noch etwas ausgebaut:
  1. Die Dateien UpdateTable-ofc-*.csv werden erstellt.
  2. Die Updates werden nach globalen und lokalisierten Updates sortiert, aber zunächst nur für die beiden Standardsprachen Deutsch und Englisch.
  3. Die verschiedenen ExcludeLists werden angewendet. Dabei soll auch getestet werden, wie sehr man die ursprünglichen 5581 Office-URLs reduzieren kann.
  4. Am Ende bekommt man jeweils drei Dateien StaticDownloadLinks-ofc-*.txt und UpdateTable-ofc-*.csv, die man auch ausprobieren kann.

Die Dateien UpdateTable-ofc-*.csv enthalten die UpdateIds der Bundle-Records und die Dateinamen. Sie werden bei der Installation verwendet, um die zu installierenden Dateien anhand der UpdateIds zu suchen.

Die XSLT-Datei "extract-office-revision-and-update-ids.xsl" extrahiert bereits die UpdatesIds. Die beiden Verknüpfungen mit join müssen aber überarbeitet werden, damit die UpdateIds auch in die erstellten Dateien kopiert werden:

Code: Select all
# Join the first two files to get the FileIds. The UpdateId of the
# bundle record is copied, because it is needed later to create the
# files UpdateTable-ofc-*.csv.
#
# Input file 1: office-revision-and-update-ids.txt
# - Field 1: RevisionId of the bundle record
# - Field 2: UpdateId of the bundle record
# Input file 2: BundledUpdateRevisionAndFileIds.txt
# - Field 1: RevisionId of the bundle record
# - Field 2: RevisionId of the update record for a single PayloadFile
# - Field 3: FileId of the PayloadFile
# Output
# - Field 1: FileId of the PayloadFile
# - Field 2: UpdateId of the bundle record
echo "Creating file office-file-ids.txt ..."
join -t ',' -o 2.3,1.2 \
    office-revision-and-update-ids.txt \
    BundledUpdateRevisionAndFileIds.txt \
| sort --unique \
> office-file-and-update-ids.txt

# Join with third file to get the FileLocations (URLs)
#
# Input file 1: office-file-and-update-ids.txt
# - Field 1: FileId of the PayloadFile
# - Field 2: UpdateId of the bundle record
# Input file 2: UpdateCabExeIdsAndLocations.txt
# - Field 1: FileId of the PayloadFile
# - Field 2: Location (URL)
# Output
# - Field 1: UpdateId of the bundle record
# - Field 2: Location (URL)
echo "Creating file office-locations.txt ..."
join -t ',' -o 1.2,2.2 \
    office-file-and-update-ids.txt \
    UpdateCabExeIdsAndLocations.txt \
| sort --unique \
> office-update-ids-and-locations.txt


Die nächsten Schritte können in unterschiedlicher Reihenfolge ausgeführt werden. Das beeinflusst, wie groß die Dateien UpdateTable-ofc-*.csv schließlich werden. Wenn man die Dateien UpdateTable-ofc-*.csv möglichst vollständig, aber getrennt nach den Sprachen erstellen möchte, müssen die Updates jetzt nach den Sprachen sortiert werden.

Lokalisierte Updates kann man mit grep oder FindStr.exe extrahieren, indem man nach den Locales in den Dateinamen sucht. Wenn man die vollständigen Locales mit Sprach- und Regionalcode verwendet, und sie außerdem in einen Binde- und Unterstrich einschließt, kann es keine Treffer in den UpdateIds geben.

Code: Select all
grep -F -- "-de-de_" office-update-ids-and-locations.txt > ofc-deu-ids-and-locations.txt
grep -F -- "-en-us_" office-update-ids-and-locations.txt > ofc-enu-ids-and-locations.txt


Die globalen Updates bekommt man, indem man alle lokalisierten Updates ausschließt. Dazu benötigt man eine Datei locales.txt mit allen bekannten Locales außer den Platzhaltern "-glb_" und "-x-none_".

Code: Select all
-af-za_
-am-et_
-ar-sa_
-as-in_
-bg-bg_
-bn-bd_
-bn-in_
-ca-es_
-cs-cz_
-cy-gb_
-da-dk_
-de-de_
-el-gr_
-en-us_
-es-es_
-et-ee_
-eu-es_
-fa-ir_
-fi-fi_
-fil-ph_
-fr-fr_
-ga-ie_
-gl-es_
-gu-in_
-he-il_
-hi-in_
-hr-hr_
-hu-hu_
-hy-am_
-id-id_
-ig-ng_
-is-is_
-it-it_
-ja-jp_
-ka-ge_
-kk-kz_
-km-kh_
-kn-in_
-kok-in_
-ko-kr_
-ky-kg_
-lb-lu_
-lt-lt_
-lv-lv_
-mi-nz_
-mk-mk_
-ml-in_
-mr-in_
-ms-bn_
-ms-my_
-mt-mt_
-nb-no_
-ne-np_
-nl-nl_
-nn-no_
-nso-za_
-or-in_
-pa-in_
-pl-pl_
-pt-br_
-pt-pt_
-quz-pe_
-ro-ro_
-ru-ru_
-si-lk_
-sk-sk_
-sl-si_
-sq-al_
-sv-se_
-sw-ke_
-ta-in_
-te-in_
-th-th_
-tn-za_
-tr-tr_
-tt-ru_
-uk-ua_
-ur-pk_
-vi-vn_
-xh-za_
-yo-ng_
-zh-cn_
-zh-hk_
-zh-tw_
-zu-za_
-az-latn-az_
-bs-latn-ba_
-ha-latn-ng_
-iu-latn-ca_
-sr-cyrl-cs_
-sr-latn-cs_
-uz-latn-uz_


Diese Datei wird als Eingabe für ein inverted grep verwendet:

Code: Select all
grep -F -v -f locales.txt office-update-ids-and-locations.txt > ofc-glb-ids-and-locations.txt


Unter Windows kann man findstr.exe auf dieselbe Weise einsetzen:

Code: Select all
%SystemRoot%\System32\findstr.exe /L /I /C:"-de-de_" office-update-ids-and-locations.txt > ofc-deu-ids-and-locations.txt
%SystemRoot%\System32\findstr.exe /L /I /C:"-en-us_" office-update-ids-and-locations.txt > ofc-enu-ids-and-locations.txt
%SystemRoot%\System32\findstr.exe /L /I /V /G:"locales.txt" office-update-ids-and-locations.txt > ofc-glb-ids-and-locations.txt


Es gibt eine einzelne Datei officesmallbusinessaccounting2006-kb968377-fullfile-enu_2fd6ccbea2535ffdf6ae8b0f45026719b0208bda.cab , die nicht in dieses Schema passt. Sie wird erst in die globalen Updates einsortiert, als "fullfile" aber letztlich aussortiert.

An dieser Stelle erhält man:

glb 2501 Dateien
enu 80 Dateien
deu 79 Dateien


Die Dateien UpdateTable-ofc-*.csv werden erstellt, indem die vollständigen URLs auf die Dateinamen gekürzt werden. In der bash genügt eine kurze Read-Schleife, und für Windows gibt es das Skript ExtractIdsAndFileNames.vbs.


Danach werden die UpdateIds nicht mehr gebraucht. Die zweite Spalte wird aus den Dateien ofc-*-ids-and-locations.txt ausgeschnitten, um nur die URLs zu erhalten. Dafür bewährt sich "cut", eines der GNU Core Utilities, das auch in den UnxUtils für Windows enthalten ist:

Code: Select all
cut -d "," -f "2" ofc-glb-ids-and-locations.txt | sort -u > ofc-glb-locations.txt
cut -d "," -f "2" ofc-deu-ids-and-locations.txt | sort -u > ofc-deu-locations.txt
cut -d "," -f "2" ofc-enu-ids-and-locations.txt | sort -u > ofc-enu-locations.txt


Dadurch reduziert sich die Anzahl der Updates auf:

glb 2309 Dateien
enu 78 Dateien
deu 77 Dateien


Dann werden die verschiedenen ExcludeListen angewendet. Diese Dateien befinden sich alle im Verzeichnis wsusoffline/exclude.

Die ExcludeList-superseded.txt heißt unter Linux ExcludeList-Linux-superseded.txt, weil sie anders sortiert ist als die Windows-Version:

Code: Select all
join -v1 ofc-glb-locations.txt ExcludeList-Linux-superseded.txt > ofc-glb-locations-v2.txt
join -v1 ofc-deu-locations.txt ExcludeList-Linux-superseded.txt > ofc-deu-locations-v2.txt
join -v1 ofc-enu-locations.txt ExcludeList-Linux-superseded.txt > ofc-enu-locations-v2.txt


An dieser Stelle erhält man:

glb: 769 Dateien
enu: 30 Dateien
deu: 30 Dateien

Die ExcludeList-ofc.txt wird auf alle Updates angewendet:

Code: Select all
grep -F -v -f ExcludeList-ofc.txt ofc-glb-locations-v2.txt > ofc-glb-locations-v3.txt
grep -F -v -f ExcludeList-ofc.txt ofc-deu-locations-v2.txt > StaticDownloadLinks-ofc-deu.txt
grep -F -v -f ExcludeList-ofc.txt ofc-enu-locations-v2.txt > StaticDownloadLinks-ofc-enu.txt


Damit bleiben:

glb: 566 Dateien
enu: 21 Dateien
deu: 21 Dateien

Schließlich wird die Datei ExcludeList-ofc-glb.txt auf die globalen Updates angewendet:

Code: Select all
grep -F -v -f ExcludeList-ofc-glb.txt ofc-glb-locations-v3.txt > StaticDownloadLinks-ofc-glb.txt


Der Endstand ist damit:

glb: 366 Dateien, Gesamtgröße 4,4 GB
enu: 21 Dateien, Gesamtgröße 17,8 MB
deu: 21 Dateien, Gesamtgröße 17,0 MB


Die Dateien StaticDownloadLinks-ofc-*.txt und UpdateTable-ofc-*.csv können nun ausprobiert werden:

  • Unter Windows: Die Dateien StaticDownloadLinks-ofc-*.txt werden in das Verzeichnis wsusoffline/static/custom kopiert.
  • Unter Linux: Die Dateien StaticDownloadLinks-ofc-*.txt werden in das Verzeichnis wsusoffline/static kopiert.
    (Dateien im Unterverzeichnis static/custom werden zurzeit ignoriert, wenn die Originaldateien im übergeordneten Verzeichnis leer sind. Das ist offenbar ein Bug.)
  • Der Download wird gestartet.
  • Nach dem Download werden die Dateien UpdateTable-ofc-*.csv in das Verzeichnis wsusoffline/client/ofc kopiert.


Die verwendeten Dateien sind:

extract-office-revision-and-update-ids.xsl (umbenannt von extract-office-revision-update-ids.xsl)

Code: Select all
<?xml version="1.0"?>
<!--
  Author: H. Buhrmester, 2019
  Filename: extract-office-revision-and-update-ids.xsl

  This file selects Office updates by the ProductFamily Id
  "477b856e-65c4-4473-b621-a8b230bb70d9".

  The distinction of the categories by type - UpdateClassification,
  ProductFamily, Company, Product - is not necessary at this point,
  because all UUIDs should be unique by definition.
  https://en.wikipedia.org/wiki/Universally_unique_identifier

  This xslt file extracts the following fields:
  Field 1: Bundle RevisionId
  Field 2: UpdateId
-->
<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/__:Categories/__:Category[@Id='477b856e-65c4-4473-b621-a8b230bb70d9']">
      <xsl:text>#</xsl:text>
      <xsl:value-of select="../../@RevisionId" />
      <xsl:text>#,</xsl:text>
      <xsl:value-of select="../../@UpdateId" />
      <xsl:text>&#10;</xsl:text>
    </xsl:for-each>
  </xsl:template>
</xsl:stylesheet>


extract-office-locations-v2.bash

Code: Select all
#!/bin/bash

# extract-office-locations-v2.bash
# Sample implementation for the extraction of all Office updates.
set -o errexit
set -o nounset
set -o pipefail
export LC_ALL=C

# Extract File 1, featuring a new xslt file
echo "Extracting office-revision-and-update-ids.txt ..."
xmlstarlet transform \
    extract-office-revision-and-update-ids.xsl \
    package.xml \
| sort --unique \
> office-revision-and-update-ids.txt

# Extract File 2, using xslt file from the calculation of superseded
# updates
echo "Extracting BundledUpdateRevisionAndFileIds.txt ..."
xmlstarlet transform \
    extract-update-revision-and-file-ids.xsl \
    package.xml \
| sort --unique \
> BundledUpdateRevisionAndFileIds.txt

# Extract File 3, using xslt file from the calculation of superseded
# updates
echo "Extracting UpdateCabExeIdsAndLocations.txt ..."
xmlstarlet transform \
    extract-update-cab-exe-ids-and-locations.xsl \
    package.xml \
| sort --unique \
> UpdateCabExeIdsAndLocations.txt

# Join the first two files to get the FileIds. The UpdateId of the
# bundle record is copied, because it is needed later to create the
# files UpdateTable-ofc-*.csv.
#
# Input file 1: office-revision-and-update-ids.txt
# - Field 1: RevisionId of the bundle record
# - Field 2: UpdateId of the bundle record
# Input file 2: BundledUpdateRevisionAndFileIds.txt
# - Field 1: RevisionId of the bundle record
# - Field 2: RevisionId of the update record for a single PayloadFile
# - Field 3: FileId of the PayloadFile
# Output
# - Field 1: FileId of the PayloadFile
# - Field 2: UpdateId of the bundle record
echo "Creating file office-file-and-update-ids.txt ..."
join -t ',' -o 2.3,1.2 \
    office-revision-and-update-ids.txt \
    BundledUpdateRevisionAndFileIds.txt \
| sort --unique \
> office-file-and-update-ids.txt

# Join with third file to get the FileLocations (URLs)
#
# Input file 1: office-file-and-update-ids.txt
# - Field 1: FileId of the PayloadFile
# - Field 2: UpdateId of the bundle record
# Input file 2: UpdateCabExeIdsAndLocations.txt
# - Field 1: FileId of the PayloadFile
# - Field 2: Location (URL)
# Output
# - Field 1: UpdateId of the bundle record
# - Field 2: Location (URL)
echo "Creating file office-update-ids-and-locations.txt ..."
join -t ',' -o 1.2,2.2 \
    office-file-and-update-ids.txt \
    UpdateCabExeIdsAndLocations.txt \
| sort --unique \
> office-update-ids-and-locations.txt

echo "Separate the updates into global and localized versions"
grep -F -- "-de-de_" office-update-ids-and-locations.txt > ofc-deu-ids-and-locations.txt
grep -F -- "-en-us_" office-update-ids-and-locations.txt > ofc-enu-ids-and-locations.txt
grep -F -v -f locales.txt office-update-ids-and-locations.txt > ofc-glb-ids-and-locations.txt

echo "Create the files UpdateTable-ofc-*.csv"
for lang in glb deu enu
do
    while IFS="," read -r updateid url skiprest
    do
        printf '%s\r\n' "${updateid},${url##*/}"
    done < "ofc-${lang}-ids-and-locations.txt" \
         > "UpdateTable-ofc-${lang}.csv"
done

echo "Cut the second column with the locations"
cut -d "," -f "2" ofc-glb-ids-and-locations.txt | sort -u > ofc-glb-locations.txt
cut -d "," -f "2" ofc-deu-ids-and-locations.txt | sort -u > ofc-deu-locations.txt
cut -d "," -f "2" ofc-enu-ids-and-locations.txt | sort -u > ofc-enu-locations.txt

echo "Apply ExcludeList-Linux-superseded.txt"
join -v1 ofc-glb-locations.txt ExcludeList-Linux-superseded.txt > ofc-glb-locations-v2.txt
join -v1 ofc-deu-locations.txt ExcludeList-Linux-superseded.txt > ofc-deu-locations-v2.txt
join -v1 ofc-enu-locations.txt ExcludeList-Linux-superseded.txt > ofc-enu-locations-v2.txt

echo "Apply ExcludeList-ofc.txt"
grep -F -v -f ExcludeList-ofc.txt ofc-glb-locations-v2.txt > ofc-glb-locations-v3.txt
grep -F -v -f ExcludeList-ofc.txt ofc-deu-locations-v2.txt > StaticDownloadLinks-ofc-deu.txt
grep -F -v -f ExcludeList-ofc.txt ofc-enu-locations-v2.txt > StaticDownloadLinks-ofc-enu.txt

echo "Apply ExcludeList-ofc-glb.txt"
grep -F -v -f ExcludeList-ofc-glb.txt ofc-glb-locations-v3.txt > StaticDownloadLinks-ofc-glb.txt

echo "All done
To try out the created files,
- copy StaticDownloadLinks-ofc-*.txt to wsusoffline/static
- run the download script
- copy UpdateTable-ofc-*.csv to wsusoffline/client/ofc, replacing the
  existing files"
exit 0


extract-office-locations-v2.cmd
Dieses Skript verwendet nun cut.exe aus den UnxUtils, zusätzlich zu gsort.exe und join.exe.

Code: Select all
@echo off
REM Example script to extract all Office updates
REM H. Buhrmester, 2019
REM
REM Requirements
REM - Create the new files extract-office-revision-and-update-ids.xsl and
REM   locales.txt as explained in the Forum
REM - XSLT.vbs and ExtractIdsAndFileNames.vbs are in wsusoffline\cmd
REM - gsort.exe and join.exe are in wsusoffline\bin
REM - extract-update-revision-and-file-ids.xsl and
REM   extract-update-cab-exe-ids-and-locations.xsl are in wsusoffline\xslt
REM - The three ExcludeLists are in wsusoffline\exclude
REM - package.xml must be extracted from wsusscn2.cab
REM
REM Put everything into one directory to run this script
set CSCRIPT_PATH=%SystemRoot%\System32\cscript.exe

echo Extracting office-revision-and-update-ids.txt ...
%CSCRIPT_PATH% //Nologo //E:vbs XSLT.vbs package.xml extract-office-revision-and-update-ids.xsl office-revision-and-update-ids-unsorted.txt
gsort.exe -u -T "%TEMP%" office-revision-and-update-ids-unsorted.txt > office-revision-and-update-ids.txt

echo Extracting BundledUpdateRevisionAndFileIds.txt ...
%CSCRIPT_PATH% //Nologo //E:vbs XSLT.vbs package.xml extract-update-revision-and-file-ids.xsl BundledUpdateRevisionAndFileIds-unsorted.txt
gsort.exe -u -T "%TEMP%" BundledUpdateRevisionAndFileIds-unsorted.txt > BundledUpdateRevisionAndFileIds.txt

echo Extracting UpdateCabExeIdsAndLocations.txt ...
%CSCRIPT_PATH% //Nologo //E:vbs XSLT.vbs package.xml extract-update-cab-exe-ids-and-locations.xsl UpdateCabExeIdsAndLocations-unsorted.txt
gsort.exe -u -T "%TEMP%" UpdateCabExeIdsAndLocations-unsorted.txt > UpdateCabExeIdsAndLocations.txt

echo Creating file office-file-and-update-ids.txt ...
join.exe -t "," -o "2.3,1.2" office-revision-and-update-ids.txt BundledUpdateRevisionAndFileIds.txt > office-file-and-update-ids-unsorted.txt
gsort.exe -u -T "%TEMP%" office-file-and-update-ids-unsorted.txt > office-file-and-update-ids.txt

echo Creating File office-update-ids-and-locations.txt ...
join.exe -t "," -o "1.2,2.2" office-file-and-update-ids.txt UpdateCabExeIdsAndLocations.txt > office-update-ids-and-locations-unsorted.txt
gsort.exe -u -T "%TEMP%" office-update-ids-and-locations-unsorted.txt > office-update-ids-and-locations.txt

echo Separate the updates into global and localized versions
%SystemRoot%\System32\findstr.exe /L /I /C:"-de-de_" office-update-ids-and-locations.txt > ofc-deu-ids-and-locations.txt
%SystemRoot%\System32\findstr.exe /L /I /C:"-en-us_" office-update-ids-and-locations.txt > ofc-enu-ids-and-locations.txt
%SystemRoot%\System32\findstr.exe /L /I /V /G:"locales.txt" office-update-ids-and-locations.txt > ofc-glb-ids-and-locations.txt

echo Create the files UpdateTable-ofc-lang.csv
%CSCRIPT_PATH% //Nologo //E:vbs ExtractIdsAndFileNames.vbs ofc-deu-ids-and-locations.txt UpdateTable-ofc-deu.csv
%CSCRIPT_PATH% //Nologo //E:vbs ExtractIdsAndFileNames.vbs ofc-enu-ids-and-locations.txt UpdateTable-ofc-enu.csv
%CSCRIPT_PATH% //Nologo //E:vbs ExtractIdsAndFileNames.vbs ofc-glb-ids-and-locations.txt UpdateTable-ofc-glb.csv

echo Cut the second column with the locations
cut.exe -d "," -f "2" ofc-deu-ids-and-locations.txt > ofc-deu-locations-unsorted.txt
cut.exe -d "," -f "2" ofc-enu-ids-and-locations.txt > ofc-enu-locations-unsorted.txt
cut.exe -d "," -f "2" ofc-glb-ids-and-locations.txt > ofc-glb-locations-unsorted.txt

echo Sorting locations
gsort.exe -u -T "%TEMP%" ofc-deu-locations-unsorted.txt > ofc-deu-locations.txt
gsort.exe -u -T "%TEMP%" ofc-enu-locations-unsorted.txt > ofc-enu-locations.txt
gsort.exe -u -T "%TEMP%" ofc-glb-locations-unsorted.txt > ofc-glb-locations.txt

echo Apply ExcludeList-superseded.txt
join.exe -v1 ofc-deu-locations.txt ExcludeList-superseded.txt > ofc-deu-locations-v2.txt
join.exe -v1 ofc-enu-locations.txt ExcludeList-superseded.txt > ofc-enu-locations-v2.txt
join.exe -v1 ofc-glb-locations.txt ExcludeList-superseded.txt > ofc-glb-locations-v2.txt

echo Apply ExcludeList-ofc.txt
%SystemRoot%\System32\findstr.exe /L /I /V /G:"ExcludeList-ofc.txt" ofc-deu-locations-v2.txt > StaticDownloadLinks-ofc-deu.txt
%SystemRoot%\System32\findstr.exe /L /I /V /G:"ExcludeList-ofc.txt" ofc-enu-locations-v2.txt > StaticDownloadLinks-ofc-enu.txt
%SystemRoot%\System32\findstr.exe /L /I /V /G:"ExcludeList-ofc.txt" ofc-glb-locations-v2.txt > ofc-glb-locations-v3.txt

echo Apply ExcludeList-ofc-glb.txt
%SystemRoot%\System32\findstr.exe /L /I /V /G:"ExcludeList-ofc-glb.txt" ofc-glb-locations-v3.txt > StaticDownloadLinks-ofc-glb.txt

echo All done
echo To try out the created files,
echo - copy StaticDownloadLinks-ofc-*.txt to wsusoffline/static/custom
echo - run the download script
echo - copy UpdateTable-ofc-*.csv to wsusoffline/client/ofc, replacing
echo   the existing files

Re: ofc wird mit hunderten Updates zugemüllt

PostPosted: 15.12.2019, 02:02
by PaulNM
Is it possible this change (or other changes) in the wsusscn2.cab format is also affecting the Win 10 downloads? I ask because this month's downloads resulted in w100 and w100-x64 folders twice the size of last month's. That's an extra 14 GB of space!

Re: ofc wird mit hunderten Updates zugemüllt

PostPosted: 15.12.2019, 11:26
by hbuhrmester
The current approach for the determination of dynamic Office downloads is somewhat convoluted, and it requires, that the file package.xml is sorted in the "right" way.

The determination of Windows 10 downloads is pretty straightforward: There are two XSLT transformation files ExtractDownloadLinks-w100-x86-glb.xsl and ExtractDownloadLinks-w100-x64-glb.xsl, which simply say, that the filename must start with 'windows10.0'.

So, there are no problems expected here.

I guess, the problem is, that there are always several versions of Windows 10 to be supported, and this causes the downloads to continuously grow.

Re: ofc wird mit hunderten Updates zugemüllt

PostPosted: 16.12.2019, 22:55
by Cababs
Has a fix been released for this?
I ask because I downloaded office 2007 updates with ver 11.0.3 and it ended up downloading 812 MB. this seems to be low so I am going to add the updates I am missing to the custom lists.

To test this, I am downloading the office 2007 using ver 9.2.6 ear and I am seeing that it's downloading 737 updates to the ofc folder.

Both are using catalog file dated 10-12-2019

I was under the impression that both versions were affected

Tldr:
Ver 9.2.6 esr downloads 700+ files
Ver 11.0.3 downloads 53 files (812MB)

Re: ofc wird mit hunderten Updates zugemüllt

PostPosted: 31.12.2019, 10:22
by Rush


schade, und ich dachte wie kommen im jahr 2019 noch über die trunk revision 1099 :D

ist das sript oder der vorschlag von hbuhrmester für alle anwendbar ?

Re: ofc wird mit hunderten Updates zugemüllt

PostPosted: 20.01.2020, 17:37
by hbuhrmester
Patch für DownloadUpdates.cmd 11.8.3

Ich habe die neue Methode zum Berechnen der dynamischen Office-Updates nun in das Skript DownloadUpdates.cmd 11.8.3 eingebaut.

Da der Patch aus mehreren Dateien besteht, habe ich alle neuen oder geänderten Dateien in ein Zip-Archiv gepackt. Es enthält drei Verzeichnisse und fünf Dateien:

Code: Select all
wsusoffline1183-patch1
├── bin
│   ├── cut.exe
│   └── DownloadLink-UnxUtils.txt
├── cmd
│   ├── DownloadUpdates.cmd
│   └── locales.txt
└── xslt
    └── extract-office-revision-and-update-ids.xsl


Wie man (hoffentlich) erkennen kann, gehören die beiden Dateien cut.exe und DownloadLink-UnxUtils.txt in das Verzeichnis wsusoffline/bin. Das Skript DownloadUpdates.cmd und die Datei locales.txt gehören in das Verzeichnis wsusoffline/cmd. Die neue XSLT-Datei gehört in das Verzeichnis wsusoffline/xslt.

Download-Links für das Archiv, eine Hashdeep-Datei und die Ergebnisse eines Virusscans auf VirusTotal sind:

http://downloads.hartmut-buhrmester.de/wsusoffline1183-patch1.zip
http://downloads.hartmut-buhrmester.de/wsusoffline1183-patch1_hashes.txt
http://downloads.hartmut-buhrmester.de/wsusoffline1183-patch1_virusreport.pdf


Hashe für das Archiv sind:

Code: Select all
MD5    b784c3b07d918846a9dabc4416474757
SHA-1  c133f4013f7e5028c98dd46018571993220b362211f675b6a2ddf3aff6c376f7


Die Ergebnisse auf VirusTotal können auch über die URL aufgerufen werden:
https://www.virustotal.com/gui/file/c133f4013f7e5028c98dd46018571993220b362211f675b6a2ddf3aff6c376f7/detection


TODOs

  • Temporäre Dateien

    Die Berechnung der Office-Updates kann beschleunigt werden, indem bestimmte temporäre Dateien mehrfach verwendet werden:

    • Die Datei package.xml muss nicht jedesmal neu extrahiert werden.
    • Die Dateien BundledUpdateRevisionAndFileIds.txt und UpdateCabExeIdsAndLocations.txt werden für die Bestimmung der superseded Updates verwendet, aber auch für die der dynamischen Office-Updates.
    • Die Datei office-update-ids-and-locations.txt enthält alle Office-Update-Ids und die URLs. Man kann daraus die globalen und die lokalisierten Updates extrahieren.

    Die Linux-Download-Skripte werden erheblich beschleunigt, wenn man diese Dateien, sofern vorhanden, einfach wieder verwendet.

    Mit dem Windows-Skript DownloadUpdates.cmd hat das noch nicht geklappt, da das Skript wiederholt neu gestartet wird und alle temporären Dateien dabei gelöscht werden.

  • Sysinternals Utilities

    Das Entpacken der Sysinternals-Utilities ist zu kompliziert. Mit der Option -u kann unzip vorhandene Dateien updaten, wenn die Quelldateien neuer sind als die Zieldateien. Neue Dateien, die noch nicht vorhanden sind, werden ebenfalls extrahiert.

    Wenn keine Backup-Dateien benötigt werden, reichen wahrscheinlich drei Befehle:

    Code: Select all
    unzip.exe -u -o AutoLogon.zip -x Eula.txt -d ..\client\bin
    unzip.exe -u -o Sigcheck.zip -x Eula.txt
    unzip.exe -u -o Streams.zip -x Eula.txt


    Die Ausgabe im Terminal, wenn noch keine Dateien vorhanden sind, ist:

    Code: Select all
    >unzip -u -o AutoLogon.zip -x Eula.txt -d ..\client\bin
    Archive:  AutoLogon.zip
      inflating: ../client/bin/Autologon.exe

    >unzip -u -o Sigcheck.zip -x Eula.txt
    Archive:  Sigcheck.zip
      inflating: sigcheck.exe
      inflating: sigcheck64.exe

    >unzip -u -o Streams.zip -x Eula.txt
    Archive:  Streams.zip
      inflating: streams.exe
      inflating: streams64.exe


    Die Reihenfolge der Optionen scheint wichtig zu sein. Die Option "-x Eula.txt" sollte nach dem Namen des Archivs stehen. Mit unzip -h bekommt man eine Übersicht:

    Code: Select all
    UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send
    bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

    Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
      Default action is to extract files in list, except those in xlist, to exdir;
      file[.zip] may be a wildcard.  -Z => ZipInfo mode ("unzip -Z" for usage).

      -p  extract files to pipe, no messages     -l  list files (short format)
      -f  freshen existing files, create none    -t  test compressed archive data
      -u  update files, create if necessary      -z  display archive comment only
      -v  list verbosely/show version info       -T  timestamp archive to latest
      -x  exclude files that follow (in xlist)   -d  extract files into exdir
    modifiers:
      -n  never overwrite existing files         -q  quiet mode (-qq => quieter)
      -o  overwrite files WITHOUT prompting      -a  auto-convert any text files
      -j  junk paths (do not make directories)   -aa treat ALL files as text
      -C  match filenames case-insensitively     -L  make (some) names lowercase
      -$  label removables (-$$ => fixed disks)  -V  retain VMS version numbers
      -X  restore ACLs (-XX => use privileges)   -s  spaces in filenames => '_'
                                                 -M  pipe through "more" pager
    See "unzip -hh" or unzip.txt for more help.  Examples:
      unzip data1 -x joe   => extract all files except joe from zipfile data1.zip
      unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer


  • Bug in der Funktion :Log

    Bei meinen Tests konnte eine alte Version von Sigcheck für Windows XP mehrere Dateien nicht verifizieren. Die Dateien wurden gelöscht und eine entsprechende Warnung im Terminal ausgegeben. Die Warnung wurde aber nicht wie erwartet in die Logdatei geschrieben:

    Code: Select all
    Cleaning up client directory for o2k10 enu...
    Removing NTFS alternate data streams for o2k10 enu...
    Verifying digital file signatures for o2k10 enu...
    Warning: Deleted unsigned file "C:\Dokumente und Einstellungen\Anwender\Eigene Dateien\wsusoffline1183\client\o2k10\enu\officesp2010-kb2687455-fullfile-x86-en-us.exe".
    19.01.2020 10:22:57,74 - Warning: Deleted unsigned file "C:\Dokumente>>..\log\download.log
    Creating integrity database for o2k10 enu...

    Cleaning up client directory for o2k10 deu...
    Removing NTFS alternate data streams for o2k10 deu...
    Verifying digital file signatures for o2k10 deu...
    Warning: Deleted unsigned file "C:\Dokumente und Einstellungen\Anwender\Eigene Dateien\wsusoffline1183\client\o2k10\deu\officesp2010-kb2687455-fullfile-x86-de-de.exe".
    19.01.2020 10:56:19,06 - Warning: Deleted unsigned file "C:\Dokumente>>..\log\download.log
    Creating integrity database for o2k10 deu...


    Das Problem ist eine doppelte Kommentierung: Sigcheck schließt den Pfadnamen bereits in doppelte Anführungszeichen ein. Wenn man die gesamte Warnung noch einmal in Anführungszeichen einschließt, wird der Pfad nach "C:\Dokumente abgeschnitten.

Re: ofc wird mit hunderten Updates zugemüllt

PostPosted: 20.01.2020, 18:34
by boco
Windows 10 ist auch kaputt und der Ordner wird jeden Monat größer. :(