On 16 February 2018 at 16:53, Henk P. Penning <penn...@uu.nl> wrote:
> On Thu, 15 Feb 2018, sebb wrote:
>
>> Date: Thu, 15 Feb 2018 22:22:12 +0100
>> From: sebb <seb...@gmail.com>
>> 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.

Good idea as it will stop further generation of useless URLs.

>   Are there any important links to specific files on specific mirrors ?

I don't understand what you mean by that.

>   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
>     <Directory dist>
>     RewriteCondition "file path in an atticked dir"
>     RewriteRule .* "Redirect to attic.a.o"
>     </Directory>

AFAICT that will only work for links that target the ASF hosts directly.
Such redirects are anyway not a problem.

>   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/

Unless the archive synch job is changed to ignore files under
dist/attic/ghosts this will result in creating copies of the release
artifacts on archive.a.o

>   -- 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.

It won't keep the redirects on the 3rd party mirrors.
Such URLs may well have been stored elsewhere.

For example [1] points to (e.g.)
http://mirror.org/apache/harmony/milestones/5.0/M15/apache-harmony-5.0-jre-r991518-windows-x86-snapshot.zip

At present such a URL will redirect back to the attic (try it!)

That is the functionality which I think is important to preserve.

AFAICT it's trivial to preserve the redirects on the ASF hosts.
This is because we know the path structure is /dist/project.

That is not true for 3rd party mirrors which have a variety of path prefixes.
Since the .htaccess file is in the top-level project directory it only
gets invoked for paths that match the attic'ed project.

I don't see how dist/attic/ghosts would help with the redirects.

>> [1] http://harmony.apache.org/download.cgi
>
>
>   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 penn...@uu.nl     \_/

Reply via email to