FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Infrastructure

 
 
LinkBack Thread Tools
 
Old 08-12-2010, 03:33 PM
Todd Zullinger
 
Default viewvc: Add a note that CVS is read-only

While we redirect cvs.fedoraproject.org to pkgs.fedoraproject.org,
specific URL's are not redirected (and probably should not be). Adding
a large note to the viewvc header template should make it more obvious
that CVS is not being updated anymore.
---

This is an RFC, because there is potential room for improvement here.
While the default cvsroot for viewvc is pkgs, there are still other
cvsroots accessible via viewvc and I'm not sure if all of them are
read-only. I doubt they are.

The question is whether having the note in the header for all cvsroots
is a bad thing and if anyone knows the viewvc ezt template system well
enough to make it only show up when rootname == pkgs. It seems like
it may be possible to do this, but I don't know the ezt syntax to make
that happen. Help would be most welcome, if the general idea here is
sound and someone else is bored or curious enough to give it a try.

modules/viewvc/files/viewvc/header.ezt | 24 ++++++++++++++++++++++++
modules/viewvc/manifests/init.pp | 6 ++++++
2 files changed, 30 insertions(+), 0 deletions(-)
create mode 100644 modules/viewvc/files/viewvc/header.ezt

diff --git a/modules/viewvc/files/viewvc/header.ezt b/modules/viewvc/files/viewvc/header.ezt
new file mode 100644
index 0000000..96bd5a2
--- /dev/null
+++ b/modules/viewvc/files/viewvc/header.ezt
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<!-- ViewVC :: http://www.viewvc.org/ -->
+<head>
+ <title>[if-any rootname][[][rootname]][else]ViewVC[end] [page_title]</title>
+ <meta name="generator" content="ViewVC [vsn]" />
+ <link rel="shortcut icon" href="[docroot]/images/favicon.ico" />
+ <link rel="stylesheet" href="[docroot]/styles.css" type="text/css" />
+ [if-any rss_href]<link rel="alternate" type="application/rss+xml" title="RSS [[][rootname]][where]" href="[rss_href]" />[end]
+</head>
+<body>
+<h2>NOTE: CVS is now read-only. See <a href="http://pkgs.fedoraproject.org/gitweb/">gitweb</a> for current changes.</h2>
+<div class="vc_navheader">
+<table><tr>
+<td><strong>[if-any roots_href]<a href="[roots_href]"><span class="pathdiv">/</span></a>[else]<span class="pathdiv">/</span>[end][if-any nav_path][for nav_path][if-any nav_path.href]<a href="[nav_path.href]">[end][if-index nav_path first][[][nav_path.name]][else][nav_path.name][end][if-any nav_path.href]</a>[end][if-index nav_path last][else]<span class="pathdiv">/</span>[end][end][end]</strong></td>
+<td style="text-align: right;">[if-any username]Logged in as: <strong>[username]</strong>[end]</td>
+</tr></table>
+</div>
+
+<div style="float: right; padding: 5px;"><a href="http://www.viewvc.org/" title="ViewVC Home"><img src="[docroot]/images/viewvc-logo.png" alt="ViewVC logotype" width="240" height="70" /></a></div>
+<h1>[page_title]</h1>
+
+
diff --git a/modules/viewvc/manifests/init.pp b/modules/viewvc/manifests/init.pp
index 08617ea..426458d 100644
--- a/modules/viewvc/manifests/init.pp
+++ b/modules/viewvc/manifests/init.pp
@@ -16,4 +16,10 @@ class viewvc::web {
mode => 0644,
require => Package['viewvc']
}
+
+ file { '/usr/share/viewvc/templates/include/header.ezt':
+ source => 'puppet:///viewvc/viewvc/header.ezt',
+ mode => 0644,
+ require => Package['viewvc']
+ }
}
--
1.7.2.1

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
I never forget a face, but in your case I'll be glad to make an
exception.
-- Groucho Marx

_______________________________________________
infrastructure mailing list
infrastructure@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/infrastructure
 
Old 08-12-2010, 03:38 PM
Mike McGrath
 
Default viewvc: Add a note that CVS is read-only

+1 from me. Though this may need to be coordinated with notting's patch


-Mike


On Thu, 12 Aug 2010, Todd Zullinger wrote:

