trouble downloading updates on MAC OSX

trouble downloading updates on MAC OSX

Postby ovizii » 14.07.2014, 13:12

I've installed missing/necessary dependencies via macports and edited this script and replaced readlink with greadlink.

Here is what currently happens when I try to download updates:

Code: Select all
sh-3.2# ./DownloadUpdates.sh

#########################################################################
###         WSUS Offline Update Downloader for Linux systems          ###
###                              v. 9.3.1                             ###
###                                                                   ###
###   http://www.wsusoffline.net/                                     ###
###   Authors: Tobias Breitling, Stefan Joehnke, Walter Schiessberg   ###
###   maintained by H. Hullen                                         ###
#########################################################################
usage: dirname path

head: ./DownloadUpdates.sh: No such file or directory
Please select your OS:
[1] Windows Server 2003      [2] Windows Server 2003          64 bit
[3] Windows Vista / Server 2008   [4] Windows Vista / Server 2008     64 bit
[5] Windows 7         [6] Windows 7     / Server 2008 R2  64 bit
[7] Windows 8         [8] Windows 8    / Server 2012     64 bit
[9] Windows 8.1      [10] Windows 8.1          64 bit

[11] All 32 bit         [12] All 64 bit

[13] Office 2007 [14] Office 2010   [15] Office 2013
[16] All Office updates (2007 - 2013)

