Skip to content

Commit 7cd1da3

Browse files
authored
Add an SPDX file to the repository to streamline license and security reviews by user organizations (#42102)
* Add an SPDX file to the repository. * New script contrib/updateSPDX.jl . Ran the script to update the SPDX file.
1 parent 43efe2c commit 7cd1da3

File tree

3 files changed

+633
-1
lines changed

3 files changed

+633
-1
lines changed

THIRDPARTY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ own licenses:
2121

2222
- [LIBUNWIND](https://github.com/libunwind/libunwind/blob/master/LICENSE) [MIT]
2323
- [LIBUV](https://github.com/JuliaLang/libuv/blob/julia-uv2-1.39.0/LICENSE) [MIT]
24-
- [LLVM](https://releases.llvm.org/6.0.0/LICENSE.TXT) [UIUC]
24+
- [LLVM](https://releases.llvm.org/12.0.1/LICENSE.TXT) [APACHE 2.0 with LLVM Exception]
2525
- [UTF8PROC](https://github.com/JuliaStrings/utf8proc) [MIT]
2626

2727
Julia's `stdlib` uses the following external libraries, which have their own licenses:

contrib/updateSPDX.jl

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# SPDX-License-Identifier: MIT
2+
# This file is a part of Julia. License is MIT: https://julialang.org/license
3+
#
4+
# Run this script with each new Julia release to update "../julia.spdx.json"
5+
6+
using UUIDs
7+
using Dates
8+
using JSON
9+
using TimeZones
10+
using DataStructures
11+
12+
spdxDocument= "../julia.spdx.json"
13+
spdxData= JSON.parsefile(spdxDocument; dicttype=OrderedDict{String, Any})
14+
15+
# At the moment we can only update a few items automatically with each release.
16+
# These are the crucial elements to make a new version of the SPDX file.
17+
# Any other changes (ex. Adding or removing of external dependencies, updating copyright text, etc.) must be performed manually
18+
spdxData["documentNamespace"]= "https://julialang.org/spdxdocs/julia-spdx-" * string(uuid4())
19+
spdxData["creationInfo"]["created"]= Dates.format(now(tz"UTC"), "yyyy-mm-ddTHH:MM:SS") * "Z"
20+
21+
for pkg in spdxData["packages"]
22+
if pkg["SPDXID"] == "SPDXRef-JuliaMain"
23+
pkg["versionInfo"]= readline("../VERSION")
24+
pkg["downloadLocation"]= "git+https://github.com/JuliaLang/julia.git@v" * pkg["versionInfo"]
25+
break
26+
end
27+
end
28+
29+
open(spdxDocument, "w") do f
30+
JSON.print(f, spdxData, 4)
31+
end

0 commit comments

Comments
 (0)