Skip to content

Commit

Permalink
[CI-Examples] Change the license of all examples to BSD-3-clause
Browse files Browse the repository at this point in the history
The CI examples had the default license of LGPL-3.0. With this commit,
we change the license of all Makefiles, manifest templates, config
files, Python scripts in examples to a BSD-3-clause license.

This change is permitted by the "Examples Exception" to the Technical
Charter, enacted on 5. December 2023. This change was agreed by all
contributors to CI examples, past and present.

This change is in response to a popular request to adopt a more
permissive license for our examples. The new BSD-3-clause is a
permissive license (in contrast to the previously applied copyleft LGPL
license). BSD explicitly allows to modify and use our examples without
any obligation to share these modifications.

Signed-off-by: Dmitrii Kuvaiskii <dmitrii.kuvaiskii@intel.com>
  • Loading branch information
dimakuv committed Jan 19, 2024
1 parent 3d55c8d commit a933017
Show file tree
Hide file tree
Showing 63 changed files with 183 additions and 12 deletions.
3 changes: 3 additions & 0 deletions CI-Examples/bash/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine)

ifeq ($(DEBUG),1)
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/bash/manifest.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# This is a general manifest template for running Bash and core utility programs,
# including ls, cat, cp, date, and rm.

Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/bash/scripts/bash_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

times=$1
[ "$times" -gt 0 ] 2>/dev/null || times=300

Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/blender/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# assumes this makefile lies in cwd
PWD := $(shell pwd)

Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/blender/blender.manifest.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# Blender manifest example

loader.entrypoint = "file:{{ gramine.libos }}"
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/blender/test_all_scenes.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/sh

# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

set -e

if test -n "$SGX"
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/busybox/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine)

SRCDIR = src
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/busybox/busybox.manifest.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# Busybox manifest file example

loader.entrypoint = "file:{{ gramine.libos }}"
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/common_tools/benchmark-http.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# On Ubuntu, this script requires wrk2 tool installed for the wrk binary.
#
# Run like: ./benchmark-http.sh host:port
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/common_tools/download
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

set -eu -o pipefail

declare -a urls
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/helloworld/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

CFLAGS = -Wall -Wextra

ifeq ($(DEBUG),1)
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/helloworld/helloworld.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* Copyright (C) 2023 Gramine contributors
* SPDX-License-Identifier: BSD-3-Clause */

#include <stdio.h>

int main(void) {
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/helloworld/helloworld.manifest.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# Hello World manifest file example

loader.entrypoint = "file:{{ gramine.libos }}"
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/lighttpd/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

THIS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))

ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine)
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/lighttpd/lighttpd-generic.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

server.event-handler = "select"
#server.event-handler = "linux-sysepoll"
server.max-connections = 1024
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/lighttpd/lighttpd.manifest.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# lighttpd manifest example

loader.entrypoint = "file:{{ gramine.libos }}"
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/memcached/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine)

SRCDIR = src
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/memcached/memcached.manifest.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# Memcached manifest file example

loader.entrypoint = "file:{{ gramine.libos }}"
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/nginx/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

THIS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))

ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine)
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/nginx/nginx-gramine.conf.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# This configuration file is based on nginx.conf.default from Nginx v1.16.1.
#
# The following changes are made:
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/nginx/nginx.manifest.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# Nginx manifest example

loader.entrypoint = "file:{{ gramine.libos }}"
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/nginx/ssl/ca_config.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

[ req ]
default_bits = 4096
default_md = sha512
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/python/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine)

ifeq ($(DEBUG),1)
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/python/python.manifest.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# Python3 manifest example

loader.entrypoint = "file:{{ gramine.libos }}"
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/python/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

set -e

if test -n "$SGX"
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/python/scripts/dummy-web-server.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python3

# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

import sys
from http.server import BaseHTTPRequestHandler, HTTPServer

Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/python/scripts/helloworld.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/env python3

# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

print("Hello World")
3 changes: 3 additions & 0 deletions CI-Examples/python/scripts/sgx-quote.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python3

# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

import os
import sys

Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/python/scripts/sgx-report.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python3

# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

import os
import sys

Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/python/scripts/test-http.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python3

# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

import sys
import urllib.request

Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/python/scripts/test-numpy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python3

# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

import timeit

import numpy
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/python/scripts/test-scipy.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env python3

# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

import timeit

setup = """\
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/ra-tls-mbedtls/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine)

ifeq ($(DEBUG),1)
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/ra-tls-mbedtls/client.manifest.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# Client manifest file

loader.entrypoint = "file:{{ gramine.libos }}"
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/ra-tls-mbedtls/server.manifest.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# RA-TLS manifest file example

loader.entrypoint = "file:{{ gramine.libos }}"
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/ra-tls-mbedtls/ssl/ca_config.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

[ req ]
default_bits = 4096
default_md = sha512
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/ra-tls-nginx/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

RA_TYPE ?= dcap
ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine)

Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/ra-tls-nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

error_log stderr warn;
pid /tmp/nginx.pid;
daemon off;
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/ra-tls-nginx/nginx.manifest.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

loader.entrypoint = "file:{{ gramine.libos }}"
loader.argv = [
"gramine-ratls", "/tmp/crt.pem", "/tmp/key.pem", "--",
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/ra-tls-nginx/run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/sh

# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

set -e

gramine-sgx nginx &
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/ra-tls-secret-prov/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

ARCH_LIBDIR ?= /lib/$(shell $(CC) -dumpmachine)

ifeq ($(DEBUG),1)
Expand Down
4 changes: 2 additions & 2 deletions CI-Examples/ra-tls-secret-prov/secret_prov/client.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: LGPL-3.0-or-later */
/* Copyright (C) 2020 Intel Labs */
/* Copyright (C) 2023 Gramine contributors
* SPDX-License-Identifier: BSD-3-Clause */

#include <assert.h>
#include <errno.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# Secret Provisioning manifest file example (client)

loader.entrypoint = "file:{{ gramine.libos }}"
Expand Down
4 changes: 2 additions & 2 deletions CI-Examples/ra-tls-secret-prov/secret_prov/server.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: LGPL-3.0-or-later */
/* Copyright (C) 2020 Intel Labs */
/* Copyright (C) 2023 Gramine contributors
* SPDX-License-Identifier: BSD-3-Clause */

#include <assert.h>
#include <errno.h>
Expand Down
4 changes: 2 additions & 2 deletions CI-Examples/ra-tls-secret-prov/secret_prov_minimal/client.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: LGPL-3.0-or-later */
/* Copyright (C) 2020 Intel Labs */
/* Copyright (C) 2023 Gramine contributors
* SPDX-License-Identifier: BSD-3-Clause */

#include <stdio.h>
#include <stdlib.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# Secret Provisioning manifest file example (minimal client)

loader.entrypoint = "file:{{ gramine.libos }}"
Expand Down
4 changes: 2 additions & 2 deletions CI-Examples/ra-tls-secret-prov/secret_prov_minimal/server.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: LGPL-3.0-or-later */
/* Copyright (C) 2020 Intel Labs */
/* Copyright (C) 2023 Gramine contributors
* SPDX-License-Identifier: BSD-3-Clause */

#include <stdio.h>

Expand Down
4 changes: 2 additions & 2 deletions CI-Examples/ra-tls-secret-prov/secret_prov_pf/client.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: LGPL-3.0-or-later */
/* Copyright (C) 2020 Intel Labs */
/* Copyright (C) 2023 Gramine contributors
* SPDX-License-Identifier: BSD-3-Clause */

#include <errno.h>
#include <fcntl.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# Secret Provisioning manifest file example (Protected Files client)

loader.entrypoint = "file:{{ gramine.libos }}"
Expand Down
4 changes: 2 additions & 2 deletions CI-Examples/ra-tls-secret-prov/secret_prov_pf/server.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: LGPL-3.0-or-later */
/* Copyright (C) 2020 Intel Labs */
/* Copyright (C) 2023 Gramine contributors
* SPDX-License-Identifier: BSD-3-Clause */

#include <assert.h>
#include <errno.h>
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/ra-tls-secret-prov/ssl/ca_config.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

[ req ]
default_bits = 4096
default_md = sha512
Expand Down
3 changes: 3 additions & 0 deletions CI-Examples/redis/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (C) 2023 Gramine contributors
# SPDX-License-Identifier: BSD-3-Clause

# Build Redis as follows:
#
# - make -- create non-SGX no-debug-log manifest
Expand Down

0 comments on commit a933017

Please sign in to comment.