Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sponsor logo on home of CPAN mirror

0 views
Skip to first unread message

Henk P. Penning

unread,
Dec 30, 2017, 7:45:03 AM12/30/17
to cpan-workers
Hi,

CPAN mirror sites sometimes want to add some sponsor info
to the mirrored CPAN home page. This is allowed, but the
documented[1] method is vague and not elegant.

I propose we fix this ; see (the source of) :

http://cpan.cs.uu.nl/ondex.html

Changes :

-- add "<script src="/local/site.js" charset="utf-8"></script>"
-- add a javascript function "hostedby()"
-- add an empty <span id="hostedby"> in the "footer_mirror" section

A mirror site can set a sponsor logo without changing /index.html ;
simply by adding "/local/site.js", containing something like :

var site_url = 'http://www.cs.uu.nl/' ;
var site_img = 'http://www.cs.uu.nl/icons/li-dsol.png' ;

[1] see the source of https://www.cpan.org/

A "diff -u" is included below.

Regards,

Henk Penning

------------------------------------------------------------ _
Henk P. Penning, ICT-beta R Uithof MG-403 _/ \_
Faculty of Science, Utrecht University T +31 30 253 4106 / \_/ \
Leuvenlaan 4, 3584CE Utrecht, NL F +31 30 253 4553 \_/ \_/
http://www.staff.science.uu.nl/~penni101/ M pen...@uu.nl \_/

--- index.html 2017-12-30 12:24:02.000000000 +0100
+++ ondex.html 2017-12-30 12:31:02.312188519 +0100
@@ -27,22 +27,18 @@
the SITES.html and SITES files at the top level of CPAN
and also listed at the site http://mirrors.cpan.org/.

- You are not allowed to alter any file
- in you public mirror of CPAN
- EXCEPT
- that you can add a short acknowledgement for example
- for your hosting company, company, university, or sponsor,
- into this CPAN top-level index.html by adding a small
- non-animated image and a hyperlink pointing to your organization
- with text like "hosted by", "powered by", or "sponsored by",
- by placing it visually next to the "CPAN master site hosted by YellowBot"
- acknowledgement at the bottom of the page.
- The image used may not be larger than the one used for the YellowBot logo.
- (Technical sidenote: if you do add an acknowledgement link,
- please do think of the consequences to your possible downstream
- CPAN mirrors.)
- Altering this index.html in any other way is not allowed.
- Altering any other files is not allowed.
+ You are not allowed to alter any file in you public mirror of CPAN.
+
+ To add a sponsor link/logo :
+ -- cd /your/path/to/CPAN
+ -- mkdir local
+ -- create local/site.js containing
+ var site_url = 'http://www.your.org/' ;
+ var site_img = 'http://www.your.org/icons/logo.png' ;
+ -- in your cronjob, add rsync option "--exclude /local/"
+ -- if you export CPAN via rsync, exclude CPAN/local/
+ in your rsyncd.conf with "exclude = /local/".
+ The image used may not be larger than the other sponsor logo's.

Adding any advertisements or any revenue-generating material
is strictly forbidden.
@@ -51,6 +47,8 @@
the CPAN web pages into other sites by using e.g. HTML tables
or frames is not allowed.

+ Directory listings must be plain ; like http://www.cpan.org/indices/.
+
You are allowed to use the files of CPAN to create your own
web sites and services since we are just a distributor of the files,
we do not own most of them. However, you may not call your creations
@@ -58,16 +56,22 @@
from CPAN".

-->
-<script type="text/javascript" charset="utf-8">
+<script src="/local/site.js" charset="utf-8"></script>
+<script>
function focusField() {
document.getElementById("searchfield").focus();
}
- onload = focusField;
+ function hostedby () {
+ span = document.getElementById('hostedby') ;
+ if ( typeof site_img !== 'undefined' ) {
+ span.innerHTML = 'Mirror hosted by <a href="'
+ + site_url + '">' + '<img src="' + site_img + '"></a>' ;
+ }
+ }
</script>

-
</head>
-<body class="section_home">
+<body class="section_home" onload="focusField() ; hostedby()">

<table id="wrapper" border="0" width="95%" cellspacing="0" cellpadding="2" align="center">
<tr>
@@ -229,6 +233,9 @@
<a href="https://www.fastly.com/"><img alt="Fastly" height="49" width="118"
src="misc/images/fastly.png" /></a>
</p>
+ <p>
+ <span id="hostedby"></span>
+ </p>
</div>

Zefram

