Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#642 closed New feature (fixed)

Package Piwik for the Windows Web Application Gallery

Reported by: matt Owned by: vipsoft
Priority: low Milestone: Piwik 0.9.9 - Stable release
Component: Core Keywords:
Cc: Sensitive: no

Description

the Microsoft Web Platform offers a complete ecosystem for building and hosting web sites, services, and applications.

If a community member is keen, we could package Piwik to work on this platform and increase Piwik awareness. Instructions on how to package for the platform ca be found on:
Application Packaging Guide for the Windows Web Application Gallery

Change History (49)

comment:1 Changed 5 years ago by vipsoft (robocoder)

  • Milestone changed from Features requests - after Piwik 1.0 to 1 - Piwik 0.4.4
  • Sensitive unset

comment:2 Changed 5 years ago by vipsoft (robocoder)

In [1479], fixes #642 package Piwik for Web Application Gallery

comment:3 Changed 5 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

Matt, I'll send you the diffs to the build script via email. The app submission form is pretty much self-explanatory. Here's the link: http://www.microsoft.com/web/gallery/appsubmit.aspx

Judging from other submissions, the logo is a 200x200 image, and (up to 6) 800x600 screenshots can be uploaded.

Keep in mind that updates have to be submitted using the same form and it can take several days for approval. As a result, we may not want the installer badge to be a link to latest.zip.

Note for end-users:

If PHP hasn't been set-up properly, the session.save_path may default to something C:\WINDOWS\TEMP, which IIS7 doesn't have read/write/modify access to. In http://piwik.org/docs/installation (or the FAQ), add help text, i.e., configure session.save_path or (as administrator) grant the web server user (or group) access to the temp folder, e.g.,

icacls C:\WINDOWS\TEMP /grant IUSR:(M)

comment:4 follow-up: Changed 5 years ago by matt (mattab)

  • Resolution fixed deleted
  • Status changed from closed to reopened