which number?
.
.
.
Download Service Packs? [y/n] y
Download .Net framework? [y/n] y
Download Microsoft Security Essentials files? [y/n] y
Download Microsoft Windows Defender definition files? [y/n] y
Please specify your proxy (default: none, http://[username:password@]<server>:<port>])
Create ISO-Image after download? [y/n] n

head: ./DownloadUpdates.sh: No such file or directory
  Your choice
  System: w61-x64
  Language: enu
  Parameter:  /dotnet   /msse /wddefs
  Proxy: none

Do you want to download now? [y/n]


Here is the rest, not sure why it al fails. Permissions maybe?

Code: Select all
Thank you - now I start working!
Downloading most recent Windows Update Agent and catalog file...
wget -nv -N --timeout=120 -i ../static/StaticDownloadLinks-wsus.txt -P ../client/wsus
Determining static URLs for w61-x64 enu...
cp: ../static/StaticDownloadLinks-dotnet.txt: No such file or directory
Extracting Windows update catalogue file package.xml...
cp: ../client/wsus/wsusscn2.cab: No such file or directory
package.cab: No such file or directory
rm: package.cab: No such file or directory
./DownloadUpdates.sh: line 551: cd: ../sh: No such file or directory
Determining superseded updates (please be patient, this will take a while)...
failed to load external entity "../xslt/ExtractUpdateRevisionIds.xsl"
warning: failed to load external entity "../xslt/ExtractUpdateRevisionIds.xsl"
cannot parse ../xslt/ExtractUpdateRevisionIds.xsl
failed to load external entity "../xslt/ExtractSupersedingRevisionIds.xsl"
warning: failed to load external entity "../xslt/ExtractSupersedingRevisionIds.xsl"
cannot parse ../xslt/ExtractSupersedingRevisionIds.xsl
failed to load external entity "../xslt/ExtractSupersededUpdateRelations.xsl"
warning: failed to load external entity "../xslt/ExtractSupersededUpdateRelations.xsl"
cannot parse ../xslt/ExtractSupersededUpdateRelations.xsl
failed to load external entity "../xslt/ExtractBundledUpdateRelationsAndFileIds.xsl"
warning: failed to load external entity "../xslt/ExtractBundledUpdateRelationsAndFileIds.xsl"
cannot parse ../xslt/ExtractBundledUpdateRelationsAndFileIds.xsl
grep: ../temp/ValidSupersededRevisionIds.txt: No such file or directory
sort: open failed: ../temp/SupersededFileIds.txt: No such file or directory
failed to load external entity "../xslt/ExtractUpdateCabExeIdsAndLocations.xsl"
warning: failed to load external entity "../xslt/ExtractUpdateCabExeIdsAndLocations.xsl"
cannot parse ../xslt/ExtractUpdateCabExeIdsAndLocations.xsl
Done.
Determining update URLs for w61-x64 enu...
failed to load external entity "../xslt/ExtractDownloadLinks-dotnet-x64-glb.xsl"
warning: failed to load external entity "../xslt/ExtractDownloadLinks-dotnet-x64-glb.xsl"
cannot parse ../xslt/ExtractDownloadLinks-dotnet-x64-glb.xsl
Determining update URLs for win enu...
failed to load external entity "../xslt/ExtractDownloadLinks-win-x86-enu.xsl"
warning: failed to load external entity "../xslt/ExtractDownloadLinks-win-x86-enu.xsl"
cannot parse ../xslt/ExtractDownloadLinks-win-x86-enu.xsl
cat: ../exclude/ExcludeList-win-x86.txt: No such file or directory

***************************************
Found 0 patches...


head: ./DownloadUpdates.sh: No such file or directory
Downloading patches for w61-x64...
Downloading static patches...
wget -nv -N --timeout=120 -i ../temp/StaticUrls-w61-x64-enu.txt -P ../client/w61-x64/enu
wget -nv -N --timeout=120 -i ../temp/StaticUrls-enu.txt -P ../client/win/enu
wget -nv -N --timeout=120 -i ../temp/StaticUrls-glb.txt -P ../client/win/glb
wget -nv -N --timeout=120 -i ../temp/StaticUrls-w61-x64-glb.txt -P ../client/w61-x64/glb
Downloading .Net framework...
wget -nv -N --timeout=120 -i ../temp/StaticUrls-dotnet.txt -P ../client/dotnet
wget -nv -N --timeout=120 -i ../temp/ValidUrls-dotnet-x64.txt -P ../client/dotnet/x64-glb
Creating integrity database for .Net ...
rm: ../dotnet/*.exe: No such file or directory
../dotnet/*.exe: No such file or directory
Creating integrity database for .Net-x64-glb ...
Downloading CPP files...
Creating integrity database for CPP ...
Downloading MSSE files...
Creating integrity database for MSSE ...
Downloading Windows Defender definition files...
Creating integrity database for Windows Defender definition ...
Downloading patches for w61-x64 enu
wget -nv -N --timeout=120 -i ../temp/ValidUrls-w61-x64-enu.txt -P ../client/w61-x64/enu
wget -nv -N --timeout=120 -i ../temp/ValidUrls-win-x64-enu.txt -P ../client/win/enu
wget -nv -N --timeout=120 -i ../temp/ValidUrls-w61-x64-glb.txt -P ../client/w61-x64/glb

head: ./DownloadUpdates.sh: No such file or directory
Validating patches for w61-x64...
Validating static patches...
wget -nv -N --timeout=120 -i ../temp/StaticUrls-w61-x64-enu.txt -P ../client/w61-x64/enu
wget -nv -N --timeout=120 -i ../temp/StaticUrls-enu.txt -P ../client/win/enu
wget -nv -N --timeout=120 -i ../temp/StaticUrls-w61-x64-glb.txt -P ../client/w61-x64/glb
wget -nv -N --timeout=120 -i ../temp/StaticUrls-glb.txt -P ../client/win/glb
Validating patches for w61-x64 enu...
wget -nv -N --timeout=120 -i ../temp/ValidUrls-w61-x64-enu.txt -P ../client/w61-x64/enu
Creating integrity database for w61-x64-enu ...
wget -nv -N --timeout=120 -i ../temp/ValidUrls-w61-x64-glb.txt -P ../client/w61-x64/glb
Creating integrity database for w61-x64-glb ...
wget -nv -N --timeout=120 -i ../temp/ValidUrls-win-x64-enu.txt -P ../client/win/enu
Creating integrity database for win-glb ...
Creating integrity database for WSUS ...
**************************************
0 patches successfully downloaded.

Cleaning up ...
Cleaning up client directory for w61-x64 enu
Cleaning up client directory for w61-x64 glb
Writing builddate.txt file...
ovizii
 
Posts: 4
Joined: 14.07.2014, 13:03

Re: trouble downloading updates on MAC OSX

Postby hhullen » 27.07.2014, 14:32

ovizii wrote:I've installed missing/necessary dependencies via macports and edited this script and replaced readlink with greadlink.

Here is what currently happens when I try to download updates:

Code: Select all
sh-3.2# ./DownloadUpdates.sh

#########################################################################
###         WSUS Offline Update Downloader for Linux systems          ###
###                              v. 9.3.1                             ###
###                                                                   ###
###   http://www.wsusoffline.net/                                     ###
###   Authors: Tobias Breitling, Stefan Joehnke, Walter Schiessberg   ###
###   maintained by H. Hullen                                         ###
#########################################################################
usage: dirname path

head: ./DownloadUpdates.sh: No such file or directory

[...]

head: ./DownloadUpdates.sh: No such file or directory

[...]



Strange ...

You can set the "debug" switch to "1" - then you get lots of messages which may show the reason for this error message.
Viele Grüsse
Helmut
hhullen
 
Posts: 100
Joined: 23.04.2012, 11:43

Re: trouble downloading updates on MAC OSX

Postby ovizii » 27.07.2014, 18:58

Couldn't find anything but moved the complete folder from my USB stick onto my HD, changed ownership, formatted stick gave it a name without any special characters (it previously contained spaces) and tried again. still not enabled debugging but now getting more errors (just an excerpt, the others are very similar):

`touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
sed: 1: "../static/StaticDownloa ...": invalid command code .
touch: illegal option -- d
usage:
touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
sed: 1: "../static/StaticDownloa ...": invalid command code .
touch: illegal option -- d
usage:`
ovizii
 
Posts: 4
Joined: 14.07.2014, 13:03

Re: trouble downloading updates on MAC OSX

Postby ovizii » 27.07.2014, 19:11

It seems touch on OSX doesn't have the -d switch it has on Linux...
Any hints apreciated.
ovizii
 
Posts: 4
Joined: 14.07.2014, 13:03

Re: trouble downloading updates on MAC OSX

Postby hhullen » 05.08.2014, 13:34

ovizii wrote:Couldn't find anything but moved the complete folder from my USB stick onto my HD, changed ownership, formatted stick gave it a name without any special characters (it previously contained spaces) and tried again. still not enabled debugging but now getting more errors (just an excerpt, the others are very similar):

`touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
sed: 1: "../static/StaticDownloa ...": invalid command code .
touch: illegal option -- d
usage:
touch [-A [-][[hh]mm]SS] [-acfhm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...
stat: illegal option -- c
usage: stat [-FlLnqrsx] [-f format] [-t timefmt] [file ...]
sed: 1: "../static/StaticDownloa ...": invalid command code .
touch: illegal option -- d
usage:`


The Linux version of "wsusoffline" uses "stat" and "touch" from the GNU coreutils and "GNU sed". Maybe the OSX versions don't allow all options of the GNU version.
Viele Grüsse
Helmut
hhullen
 
Posts: 100
Joined: 23.04.2012, 11:43

Re: trouble downloading updates on MAC OSX

Postby ovizii » 05.08.2014, 14:09

You're right and I think the options used by those commands are simply slightly different.

touch
on Debian:
-d, --date=STRING
parse STRING and use it instead of current time

on MAC OSX:
By default, touch changes both modification and access times. The -a and -m
flags may be used to select the access time or the modification time indi-
vidually. Selecting both is equivalent to the default. By default, the
timestamps are set to the current time. The -t flag explicitly specifies a
different time, and the -r flag specifies to set the times those of the
specified file. The -A flag adjusts the values by a specified amount.

So this is just a matter of detecting if we'Re on OSX or Linux and switch to the correct usage of those commands but I'm not that familiar with scripting so I can't help fix this, maybe if someone with access to both Linux and MAC OSX could give this a try?

Same for stat:
Linux:
-c --format=FORMAT

MAX OSX:
-f format
Display information using the specified format. See the FORMATS
section for a description of valid formats.
ovizii
 
Posts: 4
Joined: 14.07.2014, 13:03

Re: trouble downloading updates on MAC OSX

Postby hhullen » 05.08.2014, 14:25

ovizii wrote:You're right and I think the options used by those commands are simply slightly different.

[...]

So this is just a matter of detecting if we're on OSX or Linux and switch to the correct usage of those commands but I'm not that familiar with scripting so I can't help fix this, maybe if someone with access to both Linux and MAC OSX could give this a try?


Just for testing the operating system: what tells (under OSX)

uname -s

uname -o
Viele Grüsse
Helmut
hhullen
 
Posts: 100
Joined: 23.04.2012, 11:43

Re: trouble downloading updates on MAC OSX

Postby hhullen » 05.08.2014, 17:47

ovizii wrote:You're right and I think the options used by those commands are simply slightly different.

touch
on Debian:
-d, --date=STRING
parse STRING and use it instead of current time
on MAC OSX:

[...]

Same for stat:
Linux:
-c --format=FORMAT

MAX OSX:
-f format
Display information using the specified format. See the FORMATS
section for a description of valid formats.


And these 2 commands are used in "# convert files to Linux format" which is necessary to avoid downloading files which already exist on your machine.

The routine first checks for MSDOS style files (with CRLF), then deletes the MSDOS CR and finally restores the file time stamp.

Under Linux, it works as expected with "stat" and "touch"; you have to change this routine for Darwin.

Maybe there are still some other places where GNU/Linux works in another way than Darwin (or *BSD).

I've just added some lines into "DownloadUpdate.sh" and "CreateIsoImage.sh" which look for the operating system and then (for the first try) uses different options in the (only) "readlink" call.
You've seen the error message related to "readlink" - it should have changed with these additional lines.

Just wait some hours (or days) for the updated scripts.
Viele Grüsse
Helmut
hhullen
 
Posts: 100
Joined: 23.04.2012, 11:43

Re: trouble downloading updates on MAC OSX

Postby hhullen » 06.08.2014, 15:23

ovizii wrote:You're right and I think the options used by those commands are simply slightly different.

[...]

So this is just a matter of detecting if we'Re on OSX or Linux and switch to the correct usage of those commands but I'm not that familiar with scripting so I can't help fix this, maybe if someone with access to both Linux and MAC OSX could give this a try?


Can you please try

http://trac.wsusoffline.net/browser/tru ... Updates.sh

Maybe OSX still mourns at some other places, but especially testing the filelist should now work without error messages.
Viele Grüsse
Helmut
hhullen
 
Posts: 100
Joined: 23.04.2012, 11:43


Return to Linux

Who is online

Users browsing this forum: No registered users and 5 guests