bugzilla-daemon | 1 Nov 2007 10:43
Favicon

[Bug 75] File version check does not work properly

http://bugzilla.wpkg.org/show_bug.cgi?id=75

--- Comment #5 from Frank Lee <rl201 <at> cam.ac.uk>  2007-11-01 10:43:48 ---
Created an attachment (id=44)
 --> (http://bugzilla.wpkg.org/attachment.cgi?id=44)
Proposed patch to fix version-checking problems

Patch to correct bad behaviour: if the file does not exist, the version check
will return false, regardless of what sort of test it is. (This was the
intended behaviour: I thought GetFileVersion(file) failed if "file" doesn't
exist. It actually returns "" without error.)

--

-- 
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Matt Miller | 1 Nov 2007 18:05
Favicon

samba and wpkg logging


This might be the wrong place to ask. Please forgive me and ignore this
if it is...

In relation to my recent post, I'm trying to get WPKG to log at least
some information to our WPKG server. I have WPKG running via a windows
startup script as there isn't a stable WPKG service yet (It's still at
RC 2, correct?).

So here's how I'm running it
cscript \\%server%\wpkg.js /synchronize /nonotify >>
\\%server%\logs\%computername%.log

permissions on /%server%/logs are as follows
drwxrwsr-x  2 system  wpkg   128 Nov  1 12:48 logs

share from smb.conf
[wpkg]
        comment = wpkg
        path = /var/local/wpkg
        browsable = yes
        read only = no
        guest ok = yes
        write list = system,  <at> wpkg, " <at> Domain Admins"
        create mask = 764

I did create a linux and samba account for user "system"

When I use smbclient to log into the share as system, I can move files
to the share...
(Continue reading)

bugzilla-daemon | 1 Nov 2007 18:10
Favicon

[Bug 75] File version check does not work properly

http://bugzilla.wpkg.org/show_bug.cgi?id=75

--- Comment #6 from Tomasz Chmielewski <mangoo <at> wpkg.org>  2007-11-01 18:10:11 ---
Oh, that's an interesting bug indeed, and I couldn't reproduce it for a very
long time.

I have Windows 2000 and XP, both with Windows Script Host 5.6 installed.

So, with this XML file and C:\wpkg\puttys.exe which is not there:

<packages>
    <package
        id="test"
        name="test version"
        revision="3"
        reboot="false"
        priority="100"
        notify="false">
        <check type="file" condition="versiongreaterorequal"
        path="C:\wpkg\puttys.exe" value="0.60.0.0" />
        <install cmd="notepad" />
        <upgrade cmd="notepad" />
    </package>
</packages>

###############################################################

Windows 2000 produces a result we should expect:

checking existence of package:test version
(Continue reading)

Tomasz Chmielewski | 1 Nov 2007 18:39
Favicon

Re: samba and wpkg logging

Matt Miller schrieb:

(...)

> I did create a linux and samba account for user "system"

Oh, it won't work like that.
Windows "SYSTEM" user, when it connects to external shares, uses a guest 
account. You can verify it in Samba logs (with log level = 3).

> Windows startup scripts run as system, correct?

Correct.

> That would mean WPKG is running as system, too... Correct?

Correct.

> What's going on here? Why can't WPKG create the file?

Because the SYSTEM user connects as guest.

Really, it's best to use WPKG Client, although it's labelled RC2 for 
pretty long time, it's pretty stable. The only bug I know is that it 
won't reboot if the service runs as a non-SYSTEM user.

Alternatively, you can use a Task Scheduler. Or "net use" in your script.

--

-- 
Tomasz Chmielewski
(Continue reading)

bugzilla-daemon | 1 Nov 2007 18:56
Favicon

[Bug 75] File version check does not work properly

http://bugzilla.wpkg.org/show_bug.cgi?id=75

--- Comment #7 from Tomasz Chmielewski <mangoo <at> wpkg.org>  2007-11-01 18:56:05 ---
Frank - GetFileVersion(file) for a non-existing file doesn't return "" (at
least here on my XP).

--

-- 
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
bugzilla-daemon | 1 Nov 2007 19:11
Favicon

[Bug 75] File version check does not work properly

http://bugzilla.wpkg.org/show_bug.cgi?id=75

