Opened 14 years ago

Closed 13 years ago

#3693 closed enhancement (fixed)

Upgrade Moin Moin to 1.9.1

Reported by: William Stein Owned by: William Stein
Priority: blocker Milestone: sage-4.3.3
Component: packages: standard Keywords:
Cc: William Stein, Mike Hansen Merged in: sage-4.3.3.alpha0
Authors: Tim Dumol, Mitesh Patel Reviewers: Mitesh Patel, Mike Hansen
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Mitesh Patel)

The latest version of MoinMoin is 1.9.1. The current version in Sage is 1.5.7.

Note: Close #1870 if/when this merges.

Attachments (7)

sage-3693-part1.patch (1.1 KB) - added by William Stein 14 years ago.
trac_3693-part2.patch (3.4 KB) - added by Mike Hansen 14 years ago.
trac_3693-part3.patch (1.2 KB) - added by Mike Hansen 14 years ago.
trac_3693-combined.patch (4.1 KB) - added by Mike Hansen 14 years ago.
trac_3683-moinmoin-1.9.patch (7.5 KB) - added by Tim Dumol 13 years ago.
Patch for moin-1.9.p0.spkg. Apply this patch alone to sage repo.
trac_3683-moinmoin-1.9.2.patch (8.2 KB) - added by Tim Dumol 13 years ago.
Adds a fork argument.
trac_3683-upgrade_moinmoin.patch (10.2 KB) - added by Mitesh Patel 13 years ago.
Minor formatting, docstring changes. Replaces previous. sage repo.

Download all attachments as: .zip

Change History (49)

comment:1 Changed 14 years ago by William Stein

Owner: changed from Michael Abshoff to William Stein
Status: newassigned

comment:2 Changed 14 years ago by William Stein

Description: modified (diff)

comment:3 Changed 14 years ago by William Stein

Description: modified (diff)

Current version of spkg here:

http://sage.math.washington.edu/home/was/patches/moin-1.7.1.spkg

The current problems:

  • moinmoin is totally broken on os x -- weird permission errors; probably related to twisted upgrade. This was a problem with 1.5.x too, so fixing this isn't needed for this ticket, but should be fixed in another ticket.
  • jsmath typesetting doesn't work because url's like this don't work: http://wiki.sagemath.org/wiki/jsmath/ If anybody can find a URL that works (i.e., lists files), I can make jsmath for sage work fine.
  • We have to check that existing moinmoin installs get automatically migrated.
  • We need to change things so that (1) the default moinmoin install does *not* allow anonymous edits. This means editing a file in patches/

  • We need to change things so that the default moinmoin using catchpa's since the whole point of upgrading is to get rid of spammers.

Changed 14 years ago by William Stein

Attachment: sage-3693-part1.patch added

comment:4 Changed 14 years ago by Mike Hansen

I have an updated spkg at http://sage.math.washington.edu/home/mhansen/moin-1.7.1.spkg along with a new patch.

It takes care of all the issues listed above except the weird permissions errors on OS X. The second patch is just a fairly quick version I did, and it would be good if someone else sat down and looked at it. I tested the migration bit on a simple wiki and it worked correctly with jsMath, the textchas, etc.

Changed 14 years ago by Mike Hansen

Attachment: trac_3693-part2.patch added

comment:5 Changed 14 years ago by Michael Abshoff

Summary: upgrade moinmoin to 1.7.1[with spkg and patches, needs review] upgrade moinmoin to 1.7.1

comment:6 Changed 14 years ago by Jason Grout

I applied the patches and installed the spkg and everything seemed to work fine. I did not try to convert any wikis, though, and could not test OS X. So consider this a positive review if those two issues are looked at by someone.

comment:7 Changed 14 years ago by Michael Abshoff

Milestone: sage-3.2sage-3.1.3

Mike mentioned that we should go to 1.7.2 directly. We also need someone to test the upgrade of an existing wiki.

Maybe we should do a backup before upgrading the wiki so that in case of a disaster no data are lost.

Cheers,

Michael

comment:8 Changed 14 years ago by Mike Hansen

I've tested upgrading an existing wiki, but I guess I don't count :-)

Also, it currently does write a backup before upgrading.

Changed 14 years ago by Mike Hansen

Attachment: trac_3693-part3.patch added

comment:9 Changed 14 years ago by Mike Hansen

Summary: [with spkg and patches, needs review] upgrade moinmoin to 1.7.1[with spkg and patches, needs review] upgrade moinmoin to 1.7.2

comment:10 Changed 14 years ago by William Stein

Summary: [with spkg and patches, needs review] upgrade moinmoin to 1.7.2[with spkg and patches, needs work] upgrade moinmoin to 1.7.2