unread,
Dec 30, 2017, 8:00:09 AM12/30/17
to cpan-workers
Henk P. Penning wrote:
> -- add a javascript function "hostedby()"
> -- add an empty <span id="hostedby"> in the "footer_mirror" section

I certainly approve of only showing the logo to people who run JavaScript.

-zefram

Ask Bjørn Hansen

unread,
Dec 31, 2017, 1:15:01 AM12/31/17
to Henk P. Penning, cpan-workers
Rather than having it execute javascript that’s locally modified, maybe we could have it just load some JSON?

I know that the mirror can technically change anything, so this is not really a technical argument.

I think it’s important to maintain a stance that it’s unacceptable to change anything (other than this…). Changing a bit of meta data (a JSON file) seems less slippery slope than changing a bit of website code.


Ask

Henk P. Penning

unread,
Dec 31, 2017, 2:45:02 AM12/31/17
to Ask Bjørn Hansen, cpan-workers
On Sun, 31 Dec 2017, Ask Bjørn Hansen wrote:

> Date: Sun, 31 Dec 2017 06:58:48 +0100
> From: Ask Bjørn Hansen <a...@perl.org>
> To: Henk P. Penning <pen...@uu.nl>
> Cc: cpan-workers <cpan-w...@perl.org>
> Subject: Re: sponsor logo on home of CPAN mirror
The idea is that the mirror-operator may add a directory /local/
and exclude it in the rsync : --exclude /local/.
That would be the ONLY change that is allowed ; no EXCEPT.
If applicable, an operator is also required to
exclude /local/ in his/her rsyncd.conf.

I think that is a little cleaner than the current rule
that says that an operator may change /index.html :

You are not allowed to alter any file
in you public mirror of CPAN
EXCEPT
that you can add a short acknowledgement for example
for your hosting company, company, university, or sponsor,
into this CPAN top-level index.html by adding a small
non-animated image and a hyperlink pointing to your organization
with text like "hosted by", "powered by", or "sponsored by",
by placing it visually next to the "CPAN master site hosted by YellowBot"
acknowledgement at the bottom of the page.
The image used may not be larger than the one used for the YellowBot logo.
(Technical sidenote: if you do add an acknowledgement link,
please do think of the consequences to your possible downstream
CPAN mirrors.)
Altering this index.html in any other way is not allowed.
Altering any other files is not allowed.

I don't see how such a change can be kept local ;
how can it /not/ propagate to downstream mirrors?

> Ask

Elaine Ashton

unread,
Dec 31, 2017, 7:30:02 AM12/31/17
to Henk P. Penning, Elaine -HFB- Ashton, Robert, Ask Bjørn Hansen, cpan-workers


On Dec 31, 2017, at 12:52 PM, Henk P. Penning <pen...@uu.nl> wrote:

 Ok ; here is the same thing with a /local/site.json file,
 instead of a /local/site.js file :

   http://cpan.cs.uu.nl/ondex2.html

 View the page's source for javascript code and user instructions.

 I think I prefer having local mods confined to "/local/",
 and to disallow any other changes.

The entire point of a mirror is that it is an exact duplicate of all others and the master. 

Whilst I understand that there is a desire to acknowledge the generosity and resources borne by the host of each mirror, aside from the potential sec issues and it opening a door for other requests, it bothers me to think that the anonymity of the network over the decades now needs to be acknowledged by individual operators which, to my mind, opens the door for advertising, too. 

I can’t imagine most mirrors are such a great burden on network resources as to be needing some kind of remuneration in the form of a logo or advertising. 
 

e.

--
            -=]) elaine ashton // eas...@mac.com // HFB ([=-
          -=]) That's the difference between governments and ([=- 
 -=]) individuals. Governments don't care, individuals do. - Mark Twain ([=- 

Henk P. Penning

unread,
Dec 31, 2017, 7:45:02 AM12/31/17
to Elaine Ashton, Robert, Ask Bjørn Hansen, cpan-workers
On Sun, 31 Dec 2017, Elaine Ashton wrote:

> Date: Sun, 31 Dec 2017 12:12:06 +0100
> From: Elaine Ashton <eas...@mac.com>
> To: Henk P. Penning <pen...@uu.nl>
> Cc: Elaine -HFB- Ashton <eas...@mac.com>, Robert <rob...@perl.org>,
> Ask Bjørn Hansen <a...@perl.org>, cpan-workers <cpan-w...@perl.org>
> Subject: Re: sponsor logo on home of CPAN mirror

>  Ok ; here is the same thing with a /local/site.json file,
>  instead of a /local/site.js file :
>
>    http://cpan.cs.uu.nl/ondex2.html

