Opened 14 months ago

Closed 13 months ago

Last modified 13 months ago

#15930 closed defect (fixed)

Tutorial sample code unavailable

Reported by: simon.duerr@… Owned by: Eric Pettersen
Priority: moderate Milestone:
Component: Documentation Version:
Keywords: Cc: chimerax-programmers
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Dear Chimera Developers,

it seems the example source code download links are broken in the documentation:
https://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/tutorial_tool_qt.html

All links have the format as below and don't work
http://www.rbvi.ucsf.edu/chimerax/cgi-bin/bundle_tutorial.zip?name=tut_tool_qt

Could you fix this or point me to the correct location for the download?

Thank you

Simon Dürr

Change History (14)

comment:1 by Eric Pettersen, 14 months ago

Greg, could you make the files in /usr/local/projects/chimerax/www/production/cgi-bin group writable so that I can debug this problem? Thanks.

--Eric

comment:2 by Greg Couch, 14 months ago

Done. Is it working on the preview site?

comment:3 by Eric Pettersen, 14 months ago

Doesn't work on preview either, so I'll debug there (the permissions are already okay).

comment:4 by Eric Pettersen, 14 months ago

To get the zip file, preview goes to the production cgi-bin, so it turns out I will need to work there.

comment:5 by Eric Pettersen, 14 months ago

Greg, the files in /usr/local/projects/chimerax/www/production/cgi-bin are still not group writable...

comment:6 by Greg Couch, 14 months ago

I see my mistake. I made the directory writable and all of the bundle*zip files.

comment:7 by Eric Pettersen, 14 months ago

The "git archive" command is failing with:

fatal: detected dubious ownership in repository at '/wynton/group/ferrin/usr.local/projects/chimerax/builds/chimerax'
To add an exception for this directory, call:

git config --global --add safe.directory /wynton/group/ferrin/usr.local/projects/chimerax/builds/chimerax

I think that "git config" command needs to be run as user apache. Greg, can you do that?

comment:8 by Greg Couch, 14 months ago

~apache/.gitconfig already lists that directory as safe.

comment:9 by Zach Pearson, 14 months ago

One workaround would be to put the tutorial code on GitHub and then link to the zip of that repo instead of a local zip.

comment:10 by Eric Pettersen, 14 months ago

The zip isn't static -- it's always made on the fly (using "git archive") from the latest version of the tutorial sample code so that we don't have to remember to update a zip file every time the sample code gets changed.

comment:11 by Greg Couch, 14 months ago

I changed the ownership of ~apache from root to apache. Maybe that will help.

comment:12 by Eric Pettersen, 13 months ago

Resolution: fixed
Status: assignedclosed

The script needed to set the HOME environment variable and flush the HTTP headers before writing out the body data.

comment:13 by simon.duerr@…, 13 months ago

Thanks for fixing this. I would recommend setting the url as https and not http.

Using e.g Chrome one cannot download from non-secure locations.


Simon


________________________________
From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Sent: Friday, September 13, 2024 1:19:25 AM
To: Simon Dürr; pett@cgl.ucsf.edu
Cc: chimerax-programmers@cgl.ucsf.edu
Subject: Re: [ChimeraX] #15930: Tutorial sample code unavailable

#15930: Tutorial sample code unavailable
------------------------------------+--------------------
          Reporter:  simon.duerr@…  |      Owner:  pett
              Type:  defect         |     Status:  closed
          Priority:  moderate       |  Milestone:
         Component:  Documentation  |    Version:
        Resolution:  fixed          |   Keywords:
        Blocked By:                 |   Blocking:
Notify when closed:                 |   Platform:  all
           Project:  ChimeraX       |
------------------------------------+--------------------
Changes (by pett):

 * resolution:   => fixed
 * status:  assigned => closed

Comment:

 The script needed to set the HOME environment variable and flush the HTTP
 headers before writing out the body data.
--
Ticket URL: <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/15930#comment:12>
ChimeraX <https://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker

comment:14 by Eric Pettersen, 13 months ago

Good idea -- I've switched the URLs to HTTPS, which should show up on the website and in the builds tomorrow.

--Eric

Note: See TracTickets for help on using tickets.