reopening, few tasks left

  • (Matt) small change in build script
      cp piwik/misc/How\ to\ install\ Piwik.html .
    + cp piwik/misc/WebAppGallery/*.xml .
    
  • update the FAQ as per vipsoft comment above... or can we find a better workaround? how does it work for other web gallery softwares that require sessions?
  • (?) submit Piwik on the Microsoft website

comment:5 Changed 5 years ago by vipsoft (robocoder)

re: session.save_path. In Manifest.xml, we can only set the ACL for paths within the web document root.

  • Gallery - if using 'files', would run into the ACL issue
  • Wordpress doesn't use session variables; everything is stored in cookies
  • SugarCRM - at Installation, checks to see if the session.save_path is writeable
  • Drupal - uses the database to store session information
  • Moodle - uses either files or the database to store session information (depends on how it was configured); if files, they create their own session folder

From this sampling of web gallery apps, we could take either the SugarCRM or Moodle approaches:

  • at Installation, check if session.save_path is writeable (if session.save_handler is 'files'); if not, then error out ("You must make it writeable or configure session.save_path")
  • or simply set session.save_path (again, if session.save_handler is 'files') to a local folder, e.g., piwik/tmp/sessions/

comment:6 Changed 5 years ago by vipsoft (robocoder)

Oops. The error happens in index.php, so a check at Installation would be too late. Ok, the quick fix:

index.php (pseudo-code)

if ini_get('session.save_handler') == 'files' then
  if !is_writeable(ini_get('session.save_path')) then
    ini_set('session.save_path', 'piwik/tmp/sessions')
    if !exists('piwik/tmp/sessions') then
      mkdir('piwik/tmp/sessions')
    fi
  fi
fi

comment:7 Changed 5 years ago by matt (mattab)

This quick fix sounds very reasonnable to me? I think it would greatly help with ease of use. Would it help with #976 too? It looks like #976 would become fixed?

comment:8 Changed 5 years ago by vipsoft (robocoder)

In [1483], refs #642 and #796 - is session.save_handler is 'files' and session.save_path is not writeable, create (and use) local tmp/sessions folder

comment:9 Changed 5 years ago by matt (mattab)

  • Milestone changed from 2 - Piwik 0.5 to 1 - Piwik 0.4.4

Thanks vipsoft for your work- 0.4.4 now contains the XML files required for the web app gallery submission - do you need any special info for the submission? Screenshots are not really available at this point, appart from the one on the homepage: http://piwik.org/blog/wp-content/uploads/2008/11/piwik-e280ba-web-analytics-reports7.png

We can either submit a given version number to microsoft, or submit piwik.org/latest.zip (which might be easier to avoid having to re-submitting regularly?)

comment:10 Changed 5 years ago by matt (mattab)

  • Milestone changed from 1 - Piwik 0.4.4 to 2 - Piwik 0.5

comment:11 Changed 5 years ago by vipsoft (robocoder)

Technically, an update requires resubmitting the application. The WAG agreement obligates participants' best efforts to provide a link to the "current, stable version" of the app.

In general, I don't think we can point WAG to latest.zip. The WAG submission form requires a SHA-1 hash of the release package. During the approval process, there would be a mismatch between the old hash on record vs the new latest.zip.

We could link directly to the package on builds.piwik.org, or you could whip up another script that would also track WAG downloads.

Did you want me to submit the app to WAG? There's a whole screen where MS collects contact information.

comment:12 Changed 5 years ago by matt (mattab)

let's do the submission after 0.5 then :) thanks for the update

comment:13 Changed 5 years ago by vipsoft (robocoder)

  • Owner set to vipsoft
  • Status changed from reopened to new

comment:14 Changed 4 years ago by vipsoft (robocoder)

  • Priority changed from major to low

comment:15 Changed 4 years ago by vipsoft (robocoder)

  • Milestone changed from 1 - Piwik 0.5 to 1 - Piwik 0.5.1

comment:16 Changed 4 years ago by vipsoft (robocoder)

  • Owner vipsoft deleted

comment:17 Changed 4 years ago by matt (mattab)

OK for linking to the latest builds.piwik.org/ release at the time of filling out the form.

For the logo and screenshots, I uploaded some at: http://piwik.org/media/

for contact info, please use the std hello@ address

let me know if you need more info

comment:18 Changed 4 years ago by vipsoft (robocoder)

  • Milestone changed from 1 - Piwik 0.5.5 to 2 - Piwik 0.6 - DigitalVibes

comment:19 Changed 4 years ago by matt (mattab)

I like the idea of Web Gallery very much, also the download numbers seem high, and the number of tools low, so visibility is maximum.

Regarding the submission, we should definitely automate 100% the process at any new update. It seems wordpress localizers do it manually at each release, but we don't want to do that.

From their website:

Update Your Application

When you release an update to your application, please follow this procedure:

1. Advise the Windows Web App Gallery in advance of the new package, if your schedule allows.

2. Do not remove the old version until you receive a confirmation that all links are pointing to the new version.

3. Create and test your new application package.

4. Ensure that the new package has a different name than the previous package.

5. Generate a SHA-1 hash for the new package.

6. Send an e-mail to the address that you have used for communicating with the Gallery that includes the following information for the new package:

    * A note identifying the update as a Security Release  (if appropriate)
    * URL
    * SHA-1 hash
    * File size
    * A link to any Release Notes or Changelog for the update (optional)

We could have the release script create the SHA1, send them the email automatically with the URL, the version name, a link to the changelog, the file size. The email would be sent every time we package a "stable" release. We would need a @piwik.org windows live ID.

I think this would work and would not require any manual work from us, maybe I'm missing something?

Anthon, did you test the package on windows using their web gallery framework? For example, is 0.5.5 working?

If yes, I think we can go ahead with submitting it! When we are accepted, we can modify the update script to do the bit of logic to contact them.

I think it would be ideal if you do the initial submission, considering you own the code for web gallery compatibility, and they might contact us for more info if they have questions. Let me know your thoughts

comment:20 Changed 4 years ago by matt (mattab)

Just a thought.. we might need a custom build for Web Gallery because the current tree structure after unzip is:

  • piwik/
  • How to install Piwik.htm -> redirects to piwik.org/docs/installation/ when opened

I think they expect the Manifest.xml and parameters.xml in the root?

comment:21 in reply to: ↑ 4 Changed 4 years ago by vipsoft (robocoder)

Yes, a WAG-specific build should use the change from comment:4

  cp piwik/misc/How\ to\ install\ Piwik.html . 
+ cp piwik/misc/WebAppGallery/*.xml . 

comment:22 Changed 4 years ago by matt (mattab)

Ok sorry I forgot about this change, just did it. The next build (0.6) will have the XML files in the root folder. please let me know if there are other changes to make to the build script.

comment:23 Changed 4 years ago by vipsoft (robocoder)

  • Owner set to vipsoft

Todo:

  • make directories writeable so auto-update works (issue raised in #1340)
  • see if I can use location tags in web.config to emulate the .htaccess changes in #1337

comment:24 Changed 4 years ago by vipsoft (robocoder)

(In [2162]) refs #642 - acl was too restrictive, e.g., didn't allow for auto-update

comment:25 Changed 4 years ago by vipsoft (robocoder)

(In [2163]) refs #642 - block direct access to .tpl and .php files (with some obvious exceptions)

comment:26 Changed 4 years ago by matt (mattab)

# see if I can use location tags in web.config to emulate the .htaccess changes in #1337

that sounds fine, but I wouldn't worry too much if it's inconsistent between apache and windows.

Is the build OK otherwise?

comment:27 Changed 4 years ago by vipsoft (robocoder)

(In [2182]) refs #642 - use full path for alwaysAllowedUrls; trim hiddenSegments as it only applies to folders

comment:28 Changed 4 years ago by vipsoft (robocoder)

Ok. My repackaged 0.6 installed and auto-updated to my repackaged 0.6.1. So, it looks good to go for 0.6.2.

However, I think I saw a bug in the file integrity check, so I'll have to look at that.

comment:29 Changed 4 years ago by vipsoft (robocoder)

I'll submit 0.6.2 tonight. I just have to sanity test the as-built release.

comment:30 Changed 4 years ago by vipsoft (robocoder)

Submitted. Status: Pending Review.

Note: the automated submission process reports validation errors on http://piwik.org and http://piwik.org/, but didn't complain about http://forum.piwik.org.

comment:31 Changed 4 years ago by matt (mattab)

what do 'validation errors' mean? are they a problem and if so how can they be fixed?

comment:32 Changed 4 years ago by vipsoft (robocoder)

When I click on the "Status" or "Test" links for the submitted application, it runs an automated test to validate the submission. Eg are the logo and screnshots the correct format and dimensions, is the SHA1 hash correct, etc. For the URLs, it put a checkmark next to those where I used forum.piwik.org and builds.piwik.org, and an "X" next those that pointed to simply piwik.org.

The automated email response indicated that it'll still be reviewed manually to see if Piwik meets all the WAG principles/requirements. And somewhere else I read that this can take a week.

I assume this is a bug on their end and we'll sort it out over email.

comment:33 Changed 4 years ago by vipsoft (robocoder)

I received an email confirming that the 'X's are a bug on their end, and that the submission was accepted and is now being reviewed.

Status: Testing.

comment:34 Changed 4 years ago by vipsoft (robocoder)

Ok, dug deeper into the 'X's. These are caused by WAG's URL validator receiving a 403 response from the Bad Behavior plugin for Wordpress. I've suggested that they add Accept & Connection fields to their HTTP request so it no longer triggers BB's spam bot detector. Failing that, we can add update to a newer version of BB and add their IP address (or range) to BB's whitelist.ini.

comment:35 Changed 4 years ago by vipsoft (robocoder)

MS fixed it on their end.

Status: Testing

comment:36 Changed 4 years ago by vipsoft (robocoder)

(In [2295]) fixes #1416, refs #642 - replace static web.config with runtime generated files (at Installation)

comment:37 Changed 4 years ago by vipsoft (robocoder)

Submitted 0.6.3 to WAG.

comment:38 Changed 4 years ago by vipsoft (robocoder)

Just received feedback:

  1. The root folder has MODIFY permissions . We recommend to restrict the ‘MODIFY’ permissions to a subset of folders which require this permission.

This is needed for auto-update. The alternative is to limit to config and tmp, and tackle #1340 (and possibly a variation of #1448 so users can re-enable auto-update).

  1. Since manual creation of database is required , we do recommend using Web PI to create the database , which the user can enter during Piwik browser install process.

The recommendation here included changes to the manifest.xml, parameters.xml, and a new install.sql, to create the database and database user. The Web Platform Installer would basically prompt for a db admin (e.g., root) login, database name (to create), and db user (and password) to create.

However, I really think this should be core functionality in our native installer, so I'll create a ticket and outline the modified logic for that screen.

comment:39 Changed 4 years ago by matt (mattab)

# Since manual creation of database is required
This is not true, since you fixed the regression that the DB wasn't created anymore.

In the next release, DB will be created automatically, so WAG should work as it is without extra code?

comment:40 Changed 4 years ago by vipsoft (robocoder)

Assuming the db user has CREATE DATABASE privilege.

comment:41 Changed 4 years ago by matt (mattab)

Does that mean we are in Windows Web Gallery now? or are their feedback blockers to get in?

comment:42 Changed 4 years ago by vipsoft (robocoder)

Nope, not in the gallery, yet. The feedback was phrased above as recommendations. AFAIK these are not blockers. Status is still "Testing".

comment:43 Changed 4 years ago by vipsoft (robocoder)

Given the time it takes for WAG to test and provide feedback, I'll resubmit following the 0.9 release.

comment:44 Changed 4 years ago by vipsoft (robocoder)

I submitted 0.7.

comment:45 Changed 4 years ago by matt (mattab)

  • Milestone changed from 3 - Piwik 0.9 - Surviving The Wild to 4 - Piwik 1.0 - Stable release

comment:46 Changed 4 years ago by matt (mattab)

I guess no update still? are they not making fun of us??

comment:47 Changed 4 years ago by vipsoft (robocoder)

According to the status, it's in the "testing" state. I get the feeling WAG isn't suited to apps with frequent updates. ;)

comment:48 Changed 4 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

Piwik approved...ok, it's 0.8, but we're at least on WAG. Maybe 0.9 will be approved when we release 1.0? ;)

comment:49 Changed 4 years ago by matt (mattab)

Thanks Anthon. Their release /validation process is terrible. Well I guess we could have expected it ;) hahahaha

Note: See TracTickets for help on using tickets.