Hi Elaine,

> The entire point of a mirror is that it is an exact duplicate of all others
> and the master. 
>
> Whilst I understand that there is a desire to acknowledge the generosity and
> resources borne by the host of each mirror, aside from the potential sec
> issues and it opening a door for other requests, it bothers me to think that
> the anonymity of the network over the decades now needs to be acknowledged
> by individual operators which, to my mind, opens the door for advertising,
> too. 

I agree ; I just don't like the current rules, which suggest users
tamper with "/index.html". I want clean rules and a clean method
when dealing with (prospective) mirrors.

I can find only one site that adds a logo ; and it gets it wrong :

http://mirror.easyname.at/cpan/

... and then there is crap like :

http://mirror.datacenter.by/pub/CPAN/
http://mirrors.sohu.com/CPAN/
http://mirror.netcologne.de/cpan/
http://cpan.mirror.euserv.net/
http://mirror.de.leaseweb.net/CPAN/
http://ftp.cc.uoc.gr/mirrors/CPAN/
http://mirror.faraso.org/CPAN/
http://ftp.nluug.nl/languages/perl/CPAN/
http://cpan.mirror.anlx.net/ [yellowbot ??]
...

> I can’t imagine most mirrors are such a great burden on network resources as
> to be needing some kind of remuneration in the form of a logo or
> advertising. 

Well, the number of mirror sites has been dropping steadily,

http://mirrors.cpan.org/stats/hist/

compensated by 36 metacpan mirrors (CDN). Universities are
giving up ; managers are cutting costs for non-essential stuff.
Perhaps a logo here and there is enough to keep mirrors online.

>             -=]) elaine ashton // eas...@mac.com // HFB ([=-

Regards,

HPP

Elaine Ashton

unread,
Dec 31, 2017, 10:15:03 AM12/31/17
to Henk P. Penning, Elaine -HFB- Ashton, Robert, Ask Bjørn Hansen, cpan-workers
On Dec 31, 2017, at 2:37 PM, Henk P. Penning <pen...@uu.nl> wrote:

 I agree ; I just don't like the current rules, which suggest users
 tamper with "/index.html". I want clean rules and a clean method
 when dealing with (prospective) mirrors.

 I can find only one site that adds a logo ; and it gets it wrong :

   http://mirror.easyname.at/cpan/

 ... and then there is crap like :

   http://mirror.datacenter.by/pub/CPAN/
   http://mirrors.sohu.com/CPAN/
   http://mirror.netcologne.de/cpan/
   http://cpan.mirror.euserv.net/
   http://mirror.de.leaseweb.net/CPAN/
   http://ftp.cc.uoc.gr/mirrors/CPAN/
   http://mirror.faraso.org/CPAN/
   http://ftp.nluug.nl/languages/perl/CPAN/
   http://cpan.mirror.anlx.net/ [yellowbot ??]
   …

Hi Henk, and HNY to you all. :)

I agree about the index.html and, though there are some who fumble their way through adding their ‘identity’ to their mirrors, there have always been those so improving guidance may or may not make much of an impact in preventing similar fumbling in the future…though I won’t discourage trying to improve the situation, however futile it might be.


 Well, the number of mirror sites has been dropping steadily,

   http://mirrors.cpan.org/stats/hist/

 compensated by 36 metacpan mirrors (CDN). Universities are
 giving up ; managers are cutting costs for non-essential stuff.
 Perhaps a logo here and there is enough to keep mirrors online.

I’m starting to feel like an old lady as, though I railed at the first advertisers on the web over 30 years ago, knowing even then that they would eventually pervade every website, I’d like to think that some sites should remain above what may be viewed as the inevitable, but which I continue to hope can remain ad-free without going down what Robert referred to as ‘a slippery slope.’ 

The number of mirrors is less of a concern than the quality and duration of service thereof. Perhaps a short google forms-ish survey could be circulated to the mirrors to determine what is causing them to rethink their mirroring service to CPAN? What about a Perl.org page featuring the logos of all the mirrors who wish to be represented? Just an idea or two as, though I know I’m a fossil at this point, I hope that the mirrors can remain as indistinguishable from the master and without advertising as long as possible.

e.

--
            -=]) elaine ashton // eas...@mac.com // HFB ([=-
          -=]) That's the difference between governments and ([=- 

Henk P. Penning

unread,
Jan 1, 2018, 10:30:02 AM1/1/18
to Elaine Ashton, Robert, Ask Bjørn Hansen, cpan-workers
On Sun, 31 Dec 2017, Elaine Ashton wrote:

