* Fwd: source-filter isn't getting applied @ 2014-07-30 15:10 njn2118 0 siblings, 0 replies; 6+ messages in thread From: njn2118 @ 2014-07-30 15:10 UTC (permalink / raw) A bunch of my repositories have a README.markdown file, so I made this change to about-formatting.sh in order to properly highlight them. I'm not sure if there's a more flexible way of doing this -- I attached the diff here: -------------- next part -------------- A non-text attachment was scrubbed... Name: format_markdown_file.patch Type: text/x-diff Size: 751 bytes Desc: diff for markdown filter change URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20140730/56cfdcfa/attachment.patch> ^ permalink raw reply [flat|nested] 6+ messages in thread
* source-filter isn't getting applied @ 2014-07-28 21:14 njn2118 2014-07-28 22:38 ` john 0 siblings, 1 reply; 6+ messages in thread From: njn2118 @ 2014-07-28 21:14 UTC (permalink / raw) Hi, I have cgit installed and the source-filter isn't working on any of my source files. I have Python and Pygments installed. I tried manually running the script on some files, and it's giving back html correctly. Here's my /etc/cgitrc: scan-path=/home/git branch-sort=age repository-sort=age source-filter=/usr/local/lib/cgit/filters/syntax-highlighting.py about-filter=/usr/local/lib/cgit/filters/about-formatting.sh My cgit is installed in /var/www/cgit, and I'm using cgit v0.10.2. Let me know if you have any suggestions. Nik ^ permalink raw reply [flat|nested] 6+ messages in thread
* source-filter isn't getting applied 2014-07-28 21:14 njn2118 @ 2014-07-28 22:38 ` john [not found] ` <CA+TJm37SY1PwBuYgTpn=bQz0D7LcGdwwSZb=38ZbHK_DX1j5JA@mail.gmail.com> 0 siblings, 1 reply; 6+ messages in thread From: john @ 2014-07-28 22:38 UTC (permalink / raw) On Mon, Jul 28, 2014 at 05:14:43PM -0400, Nik Nyby wrote: > I have cgit installed and the source-filter isn't working on any of my > source files. I have Python and Pygments installed. I tried manually > running the script on some files, and it's giving back html > correctly. > > Here's my /etc/cgitrc: > > scan-path=/home/git > > branch-sort=age > repository-sort=age > > source-filter=/usr/local/lib/cgit/filters/syntax-highlighting.py > about-filter=/usr/local/lib/cgit/filters/about-formatting.sh > > > My cgit is installed in /var/www/cgit, and I'm using cgit v0.10.2. > > Let me know if you have any suggestions. What are the permissions on the script files? How do you run them manually? Assuming that CGit is definitely reading that `cgitrc` file, I'd guess that the permissions are not set correctly for the user `cgit` runs as when called from your web server. If all else fails, you can try moving CGit out of the way and replacing it with something like this: -- >8 -- #!/bin/sh strace -o /tmp/cgit.strace /path/to/real/cgit "$@" -- 8< -- ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CA+TJm37SY1PwBuYgTpn=bQz0D7LcGdwwSZb=38ZbHK_DX1j5JA@mail.gmail.com>]
* Fwd: source-filter isn't getting applied [not found] ` <CA+TJm37SY1PwBuYgTpn=bQz0D7LcGdwwSZb=38ZbHK_DX1j5JA@mail.gmail.com> @ 2014-07-29 3:59 ` njn2118 2014-07-29 7:37 ` john 0 siblings, 1 reply; 6+ messages in thread From: njn2118 @ 2014-07-29 3:59 UTC (permalink / raw) The permissions on the script files are set to be executable by everyone: -rwxr-xr-x Thanks for the strace idea. I'm looking through the strace, but I haven't seen any helpful mention of the filter scripts yet. I've attached an abridged version of my strace with the middle of the file taken out. I don't know if this is helpful or not. I'll let you know if I solve the problem. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20140728/ebb6a45c/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: cgit.strace Type: application/octet-stream Size: 30016 bytes Desc: not available URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20140728/ebb6a45c/attachment-0001.obj> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Fwd: source-filter isn't getting applied 2014-07-29 3:59 ` Fwd: " njn2118 @ 2014-07-29 7:37 ` john 2014-07-30 4:17 ` njn2118 0 siblings, 1 reply; 6+ messages in thread From: john @ 2014-07-29 7:37 UTC (permalink / raw) On Mon, Jul 28, 2014 at 11:59:10PM -0400, Nik Nyby wrote: > The permissions on the script files are set to be executable by everyone: > -rwxr-xr-x > > Thanks for the strace idea. I'm looking through the strace, but I haven't > seen any helpful mention of the filter scripts yet. I've attached an > abridged version of my strace with the middle of the file taken out. I > don't know if this is helpful or not. I'll let you know if I solve the > problem. If CGit was going to open a filter, it would do so after this line: write(1, "<td class='lines'><pre><code>", 29) = 29 So it looks like something in the configuration isn't being read correctly, but I think you snipped the strace log before we could see which config file it reads. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Fwd: source-filter isn't getting applied 2014-07-29 7:37 ` john @ 2014-07-30 4:17 ` njn2118 2014-07-30 4:21 ` njn2118 2014-07-30 7:57 ` john 0 siblings, 2 replies; 6+ messages in thread From: njn2118 @ 2014-07-30 4:17 UTC (permalink / raw) Great, this helped me debug the error. I looked at the part of the strace where it was reading the /etc/cgitrc, and it looked like it was only reading the first setting, even though the following settings are getting applied. I'm not sure exactly why yet, but putting the source-filter setting at the top of the /etc/cgitrc fixes the problem, and my source files are now highlighted. Now I'm dealing with the same problem with the about-filter, because putting that setting at the top isn't giving me markdown highlighting. On Tue, Jul 29, 2014 at 3:37 AM, John Keeping <john at keeping.me.uk> wrote: > On Mon, Jul 28, 2014 at 11:59:10PM -0400, Nik Nyby wrote: > > The permissions on the script files are set to be executable by everyone: > > -rwxr-xr-x > > > > Thanks for the strace idea. I'm looking through the strace, but I haven't > > seen any helpful mention of the filter scripts yet. I've attached an > > abridged version of my strace with the middle of the file taken out. I > > don't know if this is helpful or not. I'll let you know if I solve the > > problem. > > If CGit was going to open a filter, it would do so after this line: > > write(1, "<td class='lines'><pre><code>", 29) = 29 > > So it looks like something in the configuration isn't being read > correctly, but I think you snipped the strace log before we could see > which config file it reads. > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20140730/6c6b353d/attachment.html> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Fwd: source-filter isn't getting applied 2014-07-30 4:17 ` njn2118 @ 2014-07-30 4:21 ` njn2118 2014-07-30 7:57 ` john 1 sibling, 0 replies; 6+ messages in thread From: njn2118 @ 2014-07-30 4:21 UTC (permalink / raw) Nevermind about the about-filter. I'm reading the about-formatting.sh script and my questions are all answered now. On Wed, Jul 30, 2014 at 12:17 AM, Nik Nyby <njn2118 at columbia.edu> wrote: > Great, this helped me debug the error. I looked at the part of the strace > where it was reading the /etc/cgitrc, and it looked like it was only > reading the first setting, even though the following settings are getting > applied. I'm not sure exactly why yet, but putting the source-filter > setting at the top of the /etc/cgitrc fixes the problem, and my source > files are now highlighted. > > Now I'm dealing with the same problem with the about-filter, because > putting that setting at the top isn't giving me markdown highlighting. > > > On Tue, Jul 29, 2014 at 3:37 AM, John Keeping <john at keeping.me.uk> wrote: > >> On Mon, Jul 28, 2014 at 11:59:10PM -0400, Nik Nyby wrote: >> > The permissions on the script files are set to be executable by >> everyone: >> > -rwxr-xr-x >> > >> > Thanks for the strace idea. I'm looking through the strace, but I >> haven't >> > seen any helpful mention of the filter scripts yet. I've attached an >> > abridged version of my strace with the middle of the file taken out. I >> > don't know if this is helpful or not. I'll let you know if I solve the >> > problem. >> >> If CGit was going to open a filter, it would do so after this line: >> >> write(1, "<td class='lines'><pre><code>", 29) = 29 >> >> So it looks like something in the configuration isn't being read >> correctly, but I think you snipped the strace log before we could see >> which config file it reads. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20140730/e7dfc1d7/attachment.html> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Fwd: source-filter isn't getting applied 2014-07-30 4:17 ` njn2118 2014-07-30 4:21 ` njn2118 @ 2014-07-30 7:57 ` john 1 sibling, 0 replies; 6+ messages in thread From: john @ 2014-07-30 7:57 UTC (permalink / raw) On Wed, Jul 30, 2014 at 12:17:26AM -0400, Nik Nyby wrote: > Great, this helped me debug the error. I looked at the part of the strace > where it was reading the /etc/cgitrc, and it looked like it was only > reading the first setting, even though the following settings are getting > applied. I'm not sure exactly why yet, but putting the source-filter > setting at the top of the /etc/cgitrc fixes the problem, and my source > files are now highlighted. I suspect that was just strace truncating the data, but at least it pointed to the answer! Global settings get frozen for each repository when it is added, so you should generally do all the configuration near the top of the file and then add repositories (either explicity or with "scan-path=...") near the bottom. > Now I'm dealing with the same problem with the about-filter, because > putting that setting at the top isn't giving me markdown highlighting. > > > On Tue, Jul 29, 2014 at 3:37 AM, John Keeping <john at keeping.me.uk> wrote: > > > On Mon, Jul 28, 2014 at 11:59:10PM -0400, Nik Nyby wrote: > > > The permissions on the script files are set to be executable by everyone: > > > -rwxr-xr-x > > > > > > Thanks for the strace idea. I'm looking through the strace, but I haven't > > > seen any helpful mention of the filter scripts yet. I've attached an > > > abridged version of my strace with the middle of the file taken out. I > > > don't know if this is helpful or not. I'll let you know if I solve the > > > problem. > > > > If CGit was going to open a filter, it would do so after this line: > > > > write(1, "<td class='lines'><pre><code>", 29) = 29 > > > > So it looks like something in the configuration isn't being read > > correctly, but I think you snipped the strace log before we could see > > which config file it reads. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-30 15:10 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-07-30 15:10 Fwd: source-filter isn't getting applied njn2118 -- strict thread matches above, loose matches on Subject: below -- 2014-07-28 21:14 njn2118 2014-07-28 22:38 ` john [not found] ` <CA+TJm37SY1PwBuYgTpn=bQz0D7LcGdwwSZb=38ZbHK_DX1j5JA@mail.gmail.com> 2014-07-29 3:59 ` Fwd: " njn2118 2014-07-29 7:37 ` john 2014-07-30 4:17 ` njn2118 2014-07-30 4:21 ` njn2118 2014-07-30 7:57 ` john
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).