Hi,

I just tried this on the public sage wiki. It "works", but has the drawback that I guess MoinMoin? changed their link format, so essentially every single link (over 3000 pages of them) in the entire wiki is broken. It would be nice if the Python code actually converted the wiki pages so they work. As it is now, it doesn't, so anybody who upgrades to this spkg would have their entire wiki broken.

Hopefully changing the link format can be done automatically.

comment:11 Changed 14 years ago by William Stein

Mike could you post exactly what you did to very nicely fix the public sage wiki? You did get it to work. Thanks!

comment:12 Changed 14 years ago by Michael Abshoff

[01:03am] mabshoff: mhansen: wstein|afk was wondering about how you converted the wiki?
[01:03am] mabshoff: I.e. the moinmoin 1.6 syntax since he wanted to convert the other wikis hosted at sagemath.org, too.
[01:04am] mhansen: There's a data migration script that needs to be run.
[01:05am] mhansen: "moin migration data --help"
[01:17am] mabshoff: mk

Changed 14 years ago by Mike Hansen

Attachment: trac_3693-combined.patch added

comment:13 Changed 14 years ago by Mike Hansen

I posted a new spkg at http://sage.math.washington.edu/home/mhansen/moin-1.7.2.spkg and made a new patch. trac_3693-combined.patch is the only one that should be applied.

comment:14 Changed 14 years ago by Robert Miller

Summary: [with spkg and patches, needs work] upgrade moinmoin to 1.7.2[with spkg and patches, needs review] upgrade moinmoin to 1.7.2

Has anyone looked at mhansen's spkg or patch yet? The current state of moinmoin in Sage is pretty sad:

$ ./sage
----------------------------------------------------------------------
| Sage Version 3.3.rc2, Release Date: 2009-02-17                     |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: pwd
'/Users/rlmill/sage-3.3.rc2'
sage: wiki()
**************************************************
*                                                *
* Open your web browser to http://localhost:9000 *
*                                                *
**************************************************
Removing stale pidfile /Users/rlmill/sage-3.3.rc2/sage_wiki/twistd.pid
2009-02-20 17:57:31-0800 [-] Log opened.
2009-02-20 17:57:31-0800 [-] twistd 8.1.0 (/Users/rlmill/sage-3.3.rc2/local/bin/python 2.5.2) starting up
2009-02-20 17:57:31-0800 [-] reactor class: <class 'twisted.internet.selectreactor.SelectReactor'>
2009-02-20 17:57:31-0800 [-] MoinMoin.server.twistedmoin.MoinSite starting on 9000
2009-02-20 17:57:31-0800 [-] Starting factory <MoinMoin.server.twistedmoin.MoinSite instance at 0x11b5a08>
2009-02-20 17:57:31-0800 [-] Traceback (most recent call last):
2009-02-20 17:57:31-0800 [-]   File "/Users/rlmill/sage-3.3.rc2/local/bin/twistd", line 21, in <module>
2009-02-20 17:57:31-0800 [-]     run()
2009-02-20 17:57:31-0800 [-]   File "/Users/rlmill/sage-3.3.rc2/local/lib/python2.5/site-packages/twisted/scripts/twistd.py", line 27, in run
2009-02-20 17:57:31-0800 [-]     app.run(runApp, ServerOptions)
2009-02-20 17:57:31-0800 [-]   File "/Users/rlmill/sage-3.3.rc2/local/lib/python2.5/site-packages/twisted/application/app.py", line 614, in run
2009-02-20 17:57:31-0800 [-]     runApp(config)
2009-02-20 17:57:31-0800 [-]   File "/Users/rlmill/sage-3.3.rc2/local/lib/python2.5/site-packages/twisted/scripts/twistd.py", line 23, in runApp
2009-02-20 17:57:31-0800 [-]     _SomeApplicationRunner(config).run()
2009-02-20 17:57:31-0800 [-]   File "/Users/rlmill/sage-3.3.rc2/local/lib/python2.5/site-packages/twisted/application/app.py", line 337, in run
2009-02-20 17:57:31-0800 [-]     self.postApplication()
2009-02-20 17:57:31-0800 [-]   File "/Users/rlmill/sage-3.3.rc2/local/lib/python2.5/site-packages/twisted/scripts/_twistd_unix.py", line 207, in postApplication
2009-02-20 17:57:31-0800 [-]     self.startApplication(self.application)
2009-02-20 17:57:31-0800 [-]   File "/Users/rlmill/sage-3.3.rc2/local/lib/python2.5/site-packages/twisted/scripts/_twistd_unix.py", line 309, in startApplication
2009-02-20 17:57:31-0800 [-]     self.shedPrivileges(self.config['euid'], uid, gid)
2009-02-20 17:57:31-0800 [-]   File "/Users/rlmill/sage-3.3.rc2/local/lib/python2.5/site-packages/twisted/scripts/_twistd_unix.py", line 281, in shedPrivileges
2009-02-20 17:57:31-0800 [-]     switchUID(uid, gid, euid)
2009-02-20 17:57:31-0800 [-]   File "/Users/rlmill/sage-3.3.rc2/local/lib/python2.5/site-packages/twisted/python/util.py", line 664, in switchUID
2009-02-20 17:57:31-0800 [-]     initgroups(uid, gid)
2009-02-20 17:57:31-0800 [-]   File "/Users/rlmill/sage-3.3.rc2/local/lib/python2.5/site-packages/twisted/python/util.py", line 641, in initgroups
2009-02-20 17:57:31-0800 [-]     _setgroups_until_success(l)
2009-02-20 17:57:31-0800 [-]   File "/Users/rlmill/sage-3.3.rc2/local/lib/python2.5/site-packages/twisted/python/util.py", line 587, in _setgroups_until_success
2009-02-20 17:57:31-0800 [-]     setgroups(l)
2009-02-20 17:57:31-0800 [-] OSError: [Errno 1] Operation not permitted
True
sage: pwd
'/Users/rlmill/sage-3.3.rc2/sage_wiki'
sage: exit
Exiting SAGE (CPU time 0m0.08s, Wall time 0m14.13s).

