WeBWorK Main Forum

Issues after git-pull upgrade

Issues after git-pull upgrade

by Lars Jensen -
Number of replies: 8
Hi Everyone,

We just did a git pull upgrade of our production server and we are seeing two new issues.

We did the following: 
  • git-pull upgrades of ./webwork2 and ./pg directories
  • Installed missing modules as listed by ./checkmodules: File::Find and File::Find::Rule
  • Upgraded all courses from the admin course
After this we found these issues:
  1. Mathjax doesn't work anymore.
  2. Many problem shows the warning at the top of the problem page: "Warning -- there may be something wrong with this question. Please inform your instructor including the warning messages below."
    At the bottom of the same page there are warnings like this:

    Warning messages
    ERROR: Unable to compile /opt/webwork/pg/lib/chromatic/color.c. at /opt/webwork/pg/lib/Chromatic.pm line 18.
    The command /usr/bin/gcc -O3 -o /opt/webwork/pg/lib/chromatic/color /opt/webwork/pg/lib/chromatic/color.c failed at /opt/webwork/pg/lib/Chromatic.pm line 19.
    Chromatic.pm and a compiled version of color.c are required for this problem at /opt/webwork/pg/lib/Chromatic.pm line 20.
    The file color.c will need to be compiled by a systems administrator. at /opt/webwork/pg/lib/Chromatic.pm line 21.
    Can't write into directory /opt/webwork/pg/lib/chromatic at /opt/webwork/pg/lib/Chromatic.pm line 23.

Any help appreciated.
Thanks,
Lars.
In reply to Lars Jensen

Re: Issues after git-pull upgrade

by Hedley Pinsent -
Sounds like your getting version 2.8

a) your original MathJax would have been clobbered with as a link to MathJax in /webwork (see screenshot below)

b)The chromatic ...
In the release instructions for 2.8 - you need to run this:


" Run webwork2/bin/setfilepermissions to insure that permissions on webwork2 and pg files are correct. (In particular the directory pg/lib/chromatic must be set so that the server can write to it when compiling the color.c file.) This might take 30 seconds to complete.

sudo -E webwork2/bin/setfilepermissions "

Attachment HowToTell.png
In reply to Hedley Pinsent

Re: Issues after git-pull upgrade

by Lars Jensen -
Hi Hedley,

Thanks for your reply. Got it all fixed. I didn't realize this was a major update, and had some editing of the config files to do. Also, as you pointed out, the location of MathJax had moved.

Lars.
In reply to Hedley Pinsent

Re: Issues after git-pull upgrade

by Jason Aubrey -
Hi Lars,

Regarding MathJax, before 2.8 MathJax was a git submodule downloaded directly to webwork2/htdocs/mathjax. However, people didn't like working with git submodules, so the webwork2/htdocs/mathjax directory is now a symlink to a MathJax directory in your top-level webwork dir. (The one with webwork2/, pg/, courses/, libraries/ - typically /opt/webwork.) So, if you do ls -l in webwork2/htdocs/ you'll see something like ../../MathJax for the webwork2/htdocs/mathjax file.

Regarding chromatic, I would be careful before using webwork/webwork2/bin/setfilepermissions. That script will get chromatic to work for you, but it does more than that, and you should be aware of those other effects before running the script.

Firstly it will put all of the files and directories that should be web writable into the same group as the webserver. In itself that is not a problem - it is a common set up for webwork.

However, if you followed the standard install instructions and created a wwadmin user and wwdata group, then your web writable files are in the wwdata group along with the webserver, and it's members of wwdata that can write those files. If you didn't create that extra group, then you don't have to worry about this - those files and directories will already be in the webserver's group.

Secondly, it will create a directory called pg/lib/chromatic and make itweb-writable. This is so that the webwork code can compile chromatic.c if it finds that it's missing.

Thirdly, it will change the ownership of some directories to the user you logged in as. So, if you logged in as you and are using sudo to do administrative tasks, then the script will figure out that you're really ljenson (or whatever) and change the ownership of some directories to ljenson.

Again, this may be fine, but it may not be what you expect (or want).

As part of my installation package I have a script that *only* compiles and installs chromatic.c and doesn't mess with permissions. But it just amounts to

mkdir /opt/webwork/pg/lib/chromatic
cd /opt/webwork/pg/lib/chromatic
gcc -O3 color.c -o color

Jason

In reply to Jason Aubrey

Re: Issues after git-pull upgrade

by Nandor Sieben -
Perhaps setfilepermissions and the installation instructions could be synchronized.
In reply to Jason Aubrey

Re: Issues after git-pull upgrade

by Lars Jensen -
Hi Jason,

Thanks for providing the setfilepermissions script. It makes it easier to quickly get everything configured correctly after changes. The script worked well for us. We have the wwdata group, but not the wwadmin group, so it works well having files owned by me. The setfilepermissions script makes it easy to update webwork by simply cloning the webwork2/ and pg/ directories from github and changing a couple of file in the webwork2/conf directory. -Very easy to do.

Thanks,
Lars.
In reply to Lars Jensen

Re: Issues after git-pull upgrade

by Jason Aubrey -
I believe John Jones and Danny Glin wrote setfilepermissions, but I'm happy to assert that I'm rubber and they're glue so that your gratitude bounces off of me and sticks to those two...

Jason
In reply to Jason Aubrey

Re: Issues after git-pull upgrade

by Danny Glin -
Sorry.  I can't take any credit for setfilepermissions.  Looks like we're both bouncing gratitude to John.

Danny
In reply to Danny Glin

Re: Issues after git-pull upgrade

by Michael Gage -
John Jones wrote it at WeBWorK::Vancouver if I remember correctly.
The buck stops there. :-)

-- Mike