> While we redirect cvs.fedoraproject.org to pkgs.fedoraproject.org,
> specific URL's are not redirected (and probably should not be). Adding
> a large note to the viewvc header template should make it more obvious
> that CVS is not being updated anymore.
> ---
>
> This is an RFC, because there is potential room for improvement here.
> While the default cvsroot for viewvc is pkgs, there are still other
> cvsroots accessible via viewvc and I'm not sure if all of them are
> read-only. I doubt they are.
>
> The question is whether having the note in the header for all cvsroots
> is a bad thing and if anyone knows the viewvc ezt template system well
> enough to make it only show up when rootname == pkgs. It seems like
> it may be possible to do this, but I don't know the ezt syntax to make
> that happen. Help would be most welcome, if the general idea here is
> sound and someone else is bored or curious enough to give it a try.
>
> modules/viewvc/files/viewvc/header.ezt | 24 ++++++++++++++++++++++++
> modules/viewvc/manifests/init.pp | 6 ++++++
> 2 files changed, 30 insertions(+), 0 deletions(-)
> create mode 100644 modules/viewvc/files/viewvc/header.ezt
>
> diff --git a/modules/viewvc/files/viewvc/header.ezt b/modules/viewvc/files/viewvc/header.ezt
> new file mode 100644
> index 0000000..96bd5a2
> --- /dev/null
> +++ b/modules/viewvc/files/viewvc/header.ezt
> @@ -0,0 +1,24 @@
> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> +<!-- ViewVC :: http://www.viewvc.org/ -->
> +<head>
> + <title>[if-any rootname][[][rootname]][else]ViewVC[end] [page_title]</title>
> + <meta name="generator" content="ViewVC [vsn]" />
> + <link rel="shortcut icon" href="[docroot]/images/favicon.ico" />
> + <link rel="stylesheet" href="[docroot]/styles.css" type="text/css" />
> + [if-any rss_href]<link rel="alternate" type="application/rss+xml" title="RSS [[][rootname]][where]" href="[rss_href]" />[end]
> +</head>
> +<body>
> +<h2>NOTE: CVS is now read-only. See <a href="http://pkgs.fedoraproject.org/gitweb/">gitweb</a> for current changes.</h2>
> +<div class="vc_navheader">
> +<table><tr>
> +<td><strong>[if-any roots_href]<a href="[roots_href]"><span class="pathdiv">/</span></a>[else]<span class="pathdiv">/</span>[end][if-any nav_path][for nav_path][if-any nav_path.href]<a href="[nav_path.href]">[end][if-index nav_path first][[][nav_path.name]][else][nav_path.name][end][if-any nav_path.href]</a>[end][if-index nav_path last][else]<span class="pathdiv">/</span>[end][end][end]</strong></td>
> +<td style="text-align: right;">[if-any username]Logged in as: <strong>[username]</strong>[end]</td>
> +</tr></table>
> +</div>
> +
> +<div style="float: right; padding: 5px;"><a href="http://www.viewvc.org/" title="ViewVC Home"><img src="[docroot]/images/viewvc-logo.png" alt="ViewVC logotype" width="240" height="70" /></a></div>
> +<h1>[page_title]</h1>
> +
> +
> diff --git a/modules/viewvc/manifests/init.pp b/modules/viewvc/manifests/init.pp
> index 08617ea..426458d 100644
> --- a/modules/viewvc/manifests/init.pp
> +++ b/modules/viewvc/manifests/init.pp
> @@ -16,4 +16,10 @@ class viewvc::web {
> mode => 0644,
> require => Package['viewvc']
> }
> +
> + file { '/usr/share/viewvc/templates/include/header.ezt':
> + source => 'puppet:///viewvc/viewvc/header.ezt',
> + mode => 0644,
> + require => Package['viewvc']
> + }
> }
> --
> 1.7.2.1
>
> --
> Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
> I never forget a face, but in your case I'll be glad to make an
> exception.
> -- Groucho Marx
>
> _______________________________________________
> infrastructure mailing list
> infrastructure@lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/infrastructure
>
_______________________________________________
infrastructure mailing list
infrastructure@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/infrastructure
 
Old 08-12-2010, 03:59 PM
Todd Zullinger
 
Default viewvc: Add a note that CVS is read-only