comment:15 Changed 14 years ago by Michael Abshoff

We are actually running this wiki.spkg already at sagemath.org. The failure you saw is a known OSX problem with a ticket.

Cheers,

Michael

comment:16 Changed 14 years ago by Robert Miller

The pwd behavior is present in Linux as well. If no one else wants to, I can do the review for this ticket.

comment:17 Changed 14 years ago by Robert Miller

Also, currently I have problems with pointing the directory entry at an old wiki. In sage 2.8.14, it runs fine (as long as I run it in the directory containing sage_wiki, that is), but the Sage 3.3 versions don't like it, probably because of it not sitting in $SAGE_ROOT or pwd or something.

comment:18 Changed 14 years ago by Robert Miller

Summary: [with spkg and patches, needs review] upgrade moinmoin to 1.7.2[with spkg and patches, positive review] upgrade moinmoin to 1.7.2

Looks very good to me.

comment:19 Changed 14 years ago by Mike Hansen

After upgrading a few wiki's, I'm not sure how I feel about the automatic updates since they only sort of work. If the user has changed the wikiconfig.py file at all.

I think I'd be more in favor of printing a list of explicit instructions for the user to follow.

comment:20 Changed 14 years ago by William Stein

I think I'd be more in favor of printing a list of explicit instructions for the user to follow.

I'm very happy with that, as long as the instructions get tested and work.

comment:21 Changed 14 years ago by Robert Miller

I have an old wiki with a modified wikiconfig.py.

Mike -- You should write up instructions for changing it over, and I can test it on this wiki.

comment:22 Changed 14 years ago by Robert Miller

Summary: [with spkg and patches, positive review] upgrade moinmoin to 1.7.2[with spkg and patches, needs review] upgrade moinmoin to 1.7.2

The new spkg here fixes the jsmath issue:

http://8tb.us/home/rlmill/moin-1.7.2.p0.spkg

comment:23 Changed 14 years ago by William Stein

I just tried using moin-1.7.2.spkg on wiki.wstein.org and the autoupgrade process resulting in the entire wiki being massively corrupted.

comment:24 in reply to:  23 Changed 13 years ago by Robert Miller

Summary: [with spkg and patches, needs review] upgrade moinmoin to 1.7.2[with spkg and patches, needs work] upgrade moinmoin to 1.7.2

Replying to was:

I just tried using moin-1.7.2.spkg on wiki.wstein.org and the autoupgrade process resulting in the entire wiki being massively corrupted.

Making this "needs work" again, then.

comment:25 Changed 13 years ago by William Stein

I change my mind! It is stupid to not upgrade moinmoin at this point... auto-upgrading need *not* be automatic. That is unreasonable.

Mike, if you can put up a new moinmoin spkg that works, even if it doesn't autoupgrade old moinmoins, I'll be happy.

comment:26 Changed 13 years ago by Tim Dumol

Description: modified (diff)
Summary: [with spkg and patches, needs work] upgrade moinmoin to 1.7.2[with spkg and patches, needs work] upgrade moinmoin to 1.8.5

