Re: Redirects for attic project download directories

2018-02-16 Thread Henk P. Penning

On Thu, 15 Feb 2018, sebb wrote:


Date: Thu, 15 Feb 2018 22:22:12 +0100
From: sebb 
To: general@attic.apache.org
Subject: Redirects for attic project download directories

The original thread got derailed, so here is what I think the issue is.

When a project is moved to the attic, its website is updated to show a
banner that the project has been retired, with a link to the attic.

Also, its release files on www.apache.org/dist are removed, and
replaced with an .htaccess redirect to an Attic page with summary
details of the project.

e.g.
http://www.apache.org/dist/harmony
redirects to
http://attic.apache.org/projects/harmony.html

Whilst this redirect works, and is simple to administer, it means
there are many directories under www.apache.org/dist/ which only
contain an .htaccess file, and scripts may have to be aware of which
directories correspond to active projects.

It would be useful to be able to tidy this up.


  Agree ; that's a good summary.


However it is important that the redirects are kept as there are
likely to be links to the download location in lots of places. We
should not break URLs unnecessarily.

Note that the redirects also work on mirror links as well as on the ASF hosts.
This behaviour should be preserved as historical links will generally
use the dynamic mirror system.
For example the harmony download page [1] points to the mirrors;
externally preserved links are likely to do so as well.

Removing the .htaccess files and their parent directories will break
all the links, so IMO that is not an option.


  [ humbedooh == Daniel Gruno ; infra ; initial(?) author of closer.lua
  ; closer.lua == the script that projects use on their (download)
pages to link to "the mirrors"
  ; GHOST == a retire project ; ASF GHOSTs live in the Attic :-)
  ]

  Links to mirrors are typically generated by closer.lua ;
  we can make closer.lua attic-aware (says humbedooh :-).
  When closer.lua encounters a target in an atticked project,
  it can redirect to attic.a.o.
  Are there any important links to specific files on specific mirrors ?

  That leaves "www.apache.org/dist/GHOST".

  It would be easy (again, says humbedooh) to configure www.apache.org
  with a few (fixed number of) Rewrite rules like (pseudo-code) :

# redirect dist/GHOST to attic.a.o/.../GHOST.hmtl

RewriteCondition "file path in an atticked dir"
RewriteRule .* "Redirect to attic.a.o"


  Now, suppose we create dist/attic/ghosts/

https:// dist.apache.org/repos/dist/release/attic/ghosts/

  -- on retirement, infra svn moves dist/GHOST/ to dist/attic/ghosts/ ;
 Pmc Attic can cleanup what was formerly dist/GHOST/
  -- closer.lua can check the presence of dist/attic/ghosts/PROJ
  -- the RewriteRules idem

  I think this would tidy up /dist/ while keeping the proper Redirects.


[1] http://harmony.apache.org/download.cgi


  Regards,

  Henk Penning

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


Re: Redirects for attic project download directories

2018-02-16 Thread sebb
On 16 February 2018 at 12:33, Henk P. Penning  wrote:
> On Thu, 15 Feb 2018, sebb wrote:
>
>> Date: Thu, 15 Feb 2018 22:22:12 +0100
>> From: sebb 
>> To: general@attic.apache.org
>> Subject: Redirects for attic project download directories
>
>
>> AFAIK .htaccess files are inherited from the parent directory, so it
>> should be possible to move the individual redirects to a shared parent
>> .htaccess file.
>>
>> This needs to be tested.
>
>
>   I couldn't make it work ;
> what would (for instance)
>   a 'beehive' Redirect-line look like ?
>
>   In general, on some mirror.org with [apache-dist] in
>
> http://mirror.org/foo/bar/
>
>   with our/their .htaccess file in
>
> http://mirror.org/foo/bar/.htaccess
>
>   should redirect
>
> http://mirror.org/foo/bar/beehive/blib/blob/
>
>   but should not redirect
>
> http://mirror.org/foo/bar/other/proj/beehive/x/y/

I see what you mean.
It looks like it may not be possible the ensure that beehive is only
matched at the correct depth when using RedirectMatch.

My position is that the we should not break the URLs just to tidy the
directory and/or make it easier for scripts.
That is putting the cart before the horse.

So I think the existing .htaccess files should be left in place.

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