--- Comment #8 from Tomasz Chmielewski <mangoo <at> wpkg.org>  2007-11-01 19:11:05 ---
Oh, in fact it does return "" ;) - but this:

if ((CheckValFromFileSystem != "UNKNOWN") || (CheckValFromFileSystem != ""))

doesn't make sense - you can't use "not equal OR not equal".

--

-- 
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
bugzilla-daemon | 1 Nov 2007 19:24
Favicon

[Bug 75] File version check does not work properly

http://bugzilla.wpkg.org/show_bug.cgi?id=75

--- Comment #9 from Tomasz Chmielewski <mangoo <at> wpkg.org>  2007-11-01 19:24:14 ---
What about:

--- wpkg.js.old 2007-10-17 21:10:51.000000000 +0200
+++ wpkg.js     2007-11-01 19:12:49.000000000 +0100
 <at>  <at>  -1188,6 +1188,7  <at>  <at> 

             CheckValFromFileSystem = GetFileVersion(checkPath);
             CheckValFromWpkg       = checkValue;
+            if (CheckValFromFileSystem == "" ) { CheckValFromFileSystem =
"UNKNOWN" }
             if (CheckValFromFileSystem != "UNKNOWN") {
                 var versionresult = VersionCompare(CheckValFromFileSystem,
                                                    CheckValFromWpkg);

or, first check:

... CheckValFromFileSystem == "" || CheckValFromFileSystem == "UNKNOWN" ...
return (false);

else

all pretty code
{ which does 
version checking }

?
Which is more sexy?
(Continue reading)

bugzilla-daemon | 2 Nov 2007 10:18
Favicon

[Bug 75] File version check does not work properly

http://bugzilla.wpkg.org/show_bug.cgi?id=75

Frank Lee <rl201 <at> cam.ac.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rl201 <at> cam.ac.uk

--- Comment #10 from Frank Lee <rl201 <at> cam.ac.uk>  2007-11-02 10:18:07 ---
(In reply to comment #9)

> or, first check:
> 
> 
> ... CheckValFromFileSystem == "" || CheckValFromFileSystem == "UNKNOWN" ...
> return (false);
> 
> else
> 
> all pretty code
> { which does 
> version checking }

This second one is better IMHO. Sorry about the lack of logic the first time
around!

F

--

-- 
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
(Continue reading)

Jean-Jacques Moulis | 2 Nov 2007 12:47
Picon
Picon
Picon
Favicon

Re: samba and wpkg logging

On Thu, 01 Nov 2007 13:05:11 -0400 Matt Miller <mmiller <at> solutionsforprogress.com> wrote:

MM> This might be the wrong place to ask. Please forgive me and ignore this
MM> if it is...

MM> In relation to my recent post, I'm trying to get WPKG to log at least
MM> some information to our WPKG server. I have WPKG running via a windows
MM> startup script as there isn't a stable WPKG service yet (It's still at
MM> RC 2, correct?).

MM> So here's how I'm running it
MM> cscript \\%server%\wpkg.js /synchronize /nonotify >>
MM> \\%server%\logs\%computername%.log

You could use e-mail to get your logs.

%SystemRoot%\system32\cscript.exe %WpkgRoot%\wpkg.js /synchronize /nonotify >> %TEMP%\startup.log

%WpkgRoot%\Tools\blat.exe %TEMP%\startup.log  -to wpkg <at> mysite.se -f %computername% <at> mysite.se -s
WinStartup -server smtp.mysite.se > NUL
 <at> if not errorlevel 1 del %TEMP%\startup.log

Blat is free software http://www.blat.net

--

-- 
Jean-Jacques   Moulis                              Tel:  (013) 281684
ISY                                                Fax:  (013) 139282
Linköping University                            E-mail: jj <at> isy.liu.se
581 83 Linköping

(Continue reading)

bugzilla-daemon | 3 Nov 2007 14:37
Favicon

[Bug 75] File version check does not work properly

http://bugzilla.wpkg.org/show_bug.cgi?id=75

--- Comment #11 from Tomasz Chmielewski <mangoo <at> wpkg.org>  2007-11-03 14:36:48 ---
Created an attachment (id=45)
 --> (http://bugzilla.wpkg.org/attachment.cgi?id=45)
Patch fixing the problem

This one should fix it.

--

-- 
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

Gmane