Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Package Piwik for the Windows Web Application Gallery #642

Closed
mattab opened this Issue · 41 comments

2 participants

@mattab
Owner

[the Microsoft Web Platform offers a complete ecosystem for building and hosting web sites, services, and applications.](http://www.microsoft.com/web/gallery/)

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](http://learn.iis.net/page.aspx/578/application-packaging-guide-for-the-windows-web-application-gallery/)

@robocoder
Collaborator

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

@robocoder
Collaborator

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)
@mattab
Owner

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

@robocoder
Collaborator

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/
@robocoder
Collaborator

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
@mattab
Owner

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?

@robocoder
Collaborator

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

@mattab
Owner

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?)

@robocoder
Collaborator

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.

@mattab
Owner

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

@mattab
Owner

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

@mattab
Owner

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

@mattab
Owner

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?

@robocoder
Collaborator

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 . 
@mattab
Owner

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.

@robocoder
Collaborator

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
@robocoder
Collaborator

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

@robocoder
Collaborator

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

@mattab
Owner

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?

@robocoder
Collaborator

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

@robocoder
Collaborator

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.

@robocoder
Collaborator

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

@robocoder
Collaborator

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.

@mattab
Owner

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

@robocoder
Collaborator

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.

@robocoder
Collaborator

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.

@robocoder
Collaborator

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.

@robocoder
Collaborator

MS fixed it on their end.

Status: Testing

@robocoder
Collaborator

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

@robocoder
Collaborator

Submitted 0.6.3 to WAG.

@robocoder
Collaborator

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.

@mattab
Owner

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?

@robocoder
Collaborator

Assuming the db user has CREATE DATABASE privilege.

@mattab
Owner

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

@robocoder
Collaborator

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

@robocoder
Collaborator

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

@robocoder
Collaborator

I submitted 0.7.

@mattab
Owner

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

@robocoder
Collaborator

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

@robocoder
Collaborator

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? ;)

@mattab
Owner

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

@mattab mattab added this to the Piwik 0.9.9 - Stable release milestone
@robocoder robocoder was assigned by mattab
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.