> Date: Sun, 31 Dec 2017 15:58:37 +0100
> From: Elaine Ashton <eas...@mac.com>
> To: Henk P. Penning <pen...@uu.nl>
> Cc: Elaine -HFB- Ashton <eas...@mac.com>, Robert <rob...@perl.org>,
> Ask Bjørn Hansen <a...@perl.org>, cpan-workers <cpan-w...@perl.org>
> Subject: Re: sponsor logo on home of CPAN mirror

> On Dec 31, 2017, at 2:37 PM, Henk P. Penning <pen...@uu.nl>
> wrote:
>
>  I agree ; I just don't like the current rules, which suggest users
>  tamper with "/index.html". I want clean rules and a clean method
>  when dealing with (prospective) mirrors.

> I’m starting to feel like an old lady as, though I railed at the first
> advertisers on the web over 30 years ago, knowing even then that they would
> eventually pervade every website, I’d like to think that some sites should
> remain above what may be viewed as the inevitable, but which I continue to
> hope can remain ad-free without going down what Robert referred to as ‘a
> slippery slope.’ 

I don't understand the "slippery slope".
Where is the "slope", and why is it "slippery" ?
-- the "how to add a sponsor logo/link" has been around for years
-- CPAN's home-page already uses javascript
How is adding 1 javascript function and 1 empty <span> a problem?
How is it worse than suggesting to users to tinker with /index.html?

> The number of mirrors is less of a concern than the quality and duration of
> service thereof. Perhaps a short google forms-ish survey could be circulated
> to the mirrors to determine what is causing them to rethink their mirroring
> service to CPAN? What about a Perl.org page featuring the logos of all the
> mirrors who wish to be represented? Just an idea or two as, though I know
> I’m a fossil at this point, I hope that the mirrors can remain as
> indistinguishable from the master and without advertising as long as
> possible.

I don't think we're talking about "advertising" here ;
it is about thanking contributors ; as we do with
Phyber and Fastly ; there is nothing wrong with that.

>             -=]) elaine ashton // eas...@mac.com // HFB ([=-

Regards,

Henk Penning

Elaine Ashton

unread,
Jan 1, 2018, 1:15:02 PM1/1/18
to Henk P. Penning, Elaine -HFB- Ashton, Robert, Ask Bjørn Hansen, cpan-workers

On Jan 1, 2018, at 5:20 PM, Henk P. Penning <pen...@uu.nl> wrote:

 I don't understand the "slippery slope".
  Where is the "slope", and why is it "slippery" ?
 -- the "how to add a sponsor logo/link" has been around for years
 -- CPAN's home-page already uses javascript
 How is adding 1 javascript function and 1 empty <span> a problem?
 How is it worse than suggesting to users to tinker with /index.html?

I think the ‘slope’, from a syseng perspective is trying to solve a problem we don’t quite understand which may have far reaching consequences we may not want. I think the saying in programming is akin to ‘patch one bug and create two new ones.’ ;) 

We have always acknowledged the master mirrors, including funet.fi, which was a state/edu network who never requested such recognition. Even when I ran search.cpan out of WashU and Webster U, neither University requested recognition, nor complained about the resource load, which was rather substantial, especially since the hardware was donated and we all volunteered our time to maintain it. Hardware, storage and network resources have become less expensive in the 20 years since that time. 

I suppose my point is that, if your concern is that the number of mirrors is declining, the problem may be not as simple as offering sites an opportunity to add a logo, which may later lead to a demand for advertising, which is where the ‘slippery slope’ comes in (at least for me). Understanding the reasons why mirrors are leaving and/or doing so in shorter periods of time may lead to a better understanding and solution than the current suggestion.

Not that anyone gives a fuck about what I think these days, but I’m still good at what I do and I try to offer what I can when I think there might be a better way of doing something, however well intended it might be. :)

e.

--
            -=]) elaine ashton // eas...@mac.com // HFB ([=-
          -=]) That's the difference between governments and ([=- 

Graham Barr

unread,
Jan 2, 2018, 2:00:02 AM1/2/18
to Henk P. Penning, Ask Bjørn Hansen, cpan-workers


> On Dec 31, 2017, at 07:25, Henk P. Penning <pen...@uu.nl> wrote:
>
>
> I don't see how such a change can be kept local ;
> how can it /not/ propagate to downstream mirrors?

If the JSON file was named using the mirror hostname then index.html can extract the name from the URL and it wouldn’t matter if the file was propagated downstream

Graham
0 new messages