Re: [viewvc-users] viewvc highlight with pygments

Alon Bar-Lev <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Message-ID <CAOazyz3X2qA8bLvfghz5jQaKEDuBhz+Z9zjqNwock0PxtRpfEw__16504.191971808$1316098278$gmane$org@mail.gmail.com>
Hello,

I cannot speak of behalf of many distributions... but I am using Gentoo, and was
a Gentoo developer in the past.
In Gentoo we try to use as much as we can upstream installation.

There are some upstream installations that are just not good enough so we do
the work our-selves.

But even the most poor installation script may provide hints of what required
to successfully setup the software. So even if nobody actually use the
installation
script one may be aware of the configuration during installation that
is recommended
by upstream.

In Gentoo it is simple to understand what is installed, look at [1].

Provided you used:
./viewvc-install --prefix=/usr --destdir=/tmp/view2

If I could have used the following command, it would have been
productive, and may
be used by downstream maintainer.

./viewvc-install \
    --destdir=/tmp/viewvc-tmp \
    --prefix=/usr \
    --python-lib="$(python_get_sitedir)/${PN}" \
    --appdir="${MY_APPDIR}" \
    --hostroot="${MY_HOSTROOTDIR}" \
    --cgibindir="${MY_CGIBINDIR}" \
    --htdocsdir="${MY_HTDOCSDIR}"
    --confdir="${MY_HOSTROOTDIR}/conf" \
    --options="cgi,mod_python,mod_wsgi,mysql"
    --mime-types=/etc/mime.type
# also support --bindir... default is PREFIX/bin

Differences:

1.  Allow overriding the directories, the separation is quite
standard. Default can be all under PREFIX.

2. Create layout based on options, do not install extra files.

Hope I answered your question...

Anyway, I opened a bug in Gentoo to perform this on downstream[2]...

Regards,
Alon Bar-Lev.

[1] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-apps/viewvc/viewvc-1.1.11.ebuild?view=markup
[2] https://bugs.gentoo.org/show_bug.cgi?id=382959

On Thu, Sep 15, 2011 at 5:02 PM, C. Michael Pilato <[email protected]> wrote:
> Sounds like a good idea, but maybe you could help me understand something.
> What about the current codebase stands in the way of a distro packager doing
> the right thing?  I know nothing of how packager do what they do, but I
> assume that a distro-provided version of ViewVC doesn't run viewvc-install
> anyway -- that would be run by the package maintainer in order to build a
> static tree which is then packaged.  Why couldn't the package maintainer
> preemptively modify the viewvc.conf file that their package provides to
> point to the mime.types file for their target platform?
>
>
> On 09/15/2011 06:32 AM, Alon Bar-Lev wrote:
>> Hello,
>>
>> When I looked as some more closely on the installation, I see you already modify
>> some of the files during installation.
>>
>> So a minor suggestion:
>> Add a parameter to viewvc-install allowing to specify system mime
>> file, and set this as default in mime_types_files parameter.
>>
>> This way distro packagers may be able to specify their own system wide
>> repository as default.
>>
>> Thanks!
>>
>> On Wed, Sep 14, 2011 at 9:51 PM, Alon Bar-Lev <[email protected]> wrote:
>>> Thank you!
>>>
>>> On Wed, Sep 14, 2011 at 8:56 PM, C. Michael Pilato <[email protected]> wrote:
>>>> On 09/14/2011 12:22 PM, Alon Bar-Lev wrote:
>>>>> Thanks *A LOT*!
>>>>> It is not documented anywhere... invested much time in this... should
>>>>> asked earlier...
>>>>
>>>> It was only as I was replying to your original mail that it occurred to me
>>>> how ill-documented the MIME-type dependency of the Pygments integration is.
>>>>  I've tweaked the viewvc.conf template to hopefully make this a little more
>>>> clear now:
>>>>
>>>>  ## enable_syntax_coloration: Should we colorize known file content
>>>>  ## syntaxes?
>>>>  ##
>>>>  ## NOTE: This feature requires the Pygments Python module
>>>>  ## (http://pygments.org) and works only when ViewVC can determine the
>>>>  ## MIME content type of the file whose contents it wishes to colorize.
>>>>  ## Use the 'mime_types_files' configuration option to specify MIME
>>>>  ## type mapping files useful for making that determination.
>>>>  ##
>>>>  #enable_syntax_coloration = 1
>>>>
>>>> Sorry that you had a bit of a run-around trying to figure this out yourself.
>>>>
>>>> --
>>>> C. Michael Pilato <[email protected]>
>>>> CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
>>>>
>>>>
>>>
>
>
> --
> C. Michael Pilato <[email protected]>
> CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
>
>

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2839237

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.