Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirection requirement of v3.0 URL -> latest URL #1069

Closed
bact opened this issue Aug 13, 2024 · 3 comments · Fixed by #1100
Closed

Redirection requirement of v3.0 URL -> latest URL #1069

bact opened this issue Aug 13, 2024 · 3 comments · Fixed by #1100

Comments

@bact
Copy link
Collaborator

bact commented Aug 13, 2024

From Tech call 2024-08-13

These URLs (not an exhaustive list):

should be redirected to these URLs or displayed the content of these URLs:

The URLs are used by "Framing Software Component Transparency: Establishing a Common Software Bill of Materials (SBOM)" and few other whitepapers to be released in a future.

For properties with "new" name

In v3.0.1, there're several fixes in property names. For example, v3.0.0 imports is v3.0.1 import. Because of that:

  • Standard mkdocs redirection will redirects "v3.0/imports/" to non-exist "v3.0.1/imports/", resulting 404
  • With mkdocs-redirects plugin, we may able to define a map between imports and import - has to explore
    • With some configuration work, we may able to redirect "v3.0/imports/" to "v3.0.1/import/"
    • UPDATE: mkdocs-redirects works within the same spec version but not across spec versions. So we have to come up with our own script.
@bact
Copy link
Collaborator Author

bact commented Aug 28, 2024

(1)

Currently RDF and schema IRIs on https://spdx.org/... like:

https://spdx.org/rdf/3.0.0/spdx-context.jsonld
https://spdx.org/schema/3.0.0/spdx-json-schema.json

will be redirected to the actual physical files in model/ directory on spdx-spec gh-pages:

https://spdx.github.io/spdx-spec/v3.0/model/spdx-context.jsonld
https://spdx.github.io/spdx-spec/v3.0/model/schema.json

--

(2)

New schema and RDF paths on spdx-spec gh-pages are likely to be:

https://spdx.github.io/spdx-spec/v3.0.1/rdf/spdx-context.jsonld
https://spdx.github.io/spdx-spec/v3.0.1/rdf/schema.json

According to

--

(3)

The https://spdx.github.io/spdx-spec/ website for multiple versions of spec is managed by mike.

With the requirement here to have v3.0 as a latest version, mike will overwrite v3.0/* with new path structure (from #1066), where RDF files will be in rdf/ (instead of model/).

This means the schema and RDF files will no longer available in model/ directory and will make IRIs like the following broken:

https://spdx.github.io/spdx-spec/v3.0/model/spdx-context.jsonld
https://spdx.github.io/spdx-spec/v3.0/model/schema.json

Thus makes the redirections in (1) broken as well.

--

(4)

Proposal to fix

  1. (mandatory) LF must change redirection of https://spdx.org/... to the new path structure

  2. (optional) While it may not be possible to make a redirect from https://spdx.github.io/spdx-spec/v3.0/model/spdx-context.jsonld to https://spdx.github.io/spdx-spec/v3.0.1/rdf/spdx-context.jsonld as:

    • The file is not HTML, so browser redirection with http-equiv="refresh" doesn't work
    • GitHub Pages doesn't have .htaccess for Redirect directive

    it is possible to make another copy of schema and RDF files from the new rdf/ directory to also be available in model/ as well (a copying script is needed). So the IRIs like https://spdx.github.io/spdx-spec/v3.0/model/spdx-context.jsonld will still be working.
    (However, we should not advertise these IRIs, they are solely for fallback/backward-compatibility purpose).

@goneall
Copy link
Member

goneall commented Aug 29, 2024

Really good catch @bact

Agree with the proposal.

I can take care of the new redirect to the new path structure - just need to add it to issue #1094 so I don't forget ;)

We'll need a pull request to make the copy of the schema/RDF file to the model directory.

@bact bact mentioned this issue Sep 2, 2024
6 tasks
@bact
Copy link
Collaborator Author

bact commented Sep 3, 2024

@goneall #1100 is now taking care of

  • general 3.0/3.0.1 redirections
  • 3.0.0/3.0.1 name difference redirections
  • schema/RDF files copying

@zvr zvr closed this as completed in #1100 Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants