Opened 11 years ago

Closed 10 years ago

#3693 closed enhancement (fixed)

Upgrade Moin Moin to 1.9.1

Reported by: was Owned by: was
Priority: blocker Milestone: sage-4.3.3
Component: packages: standard Keywords:
Cc: was, mhansen 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:

Description (last modified by mpatel)

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 was 11 years ago.
trac_3693-part2.patch (3.4 KB) - added by mhansen 11 years ago.
trac_3693-part3.patch (1.2 KB) - added by mhansen 11 years ago.
trac_3693-combined.patch (4.1 KB) - added by mhansen 11 years ago.
trac_3683-moinmoin-1.9.patch (7.5 KB) - added by timdumol 10 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 timdumol 10 years ago.
Adds a fork argument.
trac_3683-upgrade_moinmoin.patch (10.2 KB) - added by mpatel 10 years ago.
Minor formatting, docstring changes. Replaces previous. sage repo.

Download all attachments as: .zip

Change History (49)

comment:1 Changed 11 years ago by was

  • Owner changed from mabshoff to was
  • Status changed from new to assigned

comment:2 Changed 11 years ago by was

  • Description modified (diff)

comment:3 Changed 11 years ago by was

  • 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 11 years ago by was

comment:4 Changed 11 years ago by mhansen

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 11 years ago by mhansen

comment:5 Changed 11 years ago by mabshoff

  • Summary changed from upgrade moinmoin to 1.7.1 to [with spkg and patches, needs review] upgrade moinmoin to 1.7.1

comment:6 Changed 11 years ago by jason

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 11 years ago by mabshoff

  • Milestone changed from sage-3.2 to sage-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 11 years ago by mhansen

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

Also, it currently does write a backup before upgrading.

Changed 11 years ago by mhansen

comment:9 Changed 11 years ago by mhansen

  • Summary changed from [with spkg and patches, needs review] upgrade moinmoin to 1.7.1 to [with spkg and patches, needs review] upgrade moinmoin to 1.7.2

comment:10 Changed 11 years ago by was

  • Summary changed from [with spkg and patches, needs review] upgrade moinmoin to 1.7.2 to [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 11 years ago by was

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 11 years ago by mabshoff

[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 11 years ago by mhansen

comment:13 Changed 11 years ago by mhansen

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 11 years ago by rlm

  • Summary changed from [with spkg and patches, needs work] upgrade moinmoin to 1.7.2 to [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 11 years ago by mabshoff

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 11 years ago by rlm

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 11 years ago by rlm

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 11 years ago by rlm

  • Summary changed from [with spkg and patches, needs review] upgrade moinmoin to 1.7.2 to [with spkg and patches, positive review] upgrade moinmoin to 1.7.2

Looks very good to me.

comment:19 Changed 11 years ago by mhansen

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 11 years ago by was

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 11 years ago by rlm

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 11 years ago by rlm

  • Summary changed from [with spkg and patches, positive review] upgrade moinmoin to 1.7.2 to [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 follow-up: Changed 11 years ago by 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.

comment:24 in reply to: ↑ 23 Changed 10 years ago by rlm

  • Summary changed from [with spkg and patches, needs review] upgrade moinmoin to 1.7.2 to [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 10 years ago by was

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 10 years ago by timdumol

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

comment:27 Changed 10 years ago by timdumol

  • 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 10 years ago by was

  • Priority changed from major to blocker
  • Report Upstream set to N/A

comment:29 Changed 10 years ago by timdumol

  • Description modified (diff)
  • Status changed from needs_work to needs_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 10 years ago by timdumol

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

comment:30 Changed 10 years ago by timdumol

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

comment:31 Changed 10 years ago by timdumol

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

comment:32 Changed 10 years ago by was

  • Status changed from needs_review to needs_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 10 years ago by timdumol

Adds a fork argument.

comment:33 Changed 10 years ago by timdumol

  • Status changed from needs_work to needs_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 10 years ago by mpatel

Possibly related: #1870?

comment:35 Changed 10 years ago by was

  • Description modified (diff)

comment:36 Changed 10 years ago by timdumol

  • Status changed from needs_review to needs_work

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

comment:37 Changed 10 years ago by timdumol

  • Authors set to Tim Dumol
  • Cc was mhansen added
  • Status changed from needs_work to needs_review

comment:38 Changed 10 years ago by timdumol

  • Summary changed from Upgrade Moin Moin to 1.9 to Upgrade Moin Moin to 1.9.1

Changed 10 years ago by mpatel

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

comment:39 Changed 10 years ago by mpatel

  • Description modified (diff)
  • Reviewers set to Mitesh Patel

comment:40 Changed 10 years ago by mpatel

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 10 years ago by mhansen

  • Status changed from needs_review to positive_review

mpatel's changes look fine to me.

comment:42 Changed 10 years ago by mpatel

  • Authors changed from Tim Dumol to Tim Dumol, Mitesh Patel
  • Merged in set to sage-4.3.3.alpha0
  • Resolution set to fixed
  • Reviewers changed from Mitesh Patel to Mitesh Patel, Mike Hansen
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.