comment:27 Changed 13 years ago by Tim Dumol

Description: modified (diff)

Since the latest version of MoinMoin? is now 1.8.5 (soon to be 1.9), I'm updating the summary.

Gah. I meant that as a comment.

comment:28 Changed 13 years ago by William Stein

Priority: majorblocker
Report Upstream: N/A

comment:29 Changed 13 years ago by Tim Dumol

Description: modified (diff)
Status: needs_workneeds_review

A new spkg for moin-1.9 is at http://sage.math.washington.edu/home/timdumol/moin-1.9.0.p0.spkg. trac_3683-moinmoin-1.9.patch is the accompanying patch to the sage repo.

Changed 13 years ago by Tim Dumol

Patch for moin-1.9.p0.spkg. Apply this patch alone to sage repo.

comment:30 Changed 13 years ago by Tim Dumol

Summary: [with spkg and patches, needs work] upgrade moinmoin to 1.8.5Upgrade Moin Moin to 1.9

comment:31 Changed 13 years ago by Tim Dumol

I forgot to note that this new spkg depends on Twisted 9.0: #7552

comment:32 Changed 13 years ago by William Stein

Status: needs_reviewneeds_work
  1. Notice the ? below; we need to add mointwisted.py to the hg repo in the spkg.
    wstein@sage:~/build/referee/sage-4.3.rc0/moin-1.9.0.p0$              hg status
    M patches/wikiconfig.py
    M spkg-install
    ? patches/mointwisted.py
    

The actual wiki command is confusing because it now runs as a daemon instead of blocking. This is highly confusing, mainly because it is exactly the opposite behavior as the notebook command.

sage: wiki(address="")
...
2009-12-21 14:37:36,095 WARNING MoinMoin.log:139 using logging configuration read from built-in fallback in MoinMoin.log module!
sage:

I.e.., I immediately got a prompt back. This is especially bad because once I exit sage the moin wiki is left running:

wstein@sage:~/build/referee/sage-4.3.rc0$ ps ax |grep moin
 4012 ?        Sl     0:00 python /scratch/wstein/build/referee/sage-4.3.rc0/local/bin/twistd moin -p 9000 -a 
 4021 pts/135  S+     0:00 grep moin

With the notebook we have two (unfortunately undocumented) options:

             fork = False,
             quiet = False

I think they do basically what you've main moin do by default. So I would like to request that you keep the current capability, but make it non-default. Use the fork= option to control what happens.

Changed 13 years ago by Tim Dumol

Adds a fork argument.

comment:33 Changed 13 years ago by Tim Dumol

Status: needs_workneeds_review

New patch with the requested fork argument is now up. New package at http://sage.math.washington.edu/home/timdumol/moin-1.9.0.p0.spkg.

comment:34 Changed 13 years ago by Mitesh Patel

Possibly related: #1870?

comment:35 Changed 13 years ago by William Stein

Description: modified (diff)

comment:36 Changed 13 years ago by Tim Dumol

Status: needs_reviewneeds_work

1.9.1 has been released, so this should be updated to 1.9.1.

comment:37 Changed 13 years ago by Tim Dumol

Authors: Tim Dumol
Cc: William Stein Mike Hansen added
Status: needs_workneeds_review

comment:38 Changed 13 years ago by Tim Dumol

Summary: Upgrade Moin Moin to 1.9Upgrade Moin Moin to 1.9.1

Changed 13 years ago by Mitesh Patel

Minor formatting, docstring changes. Replaces previous. sage repo.

comment:39 Changed 13 years ago by Mitesh Patel

Description: modified (diff)
Reviewers: Mitesh Patel

comment:40 Changed 13 years ago by Mitesh Patel

The updated patch

  • Untabifies moin.py.
  • Adds a missing INPUT block.
  • Adds the note about upgrading existing MoinMoin wikis.

The updated spkg

  • Includes jsMath.
  • Commits an uncommitted file.
  • Fixes the GUI editor. The jsMath parser was the problem.
    • Maybe we can use the same fix for the Sage wiki?
    • For another ticket: Keep MoinMoin from stripping $s from GUI mode.
  • Uses Sage's easy/load.js to load/configure jsMath. This adds \QQ, \Bold{}, etc.

Positive review, but someone should review my changes.

comment:41 Changed 13 years ago by Mike Hansen

Status: needs_reviewpositive_review

mpatel's changes look fine to me.

comment:42 Changed 13 years ago by Mitesh Patel

Authors: Tim DumolTim Dumol, Mitesh Patel
Merged in: sage-4.3.3.alpha0
Resolution: fixed
Reviewers: Mitesh PatelMitesh Patel, Mike Hansen
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.