I wrote:
> This is an RFC, because there is potential room for improvement here.
> While the default cvsroot for viewvc is pkgs, there are still other
> cvsroots accessible via viewvc and I'm not sure if all of them are
> read-only. I doubt they are.
>
> The question is whether having the note in the header for all cvsroots
> is a bad thing and if anyone knows the viewvc ezt template system well
> enough to make it only show up when rootname == pkgs. It seems like
> it may be possible to do this, but I don't know the ezt syntax to make
> that happen. Help would be most welcome, if the general idea here is
> sound and someone else is bored or curious enough to give it a try.

Doing this bit may be as simple as:

diff --git i/modules/viewvc/files/viewvc/header.ezt w/modules/viewvc/files/viewvc/header.ezt
index 96bd5a2..942983c 100644
--- i/modules/viewvc/files/viewvc/header.ezt
+++ w/modules/viewvc/files/viewvc/header.ezt
@@ -10,7 +10,11 @@
[if-any rss_href]<link rel="alternate" type="application/rss+xml" title="RSS [[][rootname]][where]" href="[rss_href]" />[end]
</head>
<body>
+[if-any rootname]
+ [is rootname "pkgs"]
<h2>NOTE: CVS is now read-only. See <a href="http://pkgs.fedoraproject.org/gitweb/">gitweb</a> for current changes.</h2>
+ [end]
+[end]
<div class="vc_navheader">
<table><tr>
<td><strong>[if-any roots_href]<a href="[roots_href]"><span class="pathdiv">/</span></a>[else]<span class="pathdiv">/</span>[end][if-any nav_path][for nav_path][if-any nav_path.href]<a href="[nav_path.href]">[end][if-index nav_path first][[][nav_path.name]][else][nav_path.name][end][if-any nav_path.href]</a>[end][if-index nav_path last][else]<span class="pathdiv">/</span>[end][end][end]</strong></td>

But I don't have a multi-root viewvc at hand to test against.

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
If the triangles were to make a God they would give him three sides.
-- Montesquieu

_______________________________________________
infrastructure mailing list
infrastructure@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/infrastructure
 
Old 08-12-2010, 04:03 PM
"Jason L Tibbitts III"
 
Default viewvc: Add a note that CVS is read-only

Not being in the right group to give plusses to anything, I do have a
question: is it in general OK for a puppet-managed file to overwrite an
rpm-managed file in this manner? viewvc does not seem to have a
mechanism for files in some config-friendly location to override the
ones in /usr/share.

- J<
_______________________________________________
infrastructure mailing list
infrastructure@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/infrastructure
 
Old 08-12-2010, 04:17 PM
Todd Zullinger
 
Default viewvc: Add a note that CVS is read-only

Jason L Tibbitts III wrote:
> Not being in the right group to give plusses to anything, I do have
> a question: is it in general OK for a puppet-managed file to
> overwrite an rpm-managed file in this manner? viewvc does not seem
> to have a mechanism for files in some config-friendly location to
> override the ones in /usr/share.

It's definitely something I use puppet for quite a bit. It is
unfortunate that the header template doesn't seem to be one of the
ones that can be configured in the viewvc.conf file. Perhaps there's
a cleaner way to achieve this, though I don't know what that is.

One nice thing is that when puppet overwrites a file, it will back up
the file it replaces and log it. So if we ever updated viewvc and
needed to pull in changes from the new header template, we could pull
that out of the filebucket and merge the changes back. (Not that any
of us here couldn't do that as easily by extracting the file from the
new rpm as well, of course.

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Does it follow that I reject all authority? Perish the thought. In the
matter of boots, I defer to the authority of the boot-maker.
-- Mikhail Bakunin

_______________________________________________
infrastructure mailing list
infrastructure@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/infrastructure
 
Old 08-12-2010, 04:21 PM
Mike McGrath
 
Default viewvc: Add a note that CVS is read-only

On Thu, 12 Aug 2010, Jason L Tibbitts III wrote:

> Not being in the right group to give plusses to anything, I do have a
> question: is it in general OK for a puppet-managed file to overwrite an
> rpm-managed file in this manner? viewvc does not seem to have a
> mechanism for files in some config-friendly location to override the
> ones in /usr/share.
>

It's ok from our point of view though maybe the package could be built
better.

-Mike
_______________________________________________
infrastructure mailing list
infrastructure@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/infrastructure
 

Thread Tools




All times are GMT. The